Show More
@@ -63,7 +63,6 b' def updatecache(repo):' | |||
|
63 | 63 | revs.extend(cl.revs(start=bcache.tiprev + 1)) |
|
64 | 64 | if revs: |
|
65 | 65 | bcache.update(repo, revs) |
|
66 | bcache.write(repo) | |
|
67 | 66 | |
|
68 | 67 | assert bcache.validfor(repo), filtername |
|
69 | 68 | repo._branchcaches[repo.filtername] = bcache |
@@ -242,7 +241,8 b' class branchcache(dict):' | |||
|
242 | 241 | |
|
243 | 242 | def copy(self): |
|
244 | 243 | """return an deep copy of the branchcache object""" |
|
245 | return branchcache(self, self.tipnode, self.tiprev, self.filteredhash, | |
|
244 | return type(self)( | |
|
245 | self, self.tipnode, self.tiprev, self.filteredhash, | |
|
246 | 246 |
|
|
247 | 247 | |
|
248 | 248 | def write(self, repo): |
@@ -332,6 +332,15 b' class branchcache(dict):' | |||
|
332 | 332 | repo.ui.log('branchcache', 'updated %s branch cache in %.4f seconds\n', |
|
333 | 333 | repo.filtername, duration) |
|
334 | 334 | |
|
335 | self.write(repo) | |
|
336 | ||
|
337 | ||
|
338 | class remotebranchcache(branchcache): | |
|
339 | """Branchmap info for a remote connection, should not write locally""" | |
|
340 | def write(self, repo): | |
|
341 | pass | |
|
342 | ||
|
343 | ||
|
335 | 344 | # Revision branch info cache |
|
336 | 345 | |
|
337 | 346 | _rbcversion = '-v1' |
@@ -238,7 +238,7 b' def _headssummary(pushop):' | |||
|
238 | 238 | |
|
239 | 239 | # D. Update newmap with outgoing changes. |
|
240 | 240 | # This will possibly add new heads and remove existing ones. |
|
241 | newmap = branchmap.branchcache((branch, heads[1]) | |
|
241 | newmap = branchmap.remotebranchcache((branch, heads[1]) | |
|
242 | 242 | for branch, heads in headssum.iteritems() |
|
243 | 243 | if heads[0] is not None) |
|
244 | 244 | newmap.update(repo, (ctx.rev() for ctx in missingctx)) |
General Comments 0
You need to be logged in to leave comments.
Login now