diff tests/test-update-branches.t @ 12681:bc13e17067d9

update: use higher level wording for "crosses branches" error When using "hg update" to update to a revision on another branch, if the user has uncommitted changes in the working directory, hg aborts with the following message: abort: crosses branches (use 'hg merge' to merge or use 'hg update -C' to discard changes) If the user isn't trying to update to tip and they follow the command examples verbatim, they would end up updating to the wrong revision. This patch removes the command examples in favor of just telling the user to either merge or use --clean: abort: crosses branches (merge branches or use --clean to discard changes) hg also aborts if the user tries to use "hg update" to get to tip (without specifying a revision) and tip is on another branch: abort: crosses branches (use 'hg merge' or use 'hg update -c') This message is changed in the same fashion: abort: crosses branches (merge branches or use --check to force update)
author Brodie Rao <brodie@bitheap.org>
date Sat, 09 Oct 2010 17:02:28 -0500
parents b63f6422d2a7
children 610873cf064a
line wrap: on
line diff
--- a/tests/test-update-branches.t	Sat Oct 09 17:58:48 2010 -0500
+++ b/tests/test-update-branches.t	Sat Oct 09 17:02:28 2010 -0500
@@ -77,7 +77,7 @@
   parent=5
 
   $ norevtest 'none clean same'   clean 2
-  abort: crosses branches (use 'hg merge' or use 'hg update -c')
+  abort: crosses branches (merge branches or use --check to force update)
   parent=2
 
 
@@ -100,12 +100,12 @@
   M foo
 
   $ revtest 'none dirty same'   dirty 2 3
-  abort: crosses branches (use 'hg merge' to merge or use 'hg update -C' to discard changes)
+  abort: crosses branches (merge branches or use --clean to discard changes)
   parent=2
   M foo
 
   $ revtest 'none dirty cross'  dirty 3 4
-  abort: crosses branches (use 'hg merge' to merge or use 'hg update -C' to discard changes)
+  abort: crosses branches (merge branches or use --clean to discard changes)
   parent=3
   M foo