[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Backport of r20042 (Improve usability for Svn::Core::Dirent::time...)

From: Kobayashi Noritada <nori1_at_dolphin.c.u-tokyo.ac.jp>
Date: 2006-07-12 08:14:59 CEST


> > Kouhei, which is a better way, to add another method returning a Time
> > (whose name I cannot think of...) to Dirent, or to add an argument which
> > can adjust a type of the return value?
> I think adding a new method Direct#time2 is the best solution.
> Could you make a patch, nori? ;)

I've created a patch attached here.
Could you review this one?



Restore pre-r20042 behaviour of Svn::Core::Dirent#time and redefine its
post-r20042 behaviour as Svn::Core::Dirent#time2 for backward

* subversion/bindings/swig/ruby/svn/core.rb
  (Svn::Core::Dirent#time2): Rename from Svn::Core::Dirent#time...
  (Svn::Core::Dirent#time): ...so as to restore this method.
  (Svn::Core::Dirent#_time): Delete, since unnecessary.

Suggested by: rooneg

Index: subversion/bindings/swig/ruby/svn/core.rb
--- subversion/bindings/swig/ruby/svn/core.rb (revision 20578)
+++ subversion/bindings/swig/ruby/svn/core.rb (working copy)
@@ -352,10 +352,12 @@
         kind == NODE_UNKNOWN
- alias _time time
       # Returns a Time when the instance was last changed.
- def time
- __time = _time
+ #
+ # Svn::Core::Dirent#time is replaced by this method, _deprecated_,
+ # and provided for backward compatibility with the 1.3 API.
+ def time2
+ __time = time
         __time && Time.from_apr_time(__time)

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jul 12 08:15:28 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.