changeset 18123:6fb3b8c61775

branchmap: `stream_in` write remote branchcache to local one The previous code was writing it to a non existent `branchcache` attribute. We now write is to the proper `_branchcache` attribute and initialize the `_branchcachetip` at the same time. We keep writing it to disk, the previous code had this part right.
author Pierre-Yves David <pierre-yves.david@logilab.fr>
date Sat, 22 Dec 2012 01:34:23 +0100
parents f8a13f061a8a
children 79db6d40bced
files mercurial/localrepo.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/localrepo.py	Thu Dec 20 14:45:17 2012 +0100
+++ b/mercurial/localrepo.py	Sat Dec 22 01:34:23 2012 +0100
@@ -2492,12 +2492,12 @@
                 for bheads in rbranchmap.itervalues():
                     rbheads.extend(bheads)
 
-                self.branchcache = rbranchmap
                 if rbheads:
                     rtiprev = max((int(self.changelog.rev(node))
                             for node in rbheads))
-                    branchmap.write(self, self.branchcache,
-                            self[rtiprev].node(), rtiprev)
+                    self._branchcache = rbranchmap
+                    rtipnode = self._branchcachetip = self[rtiprev].node()
+                    branchmap.write(self, self._branchcache, rtipnode, rtiprev)
             self.invalidate()
             return len(self.heads()) + 1
         finally: