[PATCH 14 of 35] cmdutil: better document command()
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Thu May 8 19:19:14 UTC 2014
On 05/04/2014 10:51 PM, Gregory Szorc wrote:
> # HG changeset patch
> # User Gregory Szorc <gregory.szorc at gmail.com>
> # Date 1399254304 25200
> # Sun May 04 18:45:04 2014 -0700
> # Branch stable
> # Node ID ca7af5ec72526886c534970251a47e3f706f1203
> # Parent c2cc0594c04637822287e69274ff6512256978b0
> cmdutil: better document command()
>
> diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
> --- a/mercurial/cmdutil.py
> +++ b/mercurial/cmdutil.py
> @@ -2408,18 +2408,34 @@ def _performrevert(repo, parents, ctx, r
>
> copied = copies.pathcopies(repo[parent], ctx)
>
> for f in add[0] + undelete[0] + revert[0]:
> if f in copied:
> repo.dirstate.copy(copied[f], f)
>
> def command(table):
> - '''returns a function object bound to table which can be used as
> - a decorator for populating table as a command table'''
> + """Returns a function object to be used as a decorator for making commands.
> +
> + This function receives a command table as its argument. The table should
> + be a commandtable instance, but a regular dict will be accepted for
> + backwards compatibility.
There is no such thing as a commandtable instance… And I did not see any
reference to that in the rest of the series. Vestige of a dead branch?
for not I would rewrote it:
This function receives a command table as its argument. The tablee
should be a dict.
--
Pierre-Yves David
More information about the Mercurial-devel
mailing list