Augie Fackler avatar Augie Fackler committed 9fe7e6a

merge: better error messages to lead users to hg update --clean to abandon merges.

Fixes issue1533.

Comments (0)

Files changed (11)

     stats = _merge.update(repo, node, True, force, False)
     _showstats(repo, stats)
     if stats[3]:
-        repo.ui.status(_("use 'hg resolve' to retry unresolved file merges\n"))
+        repo.ui.status(_("use 'hg resolve' to retry unresolved file merges "
+                         "or 'hg up --clean' to abandon\n"))
     elif remind:
         repo.ui.status(_("(branch merge, don't forget to commit)\n"))
     return stats[3] > 0

tests/test-add.out

 warning: conflicts during merge.
 merging a failed!
 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
-use 'hg resolve' to retry unresolved file merges
+use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
 M a
 ? a.orig
 % should fail

tests/test-commit-unresolved.out

 warning: conflicts during merge.
 merging A failed!
 1 files updated, 0 files merged, 0 files removed, 1 files unresolved
-use 'hg resolve' to retry unresolved file merges
+use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
 
 % Correct the conflict without marking the file as resolved
 abort: unresolved merge conflicts (see hg resolve)

tests/test-conflict.out

 warning: conflicts during merge.
 merging a failed!
 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
-use 'hg resolve' to retry unresolved file merges
+use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
 e7fe8eb3e180+0d24b7662d3e+ tip
 <<<<<<< local
 something else

tests/test-convert-svn-sink.out

 warning: conflicts during merge.
 merging b failed!
 2 files updated, 0 files merged, 0 files removed, 1 files unresolved
-use 'hg resolve' to retry unresolved file merges
+use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
 assuming destination b-hg
 initializing svn repo 'b-hg'
 initializing svn wc 'b-hg-wc'

tests/test-keyword.out

 warning: conflicts during merge.
 merging m failed!
 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
-use 'hg resolve' to retry unresolved file merges
+use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
 % keyword stays outside conflict zone
 $Id$
 <<<<<<< local

tests/test-merge-internal-tools-pattern.out

 created new head
 # merge using internal:fail tool
 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
-use 'hg resolve' to retry unresolved file merges
+use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
 line 1
 line 2
 third line

tests/test-merge-tools.out

 warning: conflicts during merge.
 merging f failed!
 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
-use 'hg resolve' to retry unresolved file merges
+use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
 # cat f
 <<<<<<< local
 revision 1
 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
+use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
 # cat f
 revision 1
 space
 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
+use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
 # cat f
 revision 1
 space
 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
+use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
 # cat f
 revision 1
 space
 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
+use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
 # cat f
 revision 1
 space
 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
+use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
 # cat f
 revision 1
 space
 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
+use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
 # cat f
 revision 1
 space
 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
+use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
 # cat f
 revision 1
 space
 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
+use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
 # cat f
 revision 1
 space
 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
+use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
 # cat f
 revision 1
 space

tests/test-merge7.out

 warning: conflicts during merge.
 merging test.txt failed!
 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
-use 'hg resolve' to retry unresolved file merges
+use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
 pulling from ../test-a
 searching for changes
 adding changesets
 warning: conflicts during merge.
 merging test.txt failed!
 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
-use 'hg resolve' to retry unresolved file merges
+use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
 one
 <<<<<<< local
 two-point-five

tests/test-merge9.out

 merging bar failed!
 merging foo and baz to baz
 1 files updated, 1 files merged, 0 files removed, 1 files unresolved
-use 'hg resolve' to retry unresolved file merges
+use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
 U bar
 R baz
 3 files updated, 0 files merged, 1 files removed, 0 files unresolved
 merging bar failed!
 merging baz and foo to baz
 1 files updated, 1 files merged, 0 files removed, 1 files unresolved
-use 'hg resolve' to retry unresolved file merges
+use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
 % show unresolved
 U bar
 R baz

tests/test-resolve.out

 created new head
 % failing merge
 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
-use 'hg resolve' to retry unresolved file merges
+use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
 % resolve -l, should be empty
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.