[PATCH 2 of 4] extensions: don't suggest commands from deprecated extensions

Augie Fackler raf at durin42.com
Fri May 11 06:17:50 CDT 2012


# HG changeset patch
# User Augie Fackler <raf at durin42.com>
# Date 1336729364 18000
# Node ID 998e4a77aace9cb58b9d35f47d0e942ada6c85ac
# Parent  6b8df383e8906789f5d7a92d5ea5f16b158e46c2
extensions: don't suggest commands from deprecated extensions

diff --git a/mercurial/extensions.py b/mercurial/extensions.py
--- a/mercurial/extensions.py
+++ b/mercurial/extensions.py
@@ -340,7 +340,9 @@
     for name, path in paths.iteritems():
         ext = findcmd(cmd, name, path)
         if ext:
-            return ext
+            doc = getattr(ext[2], '__doc__', '')
+            if 'DEPRECATED' not in doc:
+                return ext
 
     raise error.UnknownCommand(cmd)
 


More information about the Mercurial-devel mailing list