mercurial/cmdutil.py
changeset 15603 36d7a0c7505f
parent 15410 9e99d2bbb1b1
parent 15600 195dbd1cef0c
child 15636 4841035f37b6
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: