--- a/mercurial/cmdutil.py Mon Jan 26 15:43:13 2015 -0500
+++ b/mercurial/cmdutil.py Tue Feb 10 15:59:12 2015 -0500
@@ -34,8 +34,10 @@
else:
keys = table.keys()
+ allcmds = []
for e in keys:
aliases = parsealiases(e)
+ allcmds.extend(aliases)
found = None
if cmd in aliases:
found = cmd
@@ -53,11 +55,11 @@
if not choice and debugchoice:
choice = debugchoice
- return choice
+ return choice, allcmds
def findcmd(cmd, table, strict=True):
"""Return (aliases, command table entry) for command string."""
- choice = findpossible(cmd, table, strict)
+ choice, allcmds = findpossible(cmd, table, strict)
if cmd in choice:
return choice[cmd]
@@ -70,7 +72,7 @@
if choice:
return choice.values()[0]
- raise error.UnknownCommand(cmd)
+ raise error.UnknownCommand(cmd, allcmds)
def findrepo(p):
while not os.path.isdir(os.path.join(p, ".hg")):