# HG changeset patch # User Dirkjan Ochtman # Date 1265456853 -3600 # Node ID ec5240a22f4a8479ac6f58d643a667498eb19eb9 # Parent d8c0e6c4379196a9128de11a3693e7b9cfcc662f commands: always order heads recent to oldest diff -r d8c0e6c43791 -r ec5240a22f4a mercurial/commands.py --- a/mercurial/commands.py Sat Feb 06 12:47:24 2010 +0100 +++ b/mercurial/commands.py Sat Feb 06 12:47:33 2010 +0100 @@ -1447,9 +1447,10 @@ if not heads: return 1 + heads = sorted((repo[h] for h in heads), key=lambda x: -x.rev()) displayer = cmdutil.show_changeset(ui, repo, opts) - for n in heads: - displayer.show(repo[n]) + for ctx in heads: + displayer.show(ctx) displayer.close() def help_(ui, name=None, with_version=False): diff -r d8c0e6c43791 -r ec5240a22f4a tests/test-bheads.out --- a/tests/test-bheads.out Sat Feb 06 12:47:24 2010 +0100 +++ b/tests/test-bheads.out Sat Feb 06 12:47:33 2010 +0100 @@ -147,8 +147,8 @@ abort: unknown revision 'z'! ------- ======= -0: Adding root node -1: Adding a branch 7: Adding c branch 6: Merging b branch head 2 and b branch head 3 3: Adding b branch head 1 +1: Adding a branch +0: Adding root node