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

Re: svn commit: r21682 - in trunk: subversion/libsvn_ra_svn www

From: Karl Fogel <kfogel_at_google.com>
Date: 2006-09-29 23:08:01 CEST

Daniel Rall <dlr@collab.net> writes:
> On Wed, 27 Sep 2006, kfogel@tigris.org wrote:
> ....
>> --- trunk/subversion/libsvn_ra_svn/protocol (original)
>> +++ trunk/subversion/libsvn_ra_svn/protocol Wed Sep 27 12:04:02 2006
> ...
>> +4.1. Extending existing commands
>> +
>> +Extending an existing command is normally done by indicating that its
>> +tuple is allowed to end where it currently ends, for backwards
>> +compatibility, and then tacking on a new, possibly optional, tuple.
>> +For example, set-path was extended to include lock-tokens like this:
>> +
>> + /* OLD */ set-path:
>> + params: ( path:string rev:number start-empty:bool )
>> +
>> + /* NEW */ set-path:
>> + params: ( path:string rev:number start-empty:bool ? [ lock-token:string ] )
>> +
>> +The "?" says that the outer tuple is allowed to end here, because an
>> +old client or server wouldn't know to send the new subtuple. The new
>> +subtuple appears in square braces because, even in the new protocol,
>> +the lock-token is still optional (but if there's no lock-token to
>> +send, then an empty tuple must still be transmitted, so that future
>> +extensions to this command remain possible). And if lock-token were
>> +mandatory in the new protocol, then the braces would be parentheses
>> +instead.
>
> We probably want to indicate that optional arguments (as tuple
> contents) for *new* commands need not use the "?" character before the
> "(?x)" sequence, but should use that latter sequence to allow more
> parameters to easily be added at the end of the command.

Can you say that in more words? I'm not quite catching it...

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Sep 29 23:08:25 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.