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