evolve: fix the conflicts error message during content-divergence resolution
authorPulkit Goyal <7895pulkit@gmail.com>
Sun, 29 Apr 2018 19:04:18 +0530
changeset 3738 ed3f69fb67bf
parent 3737 5b0bd82ea914
child 3739 0bfc4fe3baf8
evolve: fix the conflicts error message during content-divergence resolution Before last patch, we didn't had an automated way to continue an interrupted content-divergence resolution and we used to show a very long error message on how to continue manually. This patch replaces that long error message with nice small message which tells how to continue and how to abort. We still show `hg update -C .` to abort as we need to test and make `--abort` work in case of content-divergence.
hgext3rd/evolve/evolvecmd.py
tests/test-stabilize-result.t
--- a/hgext3rd/evolve/evolvecmd.py	Sun Apr 29 18:51:56 2018 +0530
+++ b/hgext3rd/evolve/evolvecmd.py	Sun Apr 29 19:04:18 2018 +0530
@@ -415,18 +415,9 @@
                          mergeancestor=True)
     hg._showstats(repo, stats)
     if compat.hasconflict(stats):
-        repo.ui.status(_("use 'hg resolve' to retry unresolved file merges "
-                         "or 'hg update -C .' to abort\n"))
         evolvestate.save()
-        raise error.Abort('merge conflict between several amendments '
-                          '(this is not automated yet)',
-                          hint="""/!\ You can try:
-/!\ * manual merge + resolve => new cset X
-/!\ * hg up to the parent of the amended changeset (which are named W and Z)
-/!\ * hg revert --all -r X
-/!\ * hg ci -m "same message as the amended changeset" => new cset Y
-/!\ * hg prune -n Y W Z
-""")
+        raise error.Abort(_("fix conflicts and run 'hg evolve --continue' or"
+                            " use 'hg update -C .' to abort"))
 
     return _completecontentdivergent(ui, repo, progresscb, divergent, other,
                                      evolvestate)
--- a/tests/test-stabilize-result.t	Sun Apr 29 18:51:56 2018 +0530
+++ b/tests/test-stabilize-result.t	Sun Apr 29 19:04:18 2018 +0530
@@ -393,15 +393,7 @@
   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 or 'hg update -C .' to abort
-  abort: merge conflict between several amendments (this is not automated yet)
-  (/!\ You can try:
-  /!\ * manual merge + resolve => new cset X
-  /!\ * hg up to the parent of the amended changeset (which are named W and Z)
-  /!\ * hg revert --all -r X
-  /!\ * hg ci -m "same message as the amended changeset" => new cset Y
-  /!\ * hg prune -n Y W Z
-  )
+  abort: fix conflicts and run 'hg evolve --continue' or use 'hg update -C .' to abort
   [255]
 
   $ cat > a <<EOF