# 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 --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -2689,7 +2689,14 @@ def find(cmd): 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: