Mercurial > evolve
changeset 4521:5303b9128714 stable
serverminitopic: add compatibility for branchcache that now uses self._entries
A copy of 9b0cde5efbc9.
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Wed, 17 Apr 2019 16:18:22 +0800 |
parents | e23f85bc43ed |
children | 001eb0f11bcd |
files | hgext3rd/serverminitopic.py |
diffstat | 1 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/serverminitopic.py Fri Apr 12 02:20:24 2019 +0200 +++ b/hgext3rd/serverminitopic.py Wed Apr 17 16:18:22 2019 +0800 @@ -159,8 +159,13 @@ def copy(self): """return an deep copy of the branchcache object""" - new = self.__class__(self, self.tipnode, self.tiprev, self.filteredhash, - self._closednodes) + if util.safehasattr(self, '_entries'): + _entries = self._entries + else: + # hg <= 4.9 (624d6683c705, b137a6793c51) + _entries = self + new = self.__class__(_entries, self.tipnode, self.tiprev, + self.filteredhash, self._closednodes) new.phaseshash = self.phaseshash return new