# HG changeset patch # User Thomas Arendsen Hein # Date 1141717273 -3600 # Node ID 360d0f8d9d6f8201afd79fbc7619195ed4af3d09 # Parent bb70ffebe77b222df4164e0e05a23729b509eea4 Show ambiguous aliases, if they are not simple abbreviations. Sort output. diff -r bb70ffebe77b -r 360d0f8d9d6f mercurial/commands.py --- 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: