changeset 18167:59ac9a551bf4

branchmap: improve computation of target tip With revision filtering the effective revision number of "tip" may be lower than: len(changelog) - 1 We now use a more correct version preventing useless writing on disk in some case.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Mon, 24 Dec 2012 02:57:23 +0100
parents 3a2e810dd3d8
children c351759ab0a0
files mercurial/branchmap.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/branchmap.py	Fri Dec 28 00:13:32 2012 +0100
+++ b/mercurial/branchmap.py	Mon Dec 24 02:57:23 2012 +0100
@@ -60,7 +60,7 @@
     # 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 = len(repo) - 1
+    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)