Mercurial > hg-stable
changeset 42642:464aa857c717 stable
amend: add a test for a simplified version of issue6157
Differential Revision: https://phab.mercurial-scm.org/D6666
author | Valentin Gatien-Baron <valentin.gatienbaron@gmail.com> |
---|---|
date | Mon, 22 Jul 2019 06:33:00 -0400 |
parents | b5092c23ca35 |
children | ce52377102db |
files | tests/test-amend.t |
diffstat | 1 files changed, 17 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-amend.t Sun Jul 21 18:04:05 2019 -0700 +++ b/tests/test-amend.t Mon Jul 22 06:33:00 2019 -0400 @@ -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(-)