cmdutil: make private copies of option lists to avoid sharing monkeypatches

This commit is contained in:
Matt Mackall 2011-05-26 17:15:35 -05:00
parent a7eca9ebe7
commit 5f2364be24

View File

@ -1215,9 +1215,9 @@ def command(table):
def cmd(name, options, synopsis=None):
def decorator(func):
if synopsis:
table[name] = func, options, synopsis
table[name] = func, options[:], synopsis
else:
table[name] = func, options
table[name] = func, options[:]
return func
return decorator