changeset 35704:41ef02ba329b

merge: add `--abort` flag which can abort the merge Currently we don't have a good functionality to abort the merge and tell user to do `hg update -C .` which can leads to different results if user missed the '.' and moreover does not align with other abort functionalities like rebase, shelve etc. This patch adds `hg merge --abort` which will abort the ongoing merge and take us back to the chagneset where we started from. Works in both cases when merge resulted in conflicts and when there were no conflicts. .. feature:: A `--abort` flag to merge command to abort the ongoing merge. Differential Revision: https://phab.mercurial-scm.org/D1829
author Pulkit Goyal <7895pulkit@gmail.com>
date Mon, 08 Jan 2018 19:41:47 +0530
parents 9a50ffd15b25
children 8cdb671dbd0b
files mercurial/commands.py mercurial/hg.py tests/test-add.t tests/test-commit-unresolved.t tests/test-completion.t tests/test-conflict.t tests/test-convert-svn-sink.t tests/test-fileset.t tests/test-keyword.t tests/test-largefiles-update.t tests/test-lfconvert.t tests/test-log.t tests/test-merge-changedelete.t tests/test-merge-criss-cross.t tests/test-merge-force.t tests/test-merge-internal-tools-pattern.t tests/test-merge-remove.t tests/test-merge-tools.t tests/test-merge-types.t tests/test-merge7.t tests/test-merge9.t tests/test-mq-qnew.t tests/test-pathconflicts-basic.t tests/test-pathconflicts-merge.t tests/test-rename-dir-merge.t tests/test-rename-merge2.t tests/test-resolve.t tests/test-sparse-profiles.t tests/test-sparse.t tests/test-status-color.t tests/test-subrepo.t tests/test-tag.t
diffstat 32 files changed, 200 insertions(+), 96 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Thu Jan 04 21:37:03 2018 -0800
+++ b/mercurial/commands.py	Mon Jan 08 19:41:47 2018 +0530
@@ -3530,7 +3530,8 @@
       _('force a merge including outstanding changes (DEPRECATED)')),
     ('r', 'rev', '', _('revision to merge'), _('REV')),
     ('P', 'preview', None,
-     _('review revisions to merge (no merge is performed)'))
+     _('review revisions to merge (no merge is performed)')),
+    ('', 'abort', None, _('abort the ongoing merge')),
      ] + mergetoolopts,
     _('[-P] [[-r] REV]'))
 def merge(ui, repo, node=None, **opts):
@@ -3555,7 +3556,7 @@
 
     See :hg:`help resolve` for information on handling file conflicts.
 
-    To undo an uncommitted merge, use :hg:`update --clean .` which
+    To undo an uncommitted merge, use :hg:`merge --abort` which
     will check out a clean copy of the original merge parent, losing
     all changes.
 
@@ -3563,6 +3564,16 @@
     """
 
     opts = pycompat.byteskwargs(opts)
+    abort = opts.get('abort')
+    if abort and repo.dirstate.p2() == nullid:
+        cmdutil.wrongtooltocontinue(repo, _('merge'))
+    if abort:
+        if node:
+            raise error.Abort(_("cannot specify a node with --abort"))
+        if opts.get('rev'):
+            raise error.Abort(_("cannot specify both --rev and --abort"))
+        if opts.get('preview'):
+            raise error.Abort(_("cannot specify --preview with --abort"))
     if opts.get('rev') and node:
         raise error.Abort(_("please specify just one revision"))
     if not node:
@@ -3571,7 +3582,7 @@
     if node:
         node = scmutil.revsingle(repo, node).node()
 
-    if not node:
+    if not node and not abort:
         node = repo[destutil.destmerge(repo)].node()
 
     if opts.get('preview'):
@@ -3592,7 +3603,7 @@
         force = opts.get('force')
         labels = ['working copy', 'merge rev']
         return hg.merge(repo, node, force=force, mergeforce=force,
-                        labels=labels)
+                        labels=labels, abort=abort)
     finally:
         ui.setconfig('ui', 'forcemerge', '', 'merge')
 
--- a/mercurial/hg.py	Thu Jan 04 21:37:03 2018 -0800
+++ b/mercurial/hg.py	Mon Jan 08 19:41:47 2018 +0530
@@ -14,7 +14,10 @@
 import shutil
 
 from .i18n import _
-from .node import nullid
+from .node import (
+    hex,
+    nullid,
+)
 
 from . import (
     bookmarks,
@@ -844,16 +847,32 @@
 
     return ret
 
-def merge(repo, node, force=None, remind=True, mergeforce=False, labels=None):
+def merge(repo, node, force=None, remind=True, mergeforce=False, labels=None,
+          abort=False):
     """Branch merge with node, resolving changes. Return true if any
     unresolved conflicts."""
-    stats = mergemod.update(repo, node, True, force, mergeforce=mergeforce,
-                            labels=labels)
+    if not abort:
+        stats = mergemod.update(repo, node, True, force, mergeforce=mergeforce,
+                                labels=labels)
+    else:
+        ms = mergemod.mergestate.read(repo)
+        if ms.active():
+            # there were conflicts
+            node = hex(ms._local)
+        else:
+            # there were no conficts, mergestate was not stored
+            node = repo['.'].hex()
+
+        repo.ui.status(_("aborting the merge, updating back to"
+                         " %s\n") % node[:12])
+        stats = mergemod.update(repo, node, branchmerge=False, force=True,
+                                labels=labels)
+
     _showstats(repo, stats)
     if stats[3]:
         repo.ui.status(_("use 'hg resolve' to retry unresolved file merges "
-                         "or 'hg update -C .' to abandon\n"))
-    elif remind:
+                         "or 'hg merge --abort' to abandon\n"))
+    elif remind and not abort:
         repo.ui.status(_("(branch merge, don't forget to commit)\n"))
     return stats[3] > 0
 
--- a/tests/test-add.t	Thu Jan 04 21:37:03 2018 -0800
+++ b/tests/test-add.t	Mon Jan 08 19:41:47 2018 +0530
@@ -104,7 +104,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 abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ hg st
   M a
--- a/tests/test-commit-unresolved.t	Thu Jan 04 21:37:03 2018 -0800
+++ b/tests/test-commit-unresolved.t	Mon Jan 08 19:41:47 2018 +0530
@@ -21,13 +21,63 @@
   $ commit "D" 3
   created new head
 
+State before the merge
+
+  $ hg status
+  $ hg id
+  e45016d2b3d3 tip
+  $ hg summary
+  parent: 3:e45016d2b3d3 tip
+   D
+  branch: default
+  commit: (clean)
+  update: 2 new changesets, 2 branch heads (merge)
+  phases: 4 draft
+
+Testing the abort functionality first in case of conflicts
+
+  $ hg merge --abort
+  abort: no merge in progress
+  [255]
+  $ hg merge
+  merging A
+  warning: conflicts while merging A! (edit, then use 'hg resolve --mark')
+  1 files updated, 0 files merged, 0 files removed, 1 files unresolved
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
+  [1]
+
+  $ hg merge --abort e4501
+  abort: cannot specify a node with --abort
+  [255]
+  $ hg merge --abort --rev e4501
+  abort: cannot specify both --rev and --abort
+  [255]
+
+  $ hg merge --abort
+  aborting the merge, updating back to e45016d2b3d3
+  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
+
+Checking that we got back in the same state
+
+  $ hg status
+  ? A.orig
+  $ hg id
+  e45016d2b3d3 tip
+  $ hg summary
+  parent: 3:e45016d2b3d3 tip
+   D
+  branch: default
+  commit: 1 unknown (clean)
+  update: 2 new changesets, 2 branch heads (merge)
+  phases: 4 draft
+
 Merging a conflict araises
 
   $ hg merge
   merging A
   warning: conflicts while merging A! (edit, then use 'hg resolve --mark')
   1 files updated, 0 files merged, 0 files removed, 1 files unresolved
-  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
 
 Correct the conflict without marking the file as resolved
@@ -52,7 +102,7 @@
   merging A
   warning: conflicts while merging A! (edit, then use 'hg resolve --mark')
   1 files updated, 0 files merged, 0 files removed, 1 files unresolved
-  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ hg rm --force A
   $ hg commit -m merged
@@ -64,4 +114,28 @@
   $ hg commit -m merged
   created new head
 
+Testing the abort functionality in case of no conflicts
+
+  $ hg update -C 0
+  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ addcommit "E" 4
+  created new head
+  $ hg id
+  68352a18a7c4 tip
+
+  $ hg merge -r 4
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  (branch merge, don't forget to commit)
+
+  $ hg merge --preview --abort
+  abort: cannot specify --preview with --abort
+  [255]
+
+  $ hg merge --abort
+  aborting the merge, updating back to 68352a18a7c4
+  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
+
+  $ hg id
+  68352a18a7c4 tip
+
   $ cd ..
--- a/tests/test-completion.t	Thu Jan 04 21:37:03 2018 -0800
+++ b/tests/test-completion.t	Mon Jan 08 19:41:47 2018 +0530
@@ -229,7 +229,7 @@
   forget: include, exclude
   init: ssh, remotecmd, insecure
   log: follow, follow-first, date, copies, keyword, rev, line-range, removed, only-merges, user, only-branch, branch, prune, patch, git, limit, no-merges, stat, graph, style, template, include, exclude
-  merge: force, rev, preview, tool
+  merge: force, rev, preview, abort, tool
   pull: update, force, rev, bookmark, branch, ssh, remotecmd, insecure
   push: force, rev, bookmark, branch, new-branch, pushvars, ssh, remotecmd, insecure
   remove: after, force, subrepos, include, exclude
--- a/tests/test-conflict.t	Thu Jan 04 21:37:03 2018 -0800
+++ b/tests/test-conflict.t	Mon Jan 08 19:41:47 2018 +0530
@@ -38,7 +38,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 abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
 
   $ hg id
@@ -91,7 +91,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 abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
 
   $ cat a
@@ -182,7 +182,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 abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
 
   $ cat a
@@ -207,7 +207,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 abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ cat a
   Small Mathematical Series.
@@ -254,7 +254,7 @@
   merging a
   warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
   1 files updated, 0 files merged, 0 files removed, 1 files unresolved
-  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ hg resolve --tool :merge-other a
   merging a
--- a/tests/test-convert-svn-sink.t	Thu Jan 04 21:37:03 2018 -0800
+++ b/tests/test-convert-svn-sink.t	Mon Jan 08 19:41:47 2018 +0530
@@ -384,7 +384,7 @@
   merging b
   warning: conflicts while merging b! (edit, then use 'hg resolve --mark')
   2 files updated, 0 files merged, 0 files removed, 1 files unresolved
-  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ hg --cwd b revert -r 2 b
   $ hg --cwd b resolve -m b
--- a/tests/test-fileset.t	Thu Jan 04 21:37:03 2018 -0800
+++ b/tests/test-fileset.t	Mon Jan 08 19:41:47 2018 +0530
@@ -226,7 +226,7 @@
   merging b2
   warning: conflicts while merging b2! (edit, then use 'hg resolve --mark')
   * files updated, 0 files merged, 1 files removed, 1 files unresolved (glob)
-  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ fileset 'resolved()'
   $ fileset 'unresolved()'
--- a/tests/test-keyword.t	Thu Jan 04 21:37:03 2018 -0800
+++ b/tests/test-keyword.t	Mon Jan 08 19:41:47 2018 +0530
@@ -1138,7 +1138,7 @@
   merging m
   warning: conflicts while merging m! (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 abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ cat m
   $Id$
--- a/tests/test-largefiles-update.t	Thu Jan 04 21:37:03 2018 -0800
+++ b/tests/test-largefiles-update.t	Mon Jan 08 19:41:47 2018 +0530
@@ -138,7 +138,7 @@
   getting changed largefiles
   1 largefiles updated, 0 removed
   0 files updated, 1 files merged, 0 files removed, 1 files unresolved
-  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ hg status -A large1
   M large1
--- a/tests/test-lfconvert.t	Thu Jan 04 21:37:03 2018 -0800
+++ b/tests/test-lfconvert.t	Mon Jan 08 19:41:47 2018 +0530
@@ -131,7 +131,7 @@
   warning: stuff/maybelarge.dat looks like a binary file.
   warning: conflicts while merging stuff/maybelarge.dat! (edit, then use 'hg resolve --mark')
   0 files updated, 1 files merged, 0 files removed, 1 files unresolved
-  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ hg cat -r . sub/maybelarge.dat > stuff/maybelarge.dat
   $ hg resolve -m stuff/maybelarge.dat
--- a/tests/test-log.t	Thu Jan 04 21:37:03 2018 -0800
+++ b/tests/test-log.t	Mon Jan 08 19:41:47 2018 +0530
@@ -1695,7 +1695,7 @@
   merging foo
   warning: conflicts while merging foo! (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 abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ echo 'merge 1' > foo
   $ hg resolve -m foo
@@ -1706,7 +1706,7 @@
   merging foo
   warning: conflicts while merging foo! (edit, then use 'hg resolve --mark')
   1 files updated, 0 files merged, 0 files removed, 1 files unresolved
-  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ echo 'merge 2' > foo
   $ hg resolve -m foo
--- a/tests/test-merge-changedelete.t	Thu Jan 04 21:37:03 2018 -0800
+++ b/tests/test-merge-changedelete.t	Mon Jan 08 19:41:47 2018 +0530
@@ -61,7 +61,7 @@
   merging file3
   warning: conflicts while merging file3! (edit, then use 'hg resolve --mark')
   0 files updated, 0 files merged, 0 files removed, 3 files unresolved
-  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
 
   $ status
@@ -128,7 +128,7 @@
   merging file3
   warning: conflicts while merging file3! (edit, then use 'hg resolve --mark')
   0 files updated, 2 files merged, 0 files removed, 1 files unresolved
-  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
 
   $ status
@@ -205,7 +205,7 @@
   merging file3
   warning: conflicts while merging file3! (edit, then use 'hg resolve --mark')
   0 files updated, 1 files merged, 1 files removed, 1 files unresolved
-  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
 
   $ status
@@ -269,7 +269,7 @@
   merging file3
   warning: conflicts while merging file3! (edit, then use 'hg resolve --mark')
   0 files updated, 0 files merged, 1 files removed, 2 files unresolved
-  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
 
   $ status
@@ -422,7 +422,7 @@
 
   $ hg merge --tool :fail
   0 files updated, 0 files merged, 0 files removed, 3 files unresolved
-  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ status 2>&1 | tee $TESTTMP/fail.status
   --- status ---
@@ -479,7 +479,7 @@
   use (c)hanged version, leave (d)eleted, or leave (u)nresolved? 
   keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for file3? 
   0 files updated, 0 files merged, 0 files removed, 3 files unresolved
-  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ status 2>&1 | tee $TESTTMP/prompt.status
   --- status ---
@@ -538,7 +538,7 @@
   use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u
   keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for file3? u
   0 files updated, 0 files merged, 0 files removed, 3 files unresolved
-  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ status
   --- status ---
@@ -596,7 +596,7 @@
   merging file3
   warning: conflicts while merging file3! (edit, then use 'hg resolve --mark')
   0 files updated, 0 files merged, 0 files removed, 3 files unresolved
-  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ status
   --- status ---
--- a/tests/test-merge-criss-cross.t	Thu Jan 04 21:37:03 2018 -0800
+++ b/tests/test-merge-criss-cross.t	Mon Jan 08 19:41:47 2018 +0530
@@ -111,7 +111,7 @@
   picked tool ':dump' for f2 (binary False symlink False changedelete False)
   my f2@6373bbfdae1d+ other f2@e673248094b1 ancestor f2@0f6b37dbe527
   3 files updated, 0 files merged, 0 files removed, 1 files unresolved
-  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
 
   $ f --dump --recurse *
@@ -158,7 +158,7 @@
   getting d1/f3 to d2/f3
   merging f2
   3 files updated, 0 files merged, 0 files removed, 1 files unresolved
-  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
 
 Redo merge with merge.preferancestor="*" to enable bid merge
--- a/tests/test-merge-force.t	Thu Jan 04 21:37:03 2018 -0800
+++ b/tests/test-merge-force.t	Mon Jan 08 19:41:47 2018 +0530
@@ -216,7 +216,7 @@
   warning: conflicts while merging missing_content2_missing_content4-tracked! (edit, then use 'hg resolve --mark')
   warning: conflicts while merging missing_content2_missing_content4-untracked! (edit, then use 'hg resolve --mark')
   18 files updated, 3 files merged, 8 files removed, 35 files unresolved
-  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
 
 Check which files need to be resolved (should correspond to the output above).
 This should be the files for which the base (1st filename segment), the remote
--- a/tests/test-merge-internal-tools-pattern.t	Thu Jan 04 21:37:03 2018 -0800
+++ b/tests/test-merge-internal-tools-pattern.t	Mon Jan 08 19:41:47 2018 +0530
@@ -43,7 +43,7 @@
 
   $ hg merge
   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 abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
 
   $ cat f
--- a/tests/test-merge-remove.t	Thu Jan 04 21:37:03 2018 -0800
+++ b/tests/test-merge-remove.t	Mon Jan 08 19:41:47 2018 +0530
@@ -106,7 +106,7 @@
   use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u
   merging foo1 and foo to foo1
   0 files updated, 1 files merged, 0 files removed, 1 files unresolved
-  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ cat bar
   bleh
--- a/tests/test-merge-tools.t	Thu Jan 04 21:37:03 2018 -0800
+++ b/tests/test-merge-tools.t	Mon Jan 08 19:41:47 2018 +0530
@@ -71,7 +71,7 @@
   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 or 'hg update -C .' to abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ aftermerge
   # cat f
@@ -98,7 +98,7 @@
   merging f
   merging f failed!
   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 abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ aftermerge
   # cat f
@@ -120,7 +120,7 @@
   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 or 'hg update -C .' to abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ rm false
 
@@ -134,7 +134,7 @@
   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 or 'hg update -C .' to abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ rmdir false
 
@@ -170,7 +170,7 @@
   merging f
   merging f failed!
   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 abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ aftermerge
   # cat f
@@ -193,7 +193,7 @@
   merging f
   merging f failed!
   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 abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ aftermerge
   # cat f
@@ -215,7 +215,7 @@
   merging f
   merging f failed!
   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 abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ aftermerge
   # cat f
@@ -238,7 +238,7 @@
   merging f
   merging f failed!
   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 abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ aftermerge
   # cat f
@@ -261,7 +261,7 @@
   merging f
   merging f failed!
   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 abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ aftermerge
   # cat f
@@ -371,7 +371,7 @@
   merging f
   merging f failed!
   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 abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ aftermerge
   # cat f
@@ -397,7 +397,7 @@
   couldn't find merge tool true (for pattern f)
   merging f failed!
   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 abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ aftermerge
   # cat f
@@ -423,7 +423,7 @@
   couldn't find merge tool true (for pattern f)
   merging f failed!
   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 abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ aftermerge
   # cat f
@@ -449,7 +449,7 @@
   merging f
   merging f failed!
   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 abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ aftermerge
   # cat f
@@ -471,7 +471,7 @@
   # hg update -C 1
   $ hg merge -r 2 --config ui.merge=internal:fail
   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 abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ aftermerge
   # cat f
@@ -533,7 +533,7 @@
   $ hg merge -r 2 --config ui.merge=internal:prompt
   keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for f? u
   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 abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ aftermerge
   # cat f
@@ -557,7 +557,7 @@
   > EOF
   keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for f? u
   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 abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ aftermerge
   # cat f
@@ -579,7 +579,7 @@
   $ hg merge -r 2 --config ui.merge=internal:prompt --config ui.interactive=true
   keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for f? 
   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 abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ aftermerge
   # cat f
@@ -637,7 +637,7 @@
   $ hg merge -r 2 --config ui.merge=internal:dump
   merging f
   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 abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ aftermerge
   # cat f
@@ -707,7 +707,7 @@
   $ hg merge -r 3 --config ui.merge=internal:forcedump
   merging f
   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 abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ aftermerge
   # cat f
@@ -749,7 +749,7 @@
   merging f
   merging f failed!
   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 abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ aftermerge
   # cat f
@@ -775,7 +775,7 @@
   merging f
   merging f failed!
   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 abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ aftermerge
   # cat f
@@ -800,7 +800,7 @@
   merging f
   merging f failed!
   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 abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ aftermerge
   # cat f
@@ -1240,7 +1240,7 @@
   was merge successful (yn)? n
   merging f failed!
   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 abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ aftermerge
   # cat f
@@ -1265,7 +1265,7 @@
   warning: internal :merge cannot merge symlinks for 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 or 'hg update -C .' to abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
 
 #endif
--- a/tests/test-merge-types.t	Thu Jan 04 21:37:03 2018 -0800
+++ b/tests/test-merge-types.t	Mon Jan 08 19:41:47 2018 +0530
@@ -42,7 +42,7 @@
   warning: internal :merge cannot merge symlinks for 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 abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
 
   $ tellmeabout a
@@ -75,7 +75,7 @@
   warning: internal :union cannot merge symlinks for 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 abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
 
   $ tellmeabout a
@@ -98,7 +98,7 @@
   warning: internal :merge3 cannot merge symlinks for 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 abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
 
   $ tellmeabout a
@@ -120,7 +120,7 @@
   my a@3574f3e69b1c+ other a@521a1e40188f ancestor a@c334dc3be0da
   warning: internal :merge-local cannot merge symlinks for a
   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 abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
 
   $ tellmeabout a
@@ -142,7 +142,7 @@
   my a@3574f3e69b1c+ other a@521a1e40188f ancestor a@c334dc3be0da
   warning: internal :merge-other cannot merge symlinks for a
   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 abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
 
   $ tellmeabout a
@@ -211,7 +211,7 @@
   warning: internal :merge cannot merge symlinks for 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 or 'hg update -C .' to abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ tellmeabout f
   f is a symlink:
@@ -223,7 +223,7 @@
   warning: internal :merge cannot merge symlinks for 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 or 'hg update -C .' to abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ tellmeabout f
   f is a plain file with content:
@@ -250,7 +250,7 @@
   warning: internal :merge cannot merge symlinks for 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 or 'hg update -C .' to abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ tellmeabout f
   f is a symlink:
@@ -262,7 +262,7 @@
   warning: internal :merge cannot merge symlinks for 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 or 'hg update -C .' to abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ tellmeabout f
   f is a plain file with content:
@@ -354,7 +354,7 @@
   warning: conflicts while merging b! (edit, then use 'hg resolve --mark')
   warning: conflicts while merging bx! (edit, then use 'hg resolve --mark')
   3 files updated, 0 files merged, 0 files removed, 6 files unresolved
-  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ hg resolve -l
   U a
@@ -416,7 +416,7 @@
   warning: conflicts while merging b! (edit, then use 'hg resolve --mark')
   warning: conflicts while merging bx! (edit, then use 'hg resolve --mark')
   3 files updated, 0 files merged, 0 files removed, 6 files unresolved
-  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ tellmeabout a
   a is a plain file with content:
--- a/tests/test-merge7.t	Thu Jan 04 21:37:03 2018 -0800
+++ b/tests/test-merge7.t	Mon Jan 08 19:41:47 2018 +0530
@@ -47,7 +47,7 @@
   merging test.txt
   warning: conflicts while merging test.txt! (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 abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
 resolve conflict
   $ cat >test.txt <<"EOF"
@@ -96,7 +96,7 @@
   my test.txt@50c3a7e29886+ other test.txt@40d11a4173a8 ancestor test.txt@96b70246a118
   warning: conflicts while merging test.txt! (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 abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
 
   $ cat test.txt
--- a/tests/test-merge9.t	Thu Jan 04 21:37:03 2018 -0800
+++ b/tests/test-merge9.t	Mon Jan 08 19:41:47 2018 +0530
@@ -30,7 +30,7 @@
   merging foo and baz to baz
   merging bar failed!
   1 files updated, 1 files merged, 0 files removed, 1 files unresolved
-  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ hg resolve -l
   U bar
@@ -44,7 +44,7 @@
   merging baz and foo to baz
   merging bar failed!
   1 files updated, 1 files merged, 0 files removed, 1 files unresolved
-  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
 
 show unresolved
--- a/tests/test-mq-qnew.t	Thu Jan 04 21:37:03 2018 -0800
+++ b/tests/test-mq-qnew.t	Mon Jan 08 19:41:47 2018 +0530
@@ -162,7 +162,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 abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   (no more unresolved files)
   abort: cannot manage merge changesets
   $ rm -r sandbox
@@ -241,7 +241,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 abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   (no more unresolved files)
   abort: cannot manage merge changesets
   $ rm -r sandbox
--- a/tests/test-pathconflicts-basic.t	Thu Jan 04 21:37:03 2018 -0800
+++ b/tests/test-pathconflicts-basic.t	Mon Jan 08 19:41:47 2018 +0530
@@ -39,7 +39,7 @@
   moving a to a~853701544ac3
   getting a/b
   1 files updated, 0 files merged, 0 files removed, 1 files unresolved
-  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ hg update --clean .
   1 files updated, 0 files merged, 1 files removed, 0 files unresolved
--- a/tests/test-pathconflicts-merge.t	Thu Jan 04 21:37:03 2018 -0800
+++ b/tests/test-pathconflicts-merge.t	Mon Jan 08 19:41:47 2018 +0530
@@ -53,7 +53,7 @@
   moving a/b to a/b~0ed027b96f31
   getting a/b/c/d
   1 files updated, 0 files merged, 0 files removed, 1 files unresolved
-  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ hg status
   M a/b/c/d
@@ -77,7 +77,7 @@
   the local file has been renamed to a/b~2ea68033e3be
   resolve manually then use 'hg resolve --mark a/b'
   1 files updated, 0 files merged, 0 files removed, 1 files unresolved
-  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ hg status
   M a/b/c/d
@@ -105,7 +105,7 @@
   the remote file has been renamed to a/b~0ed027b96f31
   resolve manually then use 'hg resolve --mark a/b'
   1 files updated, 0 files merged, 0 files removed, 1 files unresolved
-  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ hg status
   A a/b~0ed027b96f31
@@ -128,7 +128,7 @@
   the remote file has been renamed to a/b~2ea68033e3be
   resolve manually then use 'hg resolve --mark a/b'
   1 files updated, 0 files merged, 0 files removed, 1 files unresolved
-  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ hg mv a/b~2ea68033e3be a/b.old
   $ readlink.py a/b.old
--- a/tests/test-rename-dir-merge.t	Thu Jan 04 21:37:03 2018 -0800
+++ b/tests/test-rename-dir-merge.t	Mon Jan 08 19:41:47 2018 +0530
@@ -134,7 +134,7 @@
   merging b/c and a/c to b/c
   warning: conflicts while merging b/c! (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 abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ hg st -A
   M b/c
@@ -164,7 +164,7 @@
   merging a/c and b/c to b/c
   warning: conflicts while merging b/c! (edit, then use 'hg resolve --mark')
   2 files updated, 0 files merged, 2 files removed, 1 files unresolved
-  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ hg st -A
   M b/a
--- a/tests/test-rename-merge2.t	Thu Jan 04 21:37:03 2018 -0800
+++ b/tests/test-rename-merge2.t	Mon Jan 08 19:41:47 2018 +0530
@@ -713,7 +713,7 @@
   launching merge tool: * ../merge *$TESTTMP/t/t/rev* * * (glob)
   merge tool returned: 0
   0 files updated, 2 files merged, 0 files removed, 1 files unresolved
-  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   --------------
   M a
   M b
@@ -758,7 +758,7 @@
   launching merge tool: * ../merge *$TESTTMP/t/t/rev* * * (glob)
   merge tool returned: 0
   0 files updated, 2 files merged, 0 files removed, 1 files unresolved
-  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   --------------
   M b
   C a
--- a/tests/test-resolve.t	Thu Jan 04 21:37:03 2018 -0800
+++ b/tests/test-resolve.t	Mon Jan 08 19:41:47 2018 +0530
@@ -34,7 +34,7 @@
   $ hg up -qC 2
   $ hg merge --tool=internal:fail 1
   0 files updated, 0 files merged, 0 files removed, 2 files unresolved
-  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
 
 resolve -l should contain unresolved entries
@@ -223,7 +223,7 @@
   $ hg up -qC 2
   $ hg merge --tool=internal:fail 1
   0 files updated, 0 files merged, 0 files removed, 2 files unresolved
-  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
 
 resolve without arguments should suggest --all
--- a/tests/test-sparse-profiles.t	Thu Jan 04 21:37:03 2018 -0800
+++ b/tests/test-sparse-profiles.t	Mon Jan 08 19:41:47 2018 +0530
@@ -125,7 +125,7 @@
   warning: conflicts while merging backend.sparse! (edit, then use 'hg resolve --mark')
   warning: conflicts while merging data.py! (edit, then use 'hg resolve --mark')
   0 files updated, 0 files merged, 0 files removed, 2 files unresolved
-  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
 
   $ rm *.orig
--- a/tests/test-sparse.t	Thu Jan 04 21:37:03 2018 -0800
+++ b/tests/test-sparse.t	Mon Jan 08 19:41:47 2018 +0530
@@ -224,7 +224,7 @@
   merging hide
   warning: conflicts while merging hide! (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 abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ hg debugsparse
   [exclude]
--- a/tests/test-status-color.t	Thu Jan 04 21:37:03 2018 -0800
+++ b/tests/test-status-color.t	Mon Jan 08 19:41:47 2018 +0530
@@ -379,7 +379,7 @@
   warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
   warning: conflicts while merging b! (edit, then use 'hg resolve --mark')
   0 files updated, 0 files merged, 0 files removed, 2 files unresolved
-  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ hg resolve -m b
 
--- a/tests/test-subrepo.t	Thu Jan 04 21:37:03 2018 -0800
+++ b/tests/test-subrepo.t	Mon Jan 08 19:41:47 2018 +0530
@@ -321,7 +321,7 @@
   my t@20a0db6fbf6c+ other t@7af322bc1198 ancestor t@6747d179aa9a
   warning: conflicts while merging t! (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 abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
     subrepo t: merge with t:7af322bc1198a32402fe903e0b7ebcfc5c9bf8f4:hg
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   (branch merge, don't forget to commit)
--- a/tests/test-tag.t	Thu Jan 04 21:37:03 2018 -0800
+++ b/tests/test-tag.t	Mon Jan 08 19:41:47 2018 +0530
@@ -708,7 +708,7 @@
   the following 1 tags are in conflict: t7
   automatic tag merging of .hgtags failed! (use 'hg resolve --tool :merge' or another merge tool of your choice)
   2 files updated, 0 files merged, 0 files removed, 1 files unresolved
-  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ hg resolve -l
   U .hgtags