Mercurial > hg
changeset 1849:360d0f8d9d6f
Show ambiguous aliases, if they are not simple abbreviations. Sort output.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Tue, 07 Mar 2006 08:41:13 +0100 |
parents | bb70ffebe77b |
children | 05f6c0d1bad8 |
files | mercurial/commands.py |
diffstat | 1 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Tue Mar 07 08:05:17 2006 +0100 +++ b/mercurial/commands.py Tue Mar 07 08:41:13 2006 +0100 @@ -2689,7 +2689,14 @@ break if len(choice) > 1: - clist = [x[0][0] for x in choice] + clist = [] + for aliases, table_e in choice: + if aliases[0].startswith(cmd): + clist.append(aliases[0]) + for a in aliases[1:]: + if a.startswith(cmd) and not aliases[0].startswith(a): + clist.append(a) + clist.sort() raise AmbiguousCommand(cmd, clist) if choice: