changeset 1849 | 360d0f8d9d6f |
parent 1848 | bb70ffebe77b |
child 1850 | 05f6c0d1bad8 |
--- 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: