tests/test-conflict.t
changeset 46108 bdc2bf68f19e
parent 46077 7a2b67e6b680
child 48335 b7fde9237c92
--- a/tests/test-conflict.t	Thu Dec 10 14:39:22 2020 -0800
+++ b/tests/test-conflict.t	Tue Dec 08 16:45:13 2020 -0800
@@ -282,6 +282,80 @@
   >>>>>>> merge rev
   Hop we are done.
 
+internal:mergediff
+
+  $ hg co -C 1
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ cat << EOF > a
+  > Small Mathematical Series.
+  > 1
+  > 2
+  > 3
+  > 4
+  > 4.5
+  > 5
+  > Hop we are done.
+  > EOF
+  $ hg co -m 2 -t internal:mergediff
+  merging a
+  warning: conflicts while merging a! (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]
+  $ cat a
+  Small Mathematical Series.
+  1
+  2
+  3
+  <<<<<<<
+  ------- base
+  +++++++ working copy
+   4
+  +4.5
+   5
+  ======= destination
+  6
+  8
+  >>>>>>>
+  Hop we are done.
+Test the same thing as above but modify a bit more so we instead get the working
+copy in full and the diff from base to destination.
+  $ hg co -C 1
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ cat << EOF > a
+  > Small Mathematical Series.
+  > 1
+  > 2
+  > 3.5
+  > 4.5
+  > 5.5
+  > Hop we are done.
+  > EOF
+  $ hg co -m 2 -t internal:mergediff
+  merging a
+  warning: conflicts while merging a! (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]
+  $ cat a
+  Small Mathematical Series.
+  1
+  2
+  <<<<<<<
+  ======= working copy
+  3.5
+  4.5
+  5.5
+  ------- base
+  +++++++ destination
+   3
+  -4
+  -5
+  +6
+  +8
+  >>>>>>>
+  Hop we are done.
+
 Add some unconflicting changes on each head, to make sure we really
 are merging, unlike :local and :other