mercurial/cmdutil.py
branchstable
changeset 15600 195dbd1cef0c
parent 15231 cd6f10dccf16
child 15603 36d7a0c7505f
child 15634 cfc15cbecc5e
equal deleted inserted replaced
15599:c6be93a4c378 15600:195dbd1cef0c
    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: