diff --git a/hgext/children.py b/hgext/children.py index da2fe9c55a..fe6a8f00bf 100644 --- a/hgext/children.py +++ b/hgext/children.py @@ -8,7 +8,11 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. -'''command to display child changesets''' +'''command to display child changesets (DEPRECATED) + +This extension is deprecated. You should use :hg:`log -r +"children(REV)"` instead. +''' from mercurial import cmdutil from mercurial.commands import templateopts diff --git a/hgext/fetch.py b/hgext/fetch.py index f6d3dbbe72..b909ef0964 100644 --- a/hgext/fetch.py +++ b/hgext/fetch.py @@ -5,7 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. -'''pull, update and merge in one command''' +'''pull, update and merge in one command (DEPRECATED)''' from mercurial.i18n import _ from mercurial.node import nullid, short diff --git a/mercurial/extensions.py b/mercurial/extensions.py index 9cfb49dede..801165d521 100644 --- a/mercurial/extensions.py +++ b/mercurial/extensions.py @@ -301,7 +301,7 @@ def disabledext(name): def disabledcmd(ui, cmd, strict=False): '''import disabled extensions until cmd is found. - returns (cmdname, extname, doc)''' + returns (cmdname, extname, module)''' paths = _disabledpaths(strip_init=True) if not paths: @@ -329,18 +329,19 @@ def disabledcmd(ui, cmd, strict=False): cmd = aliases[0] return (cmd, name, mod) + ext = None # first, search for an extension with the same name as the command path = paths.pop(cmd, None) if path: ext = findcmd(cmd, cmd, path) - if ext: - return ext - - # otherwise, interrogate each extension until there's a match - for name, path in paths.iteritems(): - ext = findcmd(cmd, name, path) - if ext: - return ext + if not ext: + # otherwise, interrogate each extension until there's a match + for name, path in paths.iteritems(): + ext = findcmd(cmd, name, path) + if ext: + break + if ext and 'DEPRECATED' not in ext.__doc__: + return ext raise error.UnknownCommand(cmd)