def command(name=None, cls=None, **attrs):
 if (cls is None):
  cls = Command
 def decorator(f):
  cmd = _make_command(f, name, attrs, cls)
  cmd.__doc__ = f.__doc__
  return cmd
 return decorator

def command ( name = None , cls = None , ** attrs ) : if ( cls is None ) : cls = Command def decorator ( f ) : cmd = _make_command ( f , name , attrs , cls ) cmd . __doc__ = f . __doc__ return cmd return decorator
require the hg command-line tool .