mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
extensions: don't suggest commands from deprecated extensions
This commit is contained in:
parent
587cefc90e
commit
7724ee63b3
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user