From 587cefc90edf3bc5a767b5b3b878369386bc96ff Mon Sep 17 00:00:00 2001 From: Augie Fackler Date: Fri, 11 May 2012 04:33:33 -0500 Subject: [PATCH 1/5] extensions: fix documentation of disabledcmd return value --- mercurial/extensions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mercurial/extensions.py b/mercurial/extensions.py index 9cfb49dede..ac5532dd9a 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: From 7724ee63b3eadd35afba94ef3fb2ac664ad26fcb Mon Sep 17 00:00:00 2001 From: Martin Geisler Date: Fri, 11 May 2012 14:00:51 +0200 Subject: [PATCH 2/5] extensions: don't suggest commands from deprecated extensions --- mercurial/extensions.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/mercurial/extensions.py b/mercurial/extensions.py index ac5532dd9a..801165d521 100644 --- a/mercurial/extensions.py +++ b/mercurial/extensions.py @@ -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) From 4604cfdca7e3c914f7898da17a3eeb861becbc93 Mon Sep 17 00:00:00 2001 From: Augie Fackler Date: Fri, 11 May 2012 06:15:46 -0500 Subject: [PATCH 3/5] children: mark extension as deprecated --- hgext/children.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hgext/children.py b/hgext/children.py index da2fe9c55a..1b6f58a5ad 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($revision)"` +instead. +''' from mercurial import cmdutil from mercurial.commands import templateopts From dd19975a9ff8a8b7431e81fd813969e07f110783 Mon Sep 17 00:00:00 2001 From: Augie Fackler Date: Fri, 11 May 2012 04:42:29 -0500 Subject: [PATCH 4/5] fetch: mark extension as deprecated --- hgext/fetch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From e1e2ffe1ea5f8b579bbd54414d6556c4923ef88b Mon Sep 17 00:00:00 2001 From: Martin Geisler Date: Fri, 11 May 2012 13:42:37 +0200 Subject: [PATCH 5/5] children: use hg reST role for example --- hgext/children.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hgext/children.py b/hgext/children.py index 1b6f58a5ad..fe6a8f00bf 100644 --- a/hgext/children.py +++ b/hgext/children.py @@ -10,8 +10,8 @@ '''command to display child changesets (DEPRECATED) -This extension is deprecated. You should use `hg log -r "children($revision)"` -instead. +This extension is deprecated. You should use :hg:`log -r +"children(REV)"` instead. ''' from mercurial import cmdutil