[PATCH 1 of 2] dispatch: handle global options with dashes properly
Brodie Rao
brodie at bitheap.org
Sun Aug 22 03:17:15 UTC 2010
# HG changeset patch
# User Brodie Rao <brodie at bitheap.org>
# Date 1282446695 14400
# Node ID 2f351b05d85db8e243156141398217bdf30f01c5
# Parent bade7a9c5c074d6044040948dce09e6da5472cc1
dispatch: handle global options with dashes properly
diff -r bade7a9c5c07 -r 2f351b05d85d mercurial/dispatch.py
--- a/mercurial/dispatch.py Sat Aug 21 19:31:59 2010 +0200
+++ b/mercurial/dispatch.py Sat Aug 21 23:11:35 2010 -0400
@@ -324,7 +324,7 @@ def _parse(ui, args):
# combine global options into local
for o in commands.globalopts:
- c.append((o[0], o[1], options[o[1]], o[3]))
+ c.append((o[0], o[1], options[o[1].replace('-', '_')], o[3]))
try:
args = fancyopts.fancyopts(args, c, cmdoptions, True)
@@ -333,7 +333,7 @@ def _parse(ui, args):
# separate global options back out
for o in commands.globalopts:
- n = o[1]
+ n = o[1].replace('-', '_')
options[n] = cmdoptions[n]
del cmdoptions[n]
More information about the Mercurial-devel
mailing list