merge: suggest 'hg up -C .' for discarding changes, not 'hg up -C'
Without specifying the parent revision of the working copy, users will
update to tip, which is most likely the other head they were trying to
merge, not the revision they were at before the merge.
--- a/mercurial/hg.py Thu Sep 16 16:00:29 2010 +0200
+++ b/mercurial/hg.py Sun Sep 12 18:05:53 2010 -0500
@@ -403,7 +403,7 @@
_showstats(repo, stats)
if stats[3]:
repo.ui.status(_("use 'hg resolve' to retry unresolved file merges "
- "or 'hg update -C' to abandon\n"))
+ "or 'hg update -C .' to abandon\n"))
elif remind:
repo.ui.status(_("(branch merge, don't forget to commit)\n"))
return stats[3] > 0
--- a/tests/test-add.t Thu Sep 16 16:00:29 2010 +0200
+++ b/tests/test-add.t Sun Sep 12 18:05:53 2010 -0500
@@ -53,7 +53,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 or 'hg update -C' to abandon
+ use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
$ hg st
M a
? a.orig
--- a/tests/test-commit-unresolved.t Thu Sep 16 16:00:29 2010 +0200
+++ b/tests/test-commit-unresolved.t Sun Sep 12 18:05:53 2010 -0500
@@ -31,7 +31,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 or 'hg update -C' to abandon
+ use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
Correct the conflict without marking the file as resolved
--- a/tests/test-conflict.t Thu Sep 16 16:00:29 2010 +0200
+++ b/tests/test-conflict.t Sun Sep 12 18:05:53 2010 -0500
@@ -15,7 +15,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 or 'hg update -C' to abandon
+ use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
$ hg id
32e80765d7fe+75234512624c+ tip
--- a/tests/test-convert-svn-sink.out Thu Sep 16 16:00:29 2010 +0200
+++ b/tests/test-convert-svn-sink.out Sun Sep 12 18:05:53 2010 -0500
@@ -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 or 'hg update -C' to abandon
+use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
assuming destination b-hg
initializing svn repository 'b-hg'
initializing svn working copy 'b-hg-wc'
--- a/tests/test-keyword.t Thu Sep 16 16:00:29 2010 +0200
+++ b/tests/test-keyword.t Sun Sep 12 18:05:53 2010 -0500
@@ -817,7 +817,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 or 'hg update -C' to abandon
+ use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
$ cat m
$Id$
<<<<<<< local
--- a/tests/test-log.t Thu Sep 16 16:00:29 2010 +0200
+++ b/tests/test-log.t Sun Sep 12 18:05:53 2010 -0500
@@ -898,7 +898,7 @@
warning: conflicts during merge.
merging foo 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 update -C .' to abandon
$ echo 'merge 1' > foo
$ hg resolve -m foo
$ hg ci -m "First merge, related"
@@ -908,7 +908,7 @@
warning: conflicts during merge.
merging foo failed!
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 update -C .' to abandon
$ echo 'merge 2' > foo
$ hg resolve -m foo
$ hg ci -m "Last merge, related"
--- a/tests/test-merge-internal-tools-pattern.t Thu Sep 16 16:00:29 2010 +0200
+++ b/tests/test-merge-internal-tools-pattern.t Sun Sep 12 18:05:53 2010 -0500
@@ -42,7 +42,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 update -C .' to abandon
$ cat f
line 1
--- a/tests/test-merge-tools.out Thu Sep 16 16:00:29 2010 +0200
+++ b/tests/test-merge-tools.out Sun Sep 12 18:05:53 2010 -0500
@@ -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 or 'hg update -C' to abandon
+use 'hg resolve' to retry unresolved file merges or 'hg update -C .' 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 or 'hg update -C' to abandon
+use 'hg resolve' to retry unresolved file merges or 'hg update -C .' 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 or 'hg update -C' to abandon
+use 'hg resolve' to retry unresolved file merges or 'hg update -C .' 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 or 'hg update -C' to abandon
+use 'hg resolve' to retry unresolved file merges or 'hg update -C .' 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 or 'hg update -C' to abandon
+use 'hg resolve' to retry unresolved file merges or 'hg update -C .' 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 or 'hg update -C' to abandon
+use 'hg resolve' to retry unresolved file merges or 'hg update -C .' 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 or 'hg update -C' to abandon
+use 'hg resolve' to retry unresolved file merges or 'hg update -C .' 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 or 'hg update -C' to abandon
+use 'hg resolve' to retry unresolved file merges or 'hg update -C .' 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 or 'hg update -C' to abandon
+use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
# cat f
revision 1
space
@@ -244,7 +244,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 update -C .' to abandon
# cat f
revision 1
space
@@ -260,7 +260,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 update -C .' to abandon
# cat f
revision 1
space
@@ -323,7 +323,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 update -C .' to abandon
# cat f
revision 1
space
@@ -354,7 +354,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 update -C .' to abandon
# cat f
revision 1
space
@@ -537,7 +537,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 update -C .' to abandon
# cat f
revision 1
space
--- a/tests/test-merge7.t Thu Sep 16 16:00:29 2010 +0200
+++ b/tests/test-merge7.t Sun Sep 12 18:05:53 2010 -0500
@@ -47,7 +47,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 or 'hg update -C' to abandon
+ use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
resolve conflict
$ cat >test.txt <<"EOF"
> one
@@ -91,7 +91,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 or 'hg update -C' to abandon
+ use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
$ cat test.txt
one
--- a/tests/test-merge9.t Thu Sep 16 16:00:29 2010 +0200
+++ b/tests/test-merge9.t Sun Sep 12 18:05:53 2010 -0500
@@ -30,7 +30,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 or 'hg update -C' to abandon
+ use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
$ hg resolve -l
U bar
R baz
@@ -43,7 +43,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 or 'hg update -C' to abandon
+ use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
show unresolved
$ hg resolve -l
--- a/tests/test-mq-qnew.out Thu Sep 16 16:00:29 2010 +0200
+++ b/tests/test-mq-qnew.out Sun Sep 12 18:05:53 2010 -0500
@@ -53,7 +53,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 or 'hg update -C' to abandon
+use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
abort: cannot manage merge changesets
%%% hg headers
adding a
@@ -116,5 +116,5 @@
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 or 'hg update -C' to abandon
+use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
abort: cannot manage merge changesets
--- a/tests/test-resolve.t Thu Sep 16 16:00:29 2010 +0200
+++ b/tests/test-resolve.t Sun Sep 12 18:05:53 2010 -0500
@@ -23,7 +23,7 @@
$ HGMERGE=internal:fail 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 update -C .' to abandon
$ echo resolved > file
$ hg resolve -m file
--- a/tests/test-status-color.t Thu Sep 16 16:00:29 2010 +0200
+++ b/tests/test-status-color.t Sun Sep 12 18:05:53 2010 -0500
@@ -267,7 +267,7 @@
warning: conflicts during merge.
merging b failed!
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 update -C .' to abandon
$ hg resolve -m b
hg resolve with one unresolved, one resolved:
--- a/tests/test-subrepo.t Thu Sep 16 16:00:29 2010 +0200
+++ b/tests/test-subrepo.t Sun Sep 12 18:05:53 2010 -0500
@@ -217,7 +217,7 @@
warning: conflicts during merge.
merging t 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 update -C .' to abandon
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)