branch | stable |
changeset 15600 | 195dbd1cef0c |
parent 15231 | cd6f10dccf16 |
child 15603 | 36d7a0c7505f |
child 15634 | cfc15cbecc5e |
--- a/mercurial/cmdutil.py Thu Dec 01 20:42:24 2011 +0100 +++ b/mercurial/cmdutil.py Thu Dec 01 15:51:36 2011 -0600 @@ -23,7 +23,14 @@ """ choice = {} debugchoice = {} - for e in table.keys(): + + if cmd in table: + # short-circuit exact matches, "log" alias beats "^log|history" + keys = [cmd] + else: + keys = table.keys() + + for e in keys: aliases = parsealiases(e) found = None if cmd in aliases: