Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 1520:95ee4f12fbd9
Allow ambiguous command shortcut if only an alias for the same command.
Currently the only example for this is 'hg o' or 'hg ou' as a shortcut for
'hg out' and 'hg outgoing'.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Wed, 09 Nov 2005 22:31:18 +0100 |
parents | 5b19dea9d4fd |
children | c85e5bbfd141 |
comparison
equal
deleted
inserted
replaced
1519:5b19dea9d4fd | 1520:95ee4f12fbd9 |
---|---|
2386 if a.startswith(cmd): | 2386 if a.startswith(cmd): |
2387 if choice: | 2387 if choice: |
2388 raise AmbiguousCommand(cmd) | 2388 raise AmbiguousCommand(cmd) |
2389 else: | 2389 else: |
2390 choice = aliases, table[e] | 2390 choice = aliases, table[e] |
2391 break | |
2391 if choice: | 2392 if choice: |
2392 return choice | 2393 return choice |
2393 | 2394 |
2394 raise UnknownCommand(cmd) | 2395 raise UnknownCommand(cmd) |
2395 | 2396 |