# HG changeset patch # User Joshua Redstone # Date 1337370347 25200 # Node ID 3007e5d9eb4e0e2aa2e25739175cfc81dfef17fc # Parent d5b3404b82cea4a6e7defebdee79abe7d654c8eb 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 ] diff -r d5b3404b82ce -r 3007e5d9eb4e tests/test-keyword.t --- 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