mjpieters created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers.
REVISION SUMMARY The _branchcache global gives us a reference for super() to use even if an extension subclasses branchmap.branchcache then replaces the class in the module. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D5292 AFFECTED FILES mercurial/branchmap.py CHANGE DETAILS diff --git a/mercurial/branchmap.py b/mercurial/branchmap.py --- a/mercurial/branchmap.py +++ b/mercurial/branchmap.py @@ -211,7 +211,7 @@ def __init__(self, entries=(), tipnode=nullid, tiprev=nullrev, filteredhash=None, closednodes=None): - super(branchcache, self).__init__(entries) + super(_branchcache, self).__init__(entries) self.tipnode = tipnode self.tiprev = tiprev self.filteredhash = filteredhash @@ -369,6 +369,11 @@ self.write(repo) +# keep a private reference to the class object so that subclasses that +# replace the branchcache class do not break super() +_branchcache = branchcache + + class remotebranchcache(branchcache): """Branchmap info for a remote connection, should not write locally""" def write(self, repo): To: mjpieters, #hg-reviewers Cc: mercurial-devel _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel