changeset 5511:80b5d4b85a52 stable

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.
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 03 Sep 2020 09:21:58 -0700
parents 95478db35f88
children 2df762b9c0c5
files tests/test-uncommit.t
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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