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

Re: svn commit: r26853 - trunk/subversion/bindings/swig/ruby/svn

From: Joe Swatosh <joe.swatosh_at_gmail.com>
Date: 2007-10-02 00:58:27 CEST

Hi Dan,

On 10/1/07, Daniel Rall <dlr@collab.net> wrote:
> Why does proplist take a depth parameter, while propget and propset
> take a recurse parameter (e.g. backwards compat)?
>
> On Sat, 29 Sep 2007, joeswatosh@tigris.org wrote:
>
> > Author: joeswatosh
> > Date: Sat Sep 29 20:53:57 2007
> > New Revision: 26853
> >
> > Log:
> > Follow on to r26745 "Implement 'svn propset --depth' and 'svn propget --
> > depth'." r26745 changed the meaning of 'recurse' in svn_client_propget2 and
> > started changed svn_client_propset3 to expect a 'depth' instead of 'recurse.'
> > So we'll just convert from recurse to depth ourselves, and update the from
> > Client.propget2 to Client.propget4.
> >
> > * subversion/bindings/swig/ruby/svn/client.rb
> > (Svn::Client::Context#propset): Convert from recurse to depth here instead
> > of using the standard conversion so this method will maintain its current
> > meaning.
> > (Svn::Client::Context#propget): Convert from recurse to depth here instead
> > of using the standard conversion so this method will maintain its current
> > meaning. Prefer the latest version of the svn_client_propget api.
> >
> >
> > Modified:
> > trunk/subversion/bindings/swig/ruby/svn/client.rb
> >
> > Modified: trunk/subversion/bindings/swig/ruby/svn/client.rb
> > URL: http://svn.collab.net/viewvc/svn/trunk/subversion/bindings/swig/ruby/svn/client.rb?pathrev=26853&r1=26852&r2=26853
> > ==============================================================================
> > --- trunk/subversion/bindings/swig/ruby/svn/client.rb (original)
> > +++ trunk/subversion/bindings/swig/ruby/svn/client.rb Sat Sep 29 20:53:57 2007
> > @@ -185,7 +185,8 @@
> > def propset(name, value, target, recurse=true, force=false,
> > base_revision_for_url=nil)
> > base_revision_for_url ||= Svn::Core::INVALID_REVNUM
> > - Client.propset3(name, value, target, recurse, force,
> > + depth = recurse ? Svn::Core::DEPTH_INFINITY : Svn::Core::DEPTH_EMPTY
> > + Client.propset3(name, value, target, depth, force,
> > base_revision_for_url, self)
> > end
> > alias prop_set propset
> > @@ -205,7 +206,8 @@
> > def propget(name, target, rev=nil, peg_rev=nil, recurse=true)
> > rev ||= "HEAD"
> > peg_rev ||= rev
> > - Client.propget2(name, target, rev, peg_rev, recurse, self)
> > + depth = recurse ? Svn::Core::DEPTH_INFINITY : Svn::Core::DEPTH_EMPTY
> > + Client.propget4(name, target, peg_rev, rev, depth, self).first
> > end
> > alias prop_get propget
> > alias pget propget
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: svn-unsubscribe@subversion.tigris.org
> > For additional commands, e-mail: svn-help@subversion.tigris.org
>
>

Looks like I screwed it up months ago:
================================
Revision: 25019
Author: joeswatosh
Date: 11:13:50 PM, Monday, May 14, 2007
Message:
Follow on to r25007 which added depth support to svn_client_proplist3.

* subversion/bindings/swig/ruby/svn/client.rb
  (Svn::Client::Context#proplist) changed argument name and default to
  reflect the use of depth instead of recurse in the core API.

Reviewed by: kou
             dlr

----
Modified : /trunk/subversion/bindings/swig/ruby/svn/client.rb
================================
I think you're on to something in the other thread.  Probably all
(proplist, propset and propget) should take a 'recurse_or_depth'
parameter that we should turn into a depth before we pass along.  I
think that way we can turn a True or False into the depth we want.
Especially since it may not always match SVN_DEPTH_FROM_RECURSE in
every case.
--
Joe
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Oct 2 00:58:36 2007

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.