mercurial/branchmap.py
changeset 18218 d5655e742457
parent 18214 cd4c75200206
child 18232 dd0b636b0b65
--- a/mercurial/branchmap.py	Fri Dec 28 03:42:21 2012 +0100
+++ b/mercurial/branchmap.py	Fri Jan 04 01:25:55 2013 +0100
@@ -68,21 +68,11 @@
         if partial is None:
             partial = branchcache()
 
-    catip = repo._cacheabletip()
-    # if partial.tiprev == catip: cache is already up to date
-    # if partial.tiprev >  catip: we have uncachable element in `partial` can't
-    #                             write on disk
-    if partial.tiprev < catip:
-        ctxgen = (repo[r] for r in cl.revs(partial.tiprev + 1, catip))
+    revs = list(cl.revs(start=partial.tiprev +1))
+    if revs:
+        ctxgen = (repo[r] for r in revs)
         partial.update(repo, ctxgen)
         partial.write(repo)
-    # If cacheable tip were lower than actual tip, we need to update the
-    # cache up to tip. This update (from cacheable to actual tip) is not
-    # written to disk since it's not cacheable.
-    tiprev = cl.rev(cl.tip())
-    if partial.tiprev < tiprev:
-        ctxgen = (repo[r] for r in cl.revs(partial.tiprev + 1, tiprev))
-        partial.update(repo, ctxgen)
     repo._branchcaches[repo.filtername] = partial
 
 class branchcache(dict):