changeset 18357:a4ab37ca887b

localrepo: store branchheads sorted
author Mads Kiilerich <mads@kiilerich.com>
date Tue, 15 Jan 2013 02:59:12 +0100
parents 752f77ef7202
children 93293813d753
files mercurial/branchmap.py tests/test-newbranch.t
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/branchmap.py	Wed Dec 12 02:38:14 2012 +0100
+++ b/mercurial/branchmap.py	Tue Jan 15 02:59:12 2013 +0100
@@ -135,7 +135,7 @@
             if self.filteredhash is not None:
                 cachekey.append(hex(self.filteredhash))
             f.write(" ".join(cachekey) + '\n')
-            for label, nodes in self.iteritems():
+            for label, nodes in sorted(self.iteritems()):
                 for node in nodes:
                     f.write("%s %s\n" % (hex(node), encoding.fromlocal(label)))
             f.close()
--- a/tests/test-newbranch.t	Wed Dec 12 02:38:14 2012 +0100
+++ b/tests/test-newbranch.t	Tue Jan 15 02:59:12 2013 +0100
@@ -162,9 +162,9 @@
   corrupted
   === .hg/cache/branchheads-unserved ===
   adf1a74a7f7b4cd193d12992f5d0d6a004ed21d6 4
+  c21617b13b220988e7a2e26290fbe4325ffa7139 bar
   1c28f494dae69a2f8fc815059d257eccf3fcfe75 default
   adf1a74a7f7b4cd193d12992f5d0d6a004ed21d6 foo
-  c21617b13b220988e7a2e26290fbe4325ffa7139 bar
 
 Push should update the branch cache:
 
@@ -186,9 +186,9 @@
   $ (cd ../target/; listbranchcaches)
   === .hg/cache/branchheads-impactable ===
   adf1a74a7f7b4cd193d12992f5d0d6a004ed21d6 4
+  c21617b13b220988e7a2e26290fbe4325ffa7139 bar
   1c28f494dae69a2f8fc815059d257eccf3fcfe75 default
   adf1a74a7f7b4cd193d12992f5d0d6a004ed21d6 foo
-  c21617b13b220988e7a2e26290fbe4325ffa7139 bar
 
 Update with no arguments: tipmost revision of the current branch: