diff tests/test-evolve-content-divergence.t @ 3802:4bad80f1aad3

evolve: pop up editor if conflicts occur while merging commit messages Last patch added support for merging commit messages while resolving content divergence. In case of conflicts we fallback to one of the divergent commit messages. After this patch, we will pop up an editor where user has to resolve the conflicts in the commit messages and then continue. Tests are added for this. We need to fix handling in test-sharing.t to use HGEDITOR to fix conflicts and pass the new commit message. Future improvement can be that we should respect HGMERGE while merging commit descriptions too.
author Pulkit Goyal <7895pulkit@gmail.com>
date Wed, 06 Jun 2018 03:26:47 +0530
parents ee78135b2f45
children 509b1e66f0b9
line wrap: on
line diff
--- a/tests/test-evolve-content-divergence.t	Mon Jun 04 01:28:02 2018 +0530
+++ b/tests/test-evolve-content-divergence.t	Wed Jun 06 03:26:47 2018 +0530
@@ -241,12 +241,34 @@
   $ hg resolve -m
   (no more unresolved files)
   continue: hg evolve --continue
-  $ hg evolve --continue
-  conflicts while merging descriptions, using description of divergent changeset
-  working directory is now at 578f12701e5a
+
+  $ cat > editor.sh <<EOF
+  > #!/bin/sh
+  > printf "**showing editors text**\n\n"
+  > cat \$1
+  > printf "\n**done showing editors text**\n\n"
+  > cat > \$1 <<ENDOF
+  > watbar to d
+  > ENDOF
+  > EOF
+
+  $ HGEDITOR='sh ./editor.sh' hg evolve --continue
+  **showing editors text**
+  
+  HG: Conflicts while merging changeset description of content-divergent changesets.
+  HG: Resolve conflicts in commit messages to continue.
+  
+  <<<<<<< divergent
+  wat to d, wat?||||||| base
+  foo to d=======
+  bar to d, expect beers>>>>>>> other
+  
+  **done showing editors text**
+  
+  working directory is now at 00f8d08aea43
 
   $ hg glog
-  @  16:578f12701e5a wat to d, wat?
+  @  16:00f8d08aea43 watbar to d
   |   () [default] draft
   o  3:ca1b80f7960a added c
   |   () [default] draft