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

Re: [PATCH] Don't ignore multiple --target switches

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2006-06-01 00:28:32 CEST

Hyrum K. Wright wrote:
> This patch fixes a bug where multiple --target switches fail silently
> for all but the final one. Instead, this patch concatenates all targets
> specified by multiple --target switches into one array.

Ah, but is it a bug?

We intentionally ignore all but the last of multiple occurrences of an
option-taking-an-argument (except "-r"/"--revision"), perhaps in order to let
the user have an alias which begins with some default option value and yet can
be overridden with another value later on the command line. e.g.

alias mysvn='svn --config-dir=~/my-svn-config/'
mysvn diff # Uses ~/my-svn-config/
mysvn diff --config-dir=~/.subversion/ # No error; uses ~/.subversion/

So -0.5 on this patch.

Unless there is a demonstrable requirement for this behaviour, AND we document
the new behaviour (in the on-line help, at least), I would much prefer the
behaviourally simpler alternative which is to raise an error if the option is
given more than once, if we agree that the existing behaviour should be changed
(because it is unexpected, perhaps).

I'm not saying whether the behaviour should be changed at all.

(On the "GNU grep" developers' mailing list there is an on-going discussion
about how repeated options should be treated - error, use only the last, try to
combine them, etc. - and there is inconsistency in the present implementation
and strongly conflicting views on what is the "right" or "best" interpretation
for various different types of options. Combining multiple --targets options
may be a reasonable thing to do, but if that behaviour is not required then we
should obey the KISS design principle - keep it (the behaviour, the design, the
functionality) simple.)

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Jun 1 00:28:53 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.