Patchwork D6666: amend: add a test for a simplified version of issue6157

login
register
mail settings
Submitter phabricator
Date July 22, 2019, 11:27 p.m.
Message ID <fe548b9dbe74ab7f22bdb03e1cf1330a@localhost.localdomain>
Download mbox | patch
Permalink /patch/41006/
State Not Applicable
Headers show

Comments

phabricator - July 22, 2019, 11:27 p.m.
Closed by commit rHG464aa857c717: amend: add a test for a simplified version of issue6157 (authored by valentin.gatienbaron).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6666?vs=15990&id=16001

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6666/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D6666

AFFECTED FILES
  tests/test-amend.t

CHANGE DETAILS




To: valentin.gatienbaron, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/tests/test-amend.t b/tests/test-amend.t
--- a/tests/test-amend.t
+++ b/tests/test-amend.t
@@ -451,3 +451,20 @@ 
   [255]
 
   $ cd ..
+
+Corner case of amend from issue6157:
+- working copy parent has a change to file `a`
+- working copy has the inverse change
+- we amend the working copy parent for files other than `a`
+hg includes the changes to `a` anyway.
+
+  $ hg init 6157; cd 6157
+  $ echo a > a; echo b > b; hg commit -qAm_
+  $ echo a2 > a; hg commit -qm_
+  $ hg diff --stat -c .
+   a |  2 +-
+   1 files changed, 1 insertions(+), 1 deletions(-)
+  $ echo a > a; echo b2 > b; hg amend -q b
+  $ hg diff --stat -c .
+   b |  2 +-
+   1 files changed, 1 insertions(+), 1 deletions(-)