[PATCH 8 of 8] test-subrepo: demonstrate a status problem when merge deletes a file

Matt Harbison mharbison72 at gmail.com
Sun Jul 9 19:34:56 EDT 2017


# HG changeset patch
# User Matt Harbison <matt_harbison at yahoo.com>
# Date 1499632684 14400
#      Sun Jul 09 16:38:04 2017 -0400
# Node ID 3ecc0fb587347c91f730eecf261ec707d91e367a
# Parent  52be0dbe23036b919defce0c417175ab615a05b2
test-subrepo: demonstrate a status problem when merge deletes a file

At the interactive update prompt, if (c) is chosen and then followed by `hg rm`,
both `status -R` and `status -S` show the file as 'R', and `files -R` shows no
files (OK, because explicitly removed files aren't supposed to be listed).  If
`rm` follows selecting (c), then both flavors of `status` list the file as '!',
and `files -R` lists the missing file.  So somehow, the (d) option has followed
a third path.

diff --git a/tests/test-merge-subrepos.t b/tests/test-merge-subrepos.t
--- a/tests/test-merge-subrepos.t
+++ b/tests/test-merge-subrepos.t
@@ -107,13 +107,21 @@
   [255]
 
   $ hg up -r '.^' --config ui.interactive=True << EOF
-  > c
+  > d
   > EOF
   other [destination] changed b which local [working copy] deleted
-  use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c
+  use (c)hanged version, leave (d)eleted, or leave (u)nresolved? d
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
+XXX: There's a difference between wdir() and '.', so there should be a status.
+`hg files -S` from the top is also missing 'subrepo/b'.
+
   $ hg st -S
+  $ hg st -R subrepo
+  $ hg files -R subrepo
+  [1]
+  $ hg files -R subrepo -r '.'
+  subrepo/b (glob)
 
   $ hg bookmark -r tip @other
   $ echo xyz > subrepo/c


More information about the Mercurial-devel mailing list