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

login
register
mail settings
Submitter Matt Harbison
Date July 9, 2017, 11:34 p.m.
Message ID <3ecc0fb587347c91f730.1499643296@Envy>
Download mbox | patch
Permalink /patch/22192/
State Accepted
Headers show

Comments

Matt Harbison - July 9, 2017, 11:34 p.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@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.
Yuya Nishihara - July 10, 2017, 3:05 p.m.
On Sun, 09 Jul 2017 19:34:56 -0400, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_harbison@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

Queued all, thanks.

Patch

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