mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 08:18:15 +03:00
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.
This commit is contained in:
parent
dc5b484bd1
commit
81a9a63850
@ -2492,12 +2492,12 @@ class localrepository(object):
|
||||
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:
|
||||
|
Loading…
Reference in New Issue
Block a user