Mercurial > hg
changeset 18235:9807e7d596c3
cmdutil: make options argument optional
There is not reason to force passing of an empty options list.
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Fri, 04 Jan 2013 13:48:07 +0100 |
parents | a55b06885cda |
children | 819520ca213d |
files | mercurial/cmdutil.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Mon Jan 07 17:23:25 2013 +0100 +++ b/mercurial/cmdutil.py Fri Jan 04 13:48:07 2013 +0100 @@ -2014,12 +2014,12 @@ '''returns a function object bound to table which can be used as a decorator for populating table as a command table''' - def cmd(name, options, synopsis=None): + def cmd(name, options=(), synopsis=None): def decorator(func): if synopsis: - table[name] = func, options[:], synopsis + table[name] = func, list(options), synopsis else: - table[name] = func, options[:] + table[name] = func, list(options) return func return decorator