[Svnmerge] r19553 - svnmerge.py
Giovanni Bajo
rasky at develer.com
Fri May 12 01:10:24 PDT 2006
Hi Max,
in r19553, you batch-modified svnmerge.py to use gnu_getopt instead of getopt
for parsing arguments:
------------------------------------------------------------------------
r19553 | maxb | 2006-05-08 15:28:23 +0200 (Mon, 08 May 2006) | 20 lines
For every getopt-using Python script which does not already do so,
use GNU-style getopt if available.
* gen-make.py
* tools/hook-scripts/log-police.py
* tools/hook-scripts/svnperms.py
* tools/dev/contribulyze.py
* tools/dev/iz/ff2csv.py
* tools/dev/iz/find-fix.py
* tools/dev/lock-check.py
* tools/dev/scramble-tree.py
* tools/examples/dumpprops.py
* tools/examples/revplist.py
* tools/examples/putfile.py
* tools/examples/getfile.py
* tools/examples/blame.py
* contrib/client-side/svnmerge.py
* contrib/hook-scripts/svn2rss.py
* build/win32/make_dist.py
In fact, svnmerge.py was already using gnu_getopt parsing before: there are two
getopt calls, and the second one (a few lines below) already tries to call
gnu_getopt. The first one, that you modified, is only used to extract the first
positional argument name (the command name) to refine the command parsing and
limit it to the list of really available options. You can see we even have
testcase to make sure GNU-style parsing is being performed where available.
While your change is obviously not harmful, it introduces some reduncencies
(the new my_getopt, which is not used by the second gnu_getopt call) which I
believe is unnecessary. Would you please revert it?
Thanks!
Giovanni Bajo
More information about the Svnmerge
mailing list