Mercurial > hg
diff tests/test-strip.t @ 45508:27822b8436bf stable
test-strip: display more information highlight buggy behavior
When using `hg strip --keep` on a set of changeset that contains a merge, the
set of file considered when rebuilding the dirstate is missing files updated by
changeset that are not directly inside the `new-parent::old-parent` range.
We start with updating the test with new output highlighting the issue.
This issue was spotted because that dirstate inconsistency made the test flaky.
The new command make the test less flaky (but still wrong).
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 18 Sep 2020 12:10:12 +0200 |
parents | 14d0e89520a2 |
children | 2bc978921e8a |
line wrap: on
line diff
--- a/tests/test-strip.t Sun Sep 13 15:59:23 2020 +0900 +++ b/tests/test-strip.t Fri Sep 18 12:10:12 2020 +0200 @@ -1177,6 +1177,10 @@ summary: commitA +stripping a set containing a merge properly reset file content, including items on other branches + +BROKEN, The added file should move to unknown, which is the behavior we have been seeing for other `hg strip --keep` call. + $ hg unbundle -u $TESTTMP/issue4736/.hg/strip-backup/35358f982181-a6f020aa-backup.hg adding changesets adding manifests @@ -1185,6 +1189,50 @@ new changesets 35358f982181:4cf5e92caec2 (2 drafts) 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ hg id + 4cf5e92caec2 (new-branch) tip + $ hg status --rev "f62c6c09b707" + A bar.txt + $ hg diff --rev "f62c6c09b707" + diff -r f62c6c09b707 bar.txt + --- /dev/null Thu Jan 01 00:00:00 1970 +0000 + +++ b/bar.txt Thu Jan 01 00:00:00 1970 +0000 + @@ -0,0 +1,1 @@ + +bar + $ hg log -G -v --rev 35358f982181:: --patch + @ changeset: 5:4cf5e92caec2 + |\ branch: new-branch + | ~ tag: tip + | parent: 3:f62c6c09b707 + | parent: 4:35358f982181 + | user: test + | date: Thu Jan 01 00:00:00 1970 +0000 + | description: + | merge + | + | + | diff -r f62c6c09b707 -r 4cf5e92caec2 bar.txt + | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 + | +++ b/bar.txt Thu Jan 01 00:00:00 1970 +0000 + | @@ -0,0 +1,1 @@ + | +bar + | + o changeset: 4:35358f982181 + | parent: 1:eca11cf91c71 + ~ user: test + date: Thu Jan 01 00:00:00 1970 +0000 + files: bar.txt + description: + bar + + + diff -r eca11cf91c71 -r 35358f982181 bar.txt + --- /dev/null Thu Jan 01 00:00:00 1970 +0000 + +++ b/bar.txt Thu Jan 01 00:00:00 1970 +0000 + @@ -0,0 +1,1 @@ + +bar + + $ hg strip -k -r 35358f982181 saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/35358f982181-a6f020aa-backup.hg $ hg log -G @@ -1211,12 +1259,17 @@ date: Thu Jan 01 00:00:00 1970 +0000 summary: commitA - $ hg diff - diff -r f62c6c09b707 bar.txt - --- /dev/null Thu Jan 01 00:00:00 1970 +0000 - +++ b/bar.txt Thu Jan 01 00:00:00 1970 +0000 - @@ -0,0 +1,1 @@ - +bar + +BROKEN: 'bar.txt' cannot possibly be clean since it is not part of the current +working copy parents. + + $ hg status -A + C a + C b + C bar.txt + C foo.txt + $ cat bar.txt + bar Use delayedstrip to strip inside a transaction