diff mercurial/commands.py @ 18254:2dfe519d435d

debugdiscovery: report heads in sorted order
author Mads Kiilerich <mads at kiilerich.com>
date Wed, 12 Dec 2012 02:38:14 +0100
parents f730ed2e093d
children 7ca534f31a83
line wrap: on
line diff
--- a/mercurial/commands.py	Thu Jan 03 18:52:59 2013 +0100
+++ b/mercurial/commands.py	Wed Dec 12 02:38:14 2012 +0100
@@ -1827,8 +1827,8 @@
                                                                 force=True)
             common = set(common)
             if not opts.get('nonheads'):
-                ui.write(("unpruned common: %s\n") % " ".join([short(n)
-                                                            for n in common]))
+                ui.write(("unpruned common: %s\n") %
+                         " ".join(sorted(short(n) for n in common)))
                 dag = dagutil.revlogdag(repo.changelog)
                 all = dag.ancestorset(dag.internalizeall(common))
                 common = dag.externalizeall(dag.headsetofconnecteds(all))
@@ -1837,7 +1837,8 @@
         common = set(common)
         rheads = set(hds)
         lheads = set(repo.heads())
-        ui.write(("common heads: %s\n") % " ".join([short(n) for n in common]))
+        ui.write(("common heads: %s\n") %
+                 " ".join(sorted(short(n) for n in common)))
         if lheads <= common:
             ui.write(("local is subset\n"))
         elif rheads <= common:
@@ -2134,7 +2135,8 @@
                 ui.write(' ')
                 ui.write(hex(repl))
             ui.write(' %X ' % m._data[2])
-            ui.write(m.metadata())
+            ui.write('{%s}' % (', '.join('%r: %r' % t for t in
+                                         sorted(m.metadata().items()))))
             ui.write('\n')
 
 @command('debugpushkey', [], _('REPO NAMESPACE [KEY OLD NEW]'))