changeset 45387:cf21cda4281f

tests: add test showing that merge state is not cleared by amend This is slightly modified version of the test case I provided in issue6304. Differential Revision: https://phab.mercurial-scm.org/D8931
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 18 Aug 2020 14:26:49 -0700
parents 034d94f8761b
children 6ba7190ff863
files tests/test-amend.t
diffstat 1 files changed, 24 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-amend.t	Tue Aug 11 13:43:43 2020 +0530
+++ b/tests/test-amend.t	Tue Aug 18 14:26:49 2020 -0700
@@ -93,6 +93,30 @@
   nothing changed
   [1]
 
+#if obsstore-on
+  $ hg init repo-merge-state
+  $ cd repo-merge-state
+  $ echo a > f
+  $ hg ci -Aqm a
+  $ echo b > f
+  $ hg ci -Aqm b
+  $ echo c > f
+  $ hg co -m '.^'
+  merging f
+  warning: conflicts while merging f! (edit, then use 'hg resolve --mark')
+  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
+  use 'hg resolve' to retry unresolved file merges
+  [1]
+  $ echo d > f
+  $ hg resolve -m f
+  (no more unresolved files)
+  $ hg ci --amend --config experimental.evolution.allowunstable=True
+  1 new orphan changesets
+  $ hg resolve -l
+  R f
+  $ cd ..
+#endif
+
 Matcher and metadata options
 
   $ echo 3 > C