[PATCH] dispatch: use --section.setting=value instead of --config=section.setting=value
Mads Kiilerich
mads at kiilerich.com
Fri May 2 23:16:44 UTC 2014
I forgot a trivial refactoring before this patch - I'll resend if the
feedback is positive (or not sufficiently negative to stop me):
dispatch: refactoring in _earlygetopt, don't repeat values.append
diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py
--- a/mercurial/dispatch.py
+++ b/mercurial/dispatch.py
@@ -567,14 +567,15 @@ def _earlygetopt(aliases, args):
if arg in aliases:
del args[pos]
if equals > -1:
- values.append(fullarg[equals + 1:])
+ v = fullarg[equals + 1:]
argcount -= 1
else:
if pos + 1 >= argcount:
# ignore and let getopt report an error if there
is no value
break
- values.append(args.pop(pos))
+ v = args.pop(pos)
argcount -= 2
+ values.append(v)
elif arg[:2] in shortopts:
# short option can have no following space, e.g. hg log -Rfoo
values.append(args.pop(pos)[2:])
/Mads
More information about the Mercurial-devel
mailing list