[PATCH 1 of 5] extensions: drop dead code trying to exclude deprecated disabled commands

Gregory Szorc gregory.szorc at gmail.com
Fri May 11 23:47:15 EDT 2018


On Fri, May 11, 2018 at 6:29 AM, Yuya Nishihara <yuya at tcha.org> wrote:

> # HG changeset patch
> # User Yuya Nishihara <yuya at tcha.org>
> # Date 1525338823 -32400
> #      Thu May 03 18:13:43 2018 +0900
> # Node ID 7eca762c4cb88d42c9239c60fee743327f477c1a
> # Parent  e2effc80f4388b5c9dc7effa3bd895350b5cf4ce
> extensions: drop dead code trying to exclude deprecated disabled commands
>

I queued parts 1-3 then ran out of review steam.


>
> Here 'ext' is a tuple, which means ext.__doc__ describes about the Python
> tuple type. Fixing this would break 'hg help glog', which currently shows
> some nice explanation, so this patch just removes the dead code.
>
>   $ hg help glog
>   'glog' is provided by the following extension:
>
>       graphlog      command to view revision graphs from a shell
> (DEPRECATED)
>
>   (use 'hg help extensions' for information on enabling extensions)
>
> diff --git a/mercurial/extensions.py b/mercurial/extensions.py
> --- a/mercurial/extensions.py
> +++ b/mercurial/extensions.py
> @@ -696,7 +696,7 @@ def disabledcmd(ui, cmd, strict=False):
>              ext = findcmd(cmd, name, path)
>              if ext:
>                  break
> -    if ext and 'DEPRECATED' not in ext.__doc__:
> +    if ext:
>          return ext
>
>      raise error.UnknownCommand(cmd)
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20180511/e8327d3b/attachment.html>


More information about the Mercurial-devel mailing list