##// END OF EJS Templates
branchcache: fix the copy code...
marmoute -
r52346:bb861205 default
parent child Browse files
Show More
@@ -432,16 +432,26 b' class branchcache:'
432 return self._entries.values()
432 return self._entries.values()
433
433
434 def copy(self, repo):
434 def copy(self, repo):
435 """return an deep copy of the branchcache object"""
435 """return a deep copy of the branchcache object"""
436 return type(self)(
436 other = type(self)(
437 repo,
437 repo=repo,
438 self._entries,
438 # we always do a shally copy of self._entries, and the values is
439 self.tipnode,
439 # always replaced, so no need to deepcopy until the above remains
440 self.tiprev,
440 # true.
441 self.filteredhash,
441 entries=self._entries,
442 self._closednodes,
442 tipnode=self.tipnode,
443 tiprev=self.tiprev,
444 filteredhash=self.filteredhash,
445 closednodes=set(self._closednodes),
443 verify_node=self._verify_node,
446 verify_node=self._verify_node,
444 )
447 )
448 # we copy will likely schedule a write anyway, but that does not seems
449 # to hurt to overschedule
450 other._delayed = self._delayed
451 # also copy information about the current verification state
452 other._closedverified = self._closedverified
453 other._verifiedbranches = set(self._verifiedbranches)
454 return other
445
455
446 def write(self, repo):
456 def write(self, repo):
447 assert self._filtername == repo.filtername, (
457 assert self._filtername == repo.filtername, (
General Comments 0
You need to be logged in to leave comments. Login now