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

login
register
mail settings
Submitter Pierre-Yves David
Date Dec. 19, 2012, 1:53 p.m.
Message ID <5281ce24eb459523cd86.1355925204@crater1.logilab.fr>
Download mbox | patch
Permalink /patch/193/
State Superseded, archived
Commit 5264464b5f68f17d8eec9cbddcab6e86391c577e
Headers show

Comments

Pierre-Yves David - Dec. 19, 2012, 1:53 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at logilab.fr>
# Date 1355924858 -3600
# Node ID 5281ce24eb459523cd86749149d0de662d5b586f
# Parent  2ca3a4c5731b87f7c544bc497c4477e9a572006a
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
@@ -709,11 +709,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.
         """