# HG changeset patch # User Martin von Zweigbergk # Date 1516519319 28800 # Node ID 128dd940bedc36cc7d43e86604e5e2077f0fdb42 # Parent 0c0689a7565eca7661622f8358f1d10ad34f0871 repair: invalidate volatile sets after stripping Matt Harbison reported that some tests were broken on Windows after 1a09dad8b85a (evolution: report new unstable changesets, 2018-01-14). The failures were exactly as seen in this patch. The failures actually seemed correct, which made me wonder why they didn't fail the same way on Linux. It turned out to be a cache invalidation problem. The new orphan mentioned in the test case actually does get created when we're re-applying the temporary bundle that's created while stripping. However, without the invalidation, it appears that there was already an orphan before applying the temporary bundle. The warnings about unknown working parent appear because the aformentioned changeset means that we're now accessing the dirstate while it's invalid. We may want to suppress these messages that happen in the intermediate strip state, but they're technically correct (although confusing to the user), so I think just fixing the cache invalidation is fine for now. I haven't figured out why the caches seemed to get correctly invalidated on Windows. Differential Revision: https://phab.mercurial-scm.org/D1933 diff -r 0c0689a7565e -r 128dd940bedc mercurial/repair.py --- a/mercurial/repair.py Sun Jan 21 13:54:05 2018 -0500 +++ b/mercurial/repair.py Sat Jan 20 23:21:59 2018 -0800 @@ -203,6 +203,7 @@ deleteobsmarkers(repo.obsstore, stripobsidx) del repo.obsstore + repo.invalidatevolatilesets() repo._phasecache.filterunknown(repo) if tmpbundlefile: diff -r 0c0689a7565e -r 128dd940bedc tests/test-histedit-obsolete.t --- a/tests/test-histedit-obsolete.t Sun Jan 21 13:54:05 2018 -0500 +++ b/tests/test-histedit-obsolete.t Sat Jan 20 23:21:59 2018 -0800 @@ -71,6 +71,7 @@ $ hg commit --amend -X . -m XXXXXX $ hg commit --amend -X . -m b2 $ hg --hidden --config extensions.strip= strip 'desc(XXXXXX)' --no-backup + warning: ignoring unknown working parent aba7da937030! $ hg histedit --continue $ hg log -G @ 8:273c1f3b8626 c diff -r 0c0689a7565e -r 128dd940bedc tests/test-rebase-obsolete.t --- a/tests/test-rebase-obsolete.t Sun Jan 21 13:54:05 2018 -0500 +++ b/tests/test-rebase-obsolete.t Sat Jan 20 23:21:59 2018 -0800 @@ -772,6 +772,7 @@ 1 new orphan changesets $ hg --hidden strip -r 'desc(B1)' saved backup bundle to $TESTTMP/obsskip/.hg/strip-backup/86f6414ccda7-b1c452ee-backup.hg + 1 new orphan changesets $ hg log -G @ 5:1a79b7535141 D | diff -r 0c0689a7565e -r 128dd940bedc tests/test-single-head.t --- a/tests/test-single-head.t Sun Jan 21 13:54:05 2018 -0500 +++ b/tests/test-single-head.t Sat Jan 20 23:21:59 2018 -0800 @@ -200,4 +200,5 @@ $ hg strip --config extensions.strip= --rev 'desc("c_dH0")' saved backup bundle to $TESTTMP/client/.hg/strip-backup/fe47ea669cea-a41bf5a9-backup.hg + warning: ignoring unknown working parent 49003e504178!