Mercurial > hg
changeset 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 | 3a7efcbdf288 |
children | 29c22496dd97 |
files | mercurial/branchmap.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/branchmap.py Fri Apr 12 09:41:08 2019 -0700 +++ b/mercurial/branchmap.py Wed Mar 27 21:33:04 2019 +0300 @@ -305,7 +305,7 @@ def copy(self): """return an deep copy of the branchcache object""" - return branchcache( + return type(self)( self._entries, self.tipnode, self.tiprev, self.filteredhash, self._closednodes)