Mercurial > public > mercurial-scm > hg
comparison mercurial/cmdutil.py @ 15603:36d7a0c7505f
merge with stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 01 Dec 2011 15:57:10 -0600 |
parents | 9e99d2bbb1b1 195dbd1cef0c |
children | 4841035f37b6 |
comparison
equal
deleted
inserted
replaced
15596:2555f441a32f | 15603:36d7a0c7505f |
---|---|
21 for each matching command. | 21 for each matching command. |
22 Return debug commands (or their aliases) only if no normal command matches. | 22 Return debug commands (or their aliases) only if no normal command matches. |
23 """ | 23 """ |
24 choice = {} | 24 choice = {} |
25 debugchoice = {} | 25 debugchoice = {} |
26 for e in table.keys(): | 26 |
27 if cmd in table: | |
28 # short-circuit exact matches, "log" alias beats "^log|history" | |
29 keys = [cmd] | |
30 else: | |
31 keys = table.keys() | |
32 | |
33 for e in keys: | |
27 aliases = parsealiases(e) | 34 aliases = parsealiases(e) |
28 found = None | 35 found = None |
29 if cmd in aliases: | 36 if cmd in aliases: |
30 found = cmd | 37 found = cmd |
31 elif not strict: | 38 elif not strict: |