as discussed with Blair Zajac on the svnmerge mailing list:
I just ran into this:
$ svnmerge -s -v -r 92481 merge
svnmerge: option -r not recognized
Type 'svnmerge help' for usage
I finally figured out that I had to use
$ svnmerge -s -v merge -r 92481
I think one of the large issues that Subversion learned from CVS was that
positional command line options are a pain to use and that svn takes special
care to not care where in the command line a particular command line option
Can we get this changed?
Currently, svnmerge has two groups of options: globals, and per-command.
Global options (like -v/--verbose) are allowed before and after the command
name. Command-specific optoin are allowed only *after* the command name.
This patch modifies this behaviour, so that command-specific options are
allowed even *before* the command name. svnmerge now runs getopt() twice: in
the first round, we allow all the options used by all the commands, so that
getopt can fully parse the command line and extract the command name (eg.
'merge'). After that, we rerun getopt() with only the options allowed by the
specified command, to catch invalid options.
To be picky, this does not allow conflicts in semantic between
command-specific options. For instance, we can't have anymore a "-K" option
for cmd A without arguments, and a "-K nnn" option for cmd B. I don't think
this is a problem. In fact, it could be argued that all the options should
be different among commands to not confuse the user.
Committed as r18013.
Allow command line options to be specified in any order, even before the
command name. Eg. we now allow "svnmerge -r123 merge" which was forbidden
(CommandOpts._fancy_getopt): Split out functionalities into...
(CommandOpts.parse): First extract command name, then validate the
Rename "opts" to "state" for improved readability.
Received on Sat Jan 7 17:48:09 2006
To unsubscribe, e-mail: email@example.com
For additional commands, e-mail: firstname.lastname@example.org