[PATCH] record: use cmdutil.command decorator

timeless timeless at gmail.com
Sun May 22 08:49:06 CDT 2011


On Sun, May 22, 2011 at 6:30 AM, Idan Kamara <idankk86 at gmail.com> wrote:
> record: use cmdutil.command decorator

> +cmdtable = {}
> +command = cmdutil.command(cmdtable)
> + at command("record",
> +         commands.table['^commit|ci'][1], # same options as commit
> +          _('hg record [OPTION]... [FILE]...'))

> -cmdtable = {
> -    "record":
> -        (record, commands.table['^commit|ci'][1], # same options as commit
> -         _('hg record [OPTION]... [FILE]...')),
> -    "qrecord":
> -        (qrecord, {}, # placeholder until mq is available
> -         _('hg qrecord [OPTION]... PATCH [FILE]...')),
> -}

this seems like you'll break hg help qrecord in some case, did all the
tests pass?
-- sorry, i'm @MeeGo Conf SF and don't have time to play (my Phone
thought it was @AMS and decided to alarm +9hrs early...).

> +cmdtable["qrecord"] = \
> +    (qrecord, {}, # placeholder until mq is available
> +     _('hg qrecord [OPTION]... PATCH [FILE]...'))

> -    qcmdtable = {
> -    "qrecord":
> +    cmdtable["qrecord"] = \
>         (qrecord, mq.cmdtable['^qnew'][1], # same options as qnew


More information about the Mercurial-devel mailing list