Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/branchmap.py @ 18357:a4ab37ca887b
localrepo: store branchheads sorted
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Tue, 15 Jan 2013 02:59:12 +0100 |
parents | 0eed2546118a |
children | d6b3b36f1db2 |
comparison
equal
deleted
inserted
replaced
18356:752f77ef7202 | 18357:a4ab37ca887b |
---|---|
133 f = repo.opener(_filename(repo), "w", atomictemp=True) | 133 f = repo.opener(_filename(repo), "w", atomictemp=True) |
134 cachekey = [hex(self.tipnode), str(self.tiprev)] | 134 cachekey = [hex(self.tipnode), str(self.tiprev)] |
135 if self.filteredhash is not None: | 135 if self.filteredhash is not None: |
136 cachekey.append(hex(self.filteredhash)) | 136 cachekey.append(hex(self.filteredhash)) |
137 f.write(" ".join(cachekey) + '\n') | 137 f.write(" ".join(cachekey) + '\n') |
138 for label, nodes in self.iteritems(): | 138 for label, nodes in sorted(self.iteritems()): |
139 for node in nodes: | 139 for node in nodes: |
140 f.write("%s %s\n" % (hex(node), encoding.fromlocal(label))) | 140 f.write("%s %s\n" % (hex(node), encoding.fromlocal(label))) |
141 f.close() | 141 f.close() |
142 except (IOError, OSError, util.Abort): | 142 except (IOError, OSError, util.Abort): |
143 # Abort may be raise by read only opener | 143 # Abort may be raise by read only opener |