[Updated] D12086: tests: demonstrate how `hg unamend` fails on merge commits

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Tue Jan 25 09:53:45 UTC 2022


Closed by commit rHGf1898680d713: tests: demonstrate how `hg unamend` fails on merge commits (authored by martinvonz).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D12086?vs=31900&id=31977

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

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

AFFECTED FILES
  tests/test-unamend.t

CHANGE DETAILS

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 @@
   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 !)



To: martinvonz, #hg-reviewers, Alphare
Cc: Alphare, mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20220125/2cfe9b47/attachment-0002.html>


More information about the Mercurial-patches mailing list