hgext3rd/serverminitopic.py
changeset 4526 ede9b37572f0
parent 4521 5303b9128714
child 4758 f0ecf2137824
equal deleted inserted replaced
4520:36632d514af2 4526:ede9b37572f0
   157             super(_topiccache, self).__init__(*args, **kwargs)
   157             super(_topiccache, self).__init__(*args, **kwargs)
   158         self.phaseshash = None
   158         self.phaseshash = None
   159 
   159 
   160     def copy(self):
   160     def copy(self):
   161         """return an deep copy of the branchcache object"""
   161         """return an deep copy of the branchcache object"""
   162         new = self.__class__(self, self.tipnode, self.tiprev, self.filteredhash,
   162         if util.safehasattr(self, '_entries'):
   163                              self._closednodes)
   163             _entries = self._entries
       
   164         else:
       
   165             # hg <= 4.9 (624d6683c705, b137a6793c51)
       
   166             _entries = self
       
   167         new = self.__class__(_entries, self.tipnode, self.tiprev,
       
   168                              self.filteredhash, self._closednodes)
   164         new.phaseshash = self.phaseshash
   169         new.phaseshash = self.phaseshash
   165         return new
   170         return new
   166 
   171 
   167     def validfor(self, repo):
   172     def validfor(self, repo):
   168         """Is the cache content valid regarding a repo
   173         """Is the cache content valid regarding a repo