--- a/mercurial/branchmap.py Mon Jan 21 16:04:48 2019 +0000
+++ b/mercurial/branchmap.py Mon Jan 21 16:37:23 2019 +0000
@@ -63,7 +63,6 @@
revs.extend(cl.revs(start=bcache.tiprev + 1))
if revs:
bcache.update(repo, revs)
- bcache.write(repo)
assert bcache.validfor(repo), filtername
repo._branchcaches[repo.filtername] = bcache
@@ -242,8 +241,9 @@
def copy(self):
"""return an deep copy of the branchcache object"""
- return branchcache(self, self.tipnode, self.tiprev, self.filteredhash,
- self._closednodes)
+ return type(self)(
+ self, self.tipnode, self.tiprev, self.filteredhash,
+ self._closednodes)
def write(self, repo):
try:
@@ -332,6 +332,15 @@
repo.ui.log('branchcache', 'updated %s branch cache in %.4f seconds\n',
repo.filtername, duration)
+ self.write(repo)
+
+
+class remotebranchcache(branchcache):
+ """Branchmap info for a remote connection, should not write locally"""
+ def write(self, repo):
+ pass
+
+
# Revision branch info cache
_rbcversion = '-v1'