changeset 18113:da1714bd0250

branchmap: factorise access to changelog in updatebranchcache This prepares merge of `updatebranchcache` and `_branchtags`.
author Pierre-Yves David <pierre-yves.david@logilab.fr>
date Wed, 19 Dec 2012 17:39:49 +0100
parents 569091b938a9
children 35ce17796e0e
files mercurial/localrepo.py
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/localrepo.py	Thu Dec 20 11:52:50 2012 +0100
+++ b/mercurial/localrepo.py	Wed Dec 19 17:39:49 2012 +0100
@@ -684,16 +684,17 @@
 
     @unfilteredmethod # Until we get a smarter cache management
     def updatebranchcache(self):
-        tip = self.changelog.tip()
+        cl = self.changelog
+        tip = cl.tip()
         if self._branchcache is not None and self._branchcachetip == tip:
             return
 
         oldtip = self._branchcachetip
         self._branchcachetip = tip
-        if oldtip is None or oldtip not in self.changelog.nodemap:
+        if oldtip is None or oldtip not in cl.nodemap:
             partial, last, lrev = self._readbranchcache()
         else:
-            lrev = self.changelog.rev(oldtip)
+            lrev = cl.rev(oldtip)
             partial = self._branchcache
 
         self._branchtags(partial, lrev)