# HG changeset patch # User Pierre-Yves David # Date 1356314243 -3600 # Node ID 59ac9a551bf4aa72cc9b2e4e167f7ac03179fbaf # Parent 3a2e810dd3d85e18d214598c6f41d54fe3529ee7 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. diff -r 3a2e810dd3d8 -r 59ac9a551bf4 mercurial/branchmap.py --- 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)