comparison tests/test-merge5.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 4134686b83e1
children 610873cf064a
comparison
equal deleted inserted replaced
12680:d664547ef540 12681:bc13e17067d9
12 removing b 12 removing b
13 created new head 13 created new head
14 $ hg update 1 14 $ hg update 1
15 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 15 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
16 $ hg update 16 $ hg update
17 abort: crosses branches (use 'hg merge' or use 'hg update -c') 17 abort: crosses branches (merge branches or use --check to force update)
18 [255] 18 [255]
19 $ hg update -c 19 $ hg update -c
20 0 files updated, 0 files merged, 1 files removed, 0 files unresolved 20 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
21 $ mv a c 21 $ mv a c
22 22
25 or delete". 25 or delete".
26 26
27 Should abort: 27 Should abort:
28 28
29 $ hg update -y 1 29 $ hg update -y 1
30 abort: crosses branches (use 'hg merge' to merge or use 'hg update -C' to discard changes) 30 abort: crosses branches (merge branches or use --clean to discard changes)
31 [255] 31 [255]
32 $ mv c a 32 $ mv c a
33 33
34 Should succeed: 34 Should succeed:
35 35