comparison 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
comparison
equal deleted inserted replaced
12680:d664547ef540 12681:bc13e17067d9
75 $ norevtest 'none clean linear' clean 4 75 $ norevtest 'none clean linear' clean 4
76 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 76 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
77 parent=5 77 parent=5
78 78
79 $ norevtest 'none clean same' clean 2 79 $ norevtest 'none clean same' clean 2
80 abort: crosses branches (use 'hg merge' or use 'hg update -c') 80 abort: crosses branches (merge branches or use --check to force update)
81 parent=2 81 parent=2
82 82
83 83
84 $ revtest 'none clean linear' clean 1 2 84 $ revtest 'none clean linear' clean 1 2
85 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 85 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
98 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 98 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
99 parent=2 99 parent=2
100 M foo 100 M foo
101 101
102 $ revtest 'none dirty same' dirty 2 3 102 $ revtest 'none dirty same' dirty 2 3
103 abort: crosses branches (use 'hg merge' to merge or use 'hg update -C' to discard changes) 103 abort: crosses branches (merge branches or use --clean to discard changes)
104 parent=2 104 parent=2
105 M foo 105 M foo
106 106
107 $ revtest 'none dirty cross' dirty 3 4 107 $ revtest 'none dirty cross' dirty 3 4
108 abort: crosses branches (use 'hg merge' to merge or use 'hg update -C' to discard changes) 108 abort: crosses branches (merge branches or use --clean to discard changes)
109 parent=3 109 parent=3
110 M foo 110 M foo
111 111
112 112
113 $ revtest '-C dirty linear' dirty 1 2 -C 113 $ revtest '-C dirty linear' dirty 1 2 -C