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

Re: Supporting the --targets option more fully

From: Hyrum K. Wright <hyrum_wright_at_mail.utexas.edu>
Date: 2006-05-31 21:42:33 CEST

C. Michael Pilato wrote:
> C. Michael Pilato wrote:
>> Hyrum K. Wright wrote:
>>> 2) In order to have --targets be used to specify only repeatable
>>> targets, would it be favorable to prepend the list of targets it
>>> generates, rather than append them? In most of the commands I've looked
>>> at, the "special" command arguments are last, so prepending would
>>> maintain the correct meaning of arguments given by their order. Should
>>> such prepending be done for each command individually, or across the board?
>> You're making a false assumption here:
>> svn update foo bar --targets /path/to/more/targets
>> is *exactly* the same thing as:
>> svn update --targets /path/to/more/targets foo bar
> This wasn't very clear. Your false assumption is that option positioning
> with respect to command arguments matters. The reality is that it doesn't.
> Sorry for the confusion.
>> Our option space is global, and option positioning doesn't matter. Options
>> are stripped first, leaving command arguments. As with most things, I'd say
>> consistency is best -- either always prepend, or always append, and make the
>> documentation say clearly which you do.

Sorry, I wasn't very clear. What I meant was that in the --targets
expansion, the list of targets should be prepended to the other
arguments provided. Using 'checkout' as an example:

   svn co url1 url2 path3

means "checkout url1 and url2 into path3" which is different than

   svn co url2 path3 url1

which means "checkout url2 and path3 into url1" and is nonsensical. We
would also want to preserve this special ordering for future commands
such as multi-argument copy operation, "svn cp SRC... DST". The SRC
targets could be specified by --targets, but the DST argument could not.

Because the --targets options should provide additional *targets* and
not simply additional *arguments*, we probably don't want to simply
expand it at the end of the command so that:

   svn co bar bat --targets foo biz


   svn co bar bat biz <contents of foo>

which has different meaning. Prepending would yield

   svn co <contents of foo> bar bat biz

which would maintain the order of the arguments to the command, and
thus, their meaning.

Does this help make my original question clearer?


To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed May 31 21:43:15 2006

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