# HG changeset patch # User Martin von Zweigbergk # Date 1599150118 25200 # Node ID 80b5d4b85a5203a389b5316fe4b29a2852452b47 # Parent 95478db35f8821162726cc41c6f4e8ac6f940720 tests: add test showing that `hg uncommit --rev` can fail to mark file added The test case modified in this commit uses `hg uncommit --rev 0 b` to revert the parent commit's state to revision 0 where file `b` doesn't exist. The file is still tracked in the dirstate (correctly, since `hg uncommit` should not affected the tracked-ness), so `hg status` should report it as added. However, as the calls added in this patch shows, it gets reported as modified instead. diff -r 95478db35f88 -r 80b5d4b85a52 tests/test-uncommit.t --- a/tests/test-uncommit.t Tue Sep 01 23:35:43 2020 -0400 +++ b/tests/test-uncommit.t Thu Sep 03 09:21:58 2020 -0700 @@ -355,6 +355,8 @@ $ hg cat b --rev 0 b: no such file in rev 07f494440405 [1] + $ hg status + A aa $ hg uncommit --rev . b abort: cannot uncommit to parent changeset [255] @@ -362,6 +364,10 @@ $ hg cat b --rev . b: no such file in rev 5b27f6b17da2 [1] +BROKEN: 'b' is no longer in the parent commit, so it should be marked 'A' + $ hg status + M b + A aa Test uncommiting predecessors