changeset 7821:9fe7e6acf525

merge: better error messages to lead users to hg update --clean to abandon merges. Fixes issue1533.
author Augie Fackler <durin42@gmail.com>
date Wed, 04 Mar 2009 13:06:16 -0600
parents 346fafc144fc
children 1079e666e938
files mercurial/hg.py tests/test-add.out tests/test-commit-unresolved.out tests/test-conflict.out tests/test-convert-svn-sink.out tests/test-keyword.out tests/test-merge-internal-tools-pattern.out tests/test-merge-tools.out tests/test-merge7.out tests/test-merge9.out tests/test-resolve.out
diffstat 11 files changed, 23 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hg.py	Wed Mar 04 17:02:16 2009 -0600
+++ b/mercurial/hg.py	Wed Mar 04 13:06:16 2009 -0600
@@ -274,7 +274,8 @@
     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
--- a/tests/test-add.out	Wed Mar 04 17:02:16 2009 -0600
+++ b/tests/test-add.out	Wed Mar 04 13:06:16 2009 -0600
@@ -18,7 +18,7 @@
 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
--- a/tests/test-commit-unresolved.out	Wed Mar 04 17:02:16 2009 -0600
+++ b/tests/test-commit-unresolved.out	Wed Mar 04 13:06:16 2009 -0600
@@ -6,7 +6,7 @@
 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)
--- a/tests/test-conflict.out	Wed Mar 04 17:02:16 2009 -0600
+++ b/tests/test-conflict.out	Wed Mar 04 13:06:16 2009 -0600
@@ -4,7 +4,7 @@
 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
--- a/tests/test-convert-svn-sink.out	Wed Mar 04 17:02:16 2009 -0600
+++ b/tests/test-convert-svn-sink.out	Wed Mar 04 13:06:16 2009 -0600
@@ -265,7 +265,7 @@
 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'
--- a/tests/test-keyword.out	Wed Mar 04 17:02:16 2009 -0600
+++ b/tests/test-keyword.out	Wed Mar 04 13:06:16 2009 -0600
@@ -458,7 +458,7 @@
 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
--- a/tests/test-merge-internal-tools-pattern.out	Wed Mar 04 17:02:16 2009 -0600
+++ b/tests/test-merge-internal-tools-pattern.out	Wed Mar 04 13:06:16 2009 -0600
@@ -9,7 +9,7 @@
 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
--- a/tests/test-merge-tools.out	Wed Mar 04 17:02:16 2009 -0600
+++ b/tests/test-merge-tools.out	Wed Mar 04 13:06:16 2009 -0600
@@ -17,7 +17,7 @@
 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
@@ -37,7 +37,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
+use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
 # cat f
 revision 1
 space
@@ -69,7 +69,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
+use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
 # cat f
 revision 1
 space
@@ -86,7 +86,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
+use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
 # cat f
 revision 1
 space
@@ -103,7 +103,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
+use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
 # cat f
 revision 1
 space
@@ -120,7 +120,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
+use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
 # cat f
 revision 1
 space
@@ -185,7 +185,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
+use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
 # cat f
 revision 1
 space
@@ -204,7 +204,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
+use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
 # cat f
 revision 1
 space
@@ -223,7 +223,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
+use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
 # cat f
 revision 1
 space
@@ -385,7 +385,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
+use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
 # cat f
 revision 1
 space
--- a/tests/test-merge7.out	Wed Mar 04 17:02:16 2009 -0600
+++ b/tests/test-merge7.out	Wed Mar 04 13:06:16 2009 -0600
@@ -11,7 +11,7 @@
 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
@@ -31,7 +31,7 @@
 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
--- a/tests/test-merge9.out	Wed Mar 04 17:02:16 2009 -0600
+++ b/tests/test-merge9.out	Wed Mar 04 13:06:16 2009 -0600
@@ -7,7 +7,7 @@
 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
@@ -15,7 +15,7 @@
 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
--- a/tests/test-resolve.out	Wed Mar 04 17:02:16 2009 -0600
+++ b/tests/test-resolve.out	Wed Mar 04 13:06:16 2009 -0600
@@ -4,5 +4,5 @@
 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