[PATCH 08 of 10 V2] branchmap: _updatebranchmap does not need to be filtered

pierre-yves.david at logilab.fr pierre-yves.david at logilab.fr
Thu Dec 20 08:08:38 CST 2012


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at logilab.fr>
# Date 1355924858 -3600
# Node ID 9609e1e17c9ef70cbaeac49bf3a30d823a626382
# Parent  b4b7a64c60f390c15301e0520a8f1b93466f22d8
branchmap: _updatebranchmap does not need to be filtered

The `_updatebranchmap` method on repo does not need to be filtered as all
callers are already handling filtering themself.

The fact it is filtered may had even lead to buggy behaviors, but by chances the method
make very sparse use of the repo object.

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -711,11 +711,10 @@ class localrepository(object):
         bt = {}
         for bn, heads in self.branchmap().iteritems():
             bt[bn] = self._branchtip(heads)
         return bt
 
-    @unfilteredmethod # Until we get a smarter cache management
     def _updatebranchcache(self, partial, ctxgen):
         """Given a branchhead cache, partial, that may have extra nodes or be
         missing heads, and a generator of nodes that are at least a superset of
         heads missing, this function updates partial to be correct.
         """


More information about the Mercurial-devel mailing list