comparison mercurial/branchmap.py @ 42111:f0fa0fc4900a

branchmap: dynamically resolve type of branchcache class This is required to support subclassing. Thanks to Yuya for suggesting this in D6151. Differential Revision: https://phab.mercurial-scm.org/D6204
author Pulkit Goyal <pulkit@yandex-team.ru>
date Wed, 27 Mar 2019 21:33:04 +0300
parents b5511845f9d5
children 29c22496dd97
comparison
equal deleted inserted replaced
42110:3a7efcbdf288 42111:f0fa0fc4900a
303 """ returns all the heads """ 303 """ returns all the heads """
304 return self._entries.itervalues() 304 return self._entries.itervalues()
305 305
306 def copy(self): 306 def copy(self):
307 """return an deep copy of the branchcache object""" 307 """return an deep copy of the branchcache object"""
308 return branchcache( 308 return type(self)(
309 self._entries, self.tipnode, self.tiprev, self.filteredhash, 309 self._entries, self.tipnode, self.tiprev, self.filteredhash,
310 self._closednodes) 310 self._closednodes)
311 311
312 def write(self, repo): 312 def write(self, repo):
313 try: 313 try: