# HG changeset patch # User Martin von Zweigbergk # Date 2022-01-25 05:12:19 # Node ID f1898680d713c97702af0655dae43f4311460807 # Parent ccd9cb73125cf096a1af26bda689399a190179b2 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 diff --git a/tests/test-unamend.t b/tests/test-unamend.t --- a/tests/test-unamend.t +++ b/tests/test-unamend.t @@ -421,3 +421,30 @@ Rename a->b, then amend b->c, and workin 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 !)