Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/extensions.py @ 38017:5b60f7d652f2
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)
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Thu, 03 May 2018 18:13:43 +0900 |
parents | fb0de0bcd297 |
children | b45f4c1532c0 |
comparison
equal
deleted
inserted
replaced
38016:59f1e33f74a6 | 38017:5b60f7d652f2 |
---|---|
694 # otherwise, interrogate each extension until there's a match | 694 # otherwise, interrogate each extension until there's a match |
695 for name, path in paths.iteritems(): | 695 for name, path in paths.iteritems(): |
696 ext = findcmd(cmd, name, path) | 696 ext = findcmd(cmd, name, path) |
697 if ext: | 697 if ext: |
698 break | 698 break |
699 if ext and 'DEPRECATED' not in ext.__doc__: | 699 if ext: |
700 return ext | 700 return ext |
701 | 701 |
702 raise error.UnknownCommand(cmd) | 702 raise error.UnknownCommand(cmd) |
703 | 703 |
704 def enabled(shortname=True): | 704 def enabled(shortname=True): |