Mercurial > hg
comparison tests/test-unamend.t @ 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 | d90f6237b3aa |
children | 4f01821fa0ec |
comparison
equal
deleted
inserted
replaced
48571:ccd9cb73125c | 48580:f1898680d713 |
---|---|
419 R a | 419 R a |
420 $ hg st --copies | 420 $ hg st --copies |
421 A d | 421 A d |
422 b | 422 b |
423 R b | 423 R b |
424 | |
425 Try to unamend a merge | |
426 | |
427 $ cd .. | |
428 $ hg init merge | |
429 $ cd merge | |
430 $ echo initial > initial | |
431 $ hg ci -Aqm initial | |
432 $ echo left > left | |
433 $ hg ci -Aqm left | |
434 $ hg co -q 0 | |
435 $ echo right > right | |
436 $ hg ci -Aqm right | |
437 $ hg merge -q 1 | |
438 $ hg ci -m merge | |
439 $ echo accidental > initial | |
440 $ hg st --rev 1 --rev . | |
441 A right | |
442 $ hg st --rev 2 --rev . | |
443 A left | |
444 $ hg amend | |
445 $ hg unamend | |
446 $ hg st --rev 1 --rev . | |
447 A right | |
448 R left (known-bad-output !) | |
449 $ hg st --rev 2 --rev . | |
450 A left (missing-correct-output !) |