strip: incrementally update the branchheads cache after a strip
This function augments strip to incrementally update the branchheads cache
rather than recompute it from scratch. This speeds up the performance of strip
and rebase on repos with long history. The performance optimization only
happens if the revisions stripped are all on the same branch and the parents of
the stripped revisions are also on that same branch.
This adds a few test cases, particularly one that reproduces the extra heads
that mpm observed.
[ original upstream message ]
--- a/tests/test-keyword.t Mon Nov 07 13:46:41 2011 -0600
+++ b/tests/test-keyword.t Fri May 18 12:45:47 2012 -0700
@@ -505,7 +505,6 @@
$ hg -q commit -d '1 14' -m 'prepare amend'
$ hg --debug commit --amend -d '1 15' -m 'amend without changes' | grep keywords
- invalidating branch cache (tip differs)
overwriting a expanding keywords
$ hg -q id
a71343332ea9