[PATCH 1 of 5] extensions: drop dead code trying to exclude deprecated disabled commands
Yuya Nishihara
yuya at tcha.org
Fri May 11 13:29:28 UTC 2018
# 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
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)
More information about the Mercurial-devel
mailing list