Mercurial > hg
changeset 48580:f1898680d713 stable
tests: demonstrate how `hg unamend` fails on merge commits
When `hg unamend` is run on a merge commit, it seems that it loses the
changes from the second parent.
Differential Revision: https://phab.mercurial-scm.org/D12086
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Mon, 24 Jan 2022 21:12:19 -0800 |
parents | ccd9cb73125c |
children | 4f01821fa0ec |
files | tests/test-unamend.t |
diffstat | 1 files changed, 27 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-unamend.t Thu Jan 20 14:06:36 2022 +0000 +++ b/tests/test-unamend.t Mon Jan 24 21:12:19 2022 -0800 @@ -421,3 +421,30 @@ A d b R b + +Try to unamend a merge + + $ cd .. + $ hg init merge + $ cd merge + $ echo initial > initial + $ hg ci -Aqm initial + $ echo left > left + $ hg ci -Aqm left + $ hg co -q 0 + $ echo right > right + $ hg ci -Aqm right + $ hg merge -q 1 + $ hg ci -m merge + $ echo accidental > initial + $ hg st --rev 1 --rev . + A right + $ hg st --rev 2 --rev . + A left + $ hg amend + $ hg unamend + $ hg st --rev 1 --rev . + A right + R left (known-bad-output !) + $ hg st --rev 2 --rev . + A left (missing-correct-output !)