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

login
register
mail settings
Submitter Pierre-Yves David
Date Dec. 20, 2012, 2:08 p.m.
Message ID <9609e1e17c9ef70cbaea.1356012518@crater2.logilab.fr>
Download mbox | patch
Permalink /patch/210/
State Accepted
Commit 5264464b5f68f17d8eec9cbddcab6e86391c577e
Headers show

Comments

Pierre-Yves David - Dec. 20, 2012, 2:08 p.m.
# 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.

Patch

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.
         """