Skip to content
Snippets Groups Projects
Commit 88803a69 authored by Thomas Arendsen Hein's avatar Thomas Arendsen Hein
Browse files

fancyopts: Copy list arguments in command table before modifying.

Before this, executing
commands.dispatch(['log', '-r', '0'])
commands.dispatch(['log', '-r', 'tip'])
would look like:
hg log -r 0
hg log -r 0 -r tip

Reported by TK Soh, patch by Alexis S. L. Carvalho
parent 6e040f6c
No related branches found
No related tags found
No related merge requests found
......@@ -9,7 +9,10 @@
for s, l, d, c in options:
pl = l.replace('-', '_')
map['-'+s] = map['--'+l] = pl
state[pl] = d
if isinstance(d, list):
state[pl] = d[:]
else:
state[pl] = d
dt[pl] = type(d)
if (d is not None and d is not True and d is not False and
not callable(d)):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment