Show More
@@ -1,29 +1,35 b'' | |||||
1 | $ mkdir t |
|
1 | $ mkdir t | |
2 | $ cd t |
|
2 | $ cd t | |
3 | $ hg init |
|
3 | $ hg init | |
4 | $ echo This is file a1 > a |
|
4 | $ echo This is file a1 > a | |
5 | $ echo This is file b1 > b |
|
5 | $ echo This is file b1 > b | |
6 | $ hg add a b |
|
6 | $ hg add a b | |
7 | $ hg commit -m "commit #0" -d "1000000 0" |
|
7 | $ hg commit -m "commit #0" -d "1000000 0" | |
8 | $ echo This is file b22 > b |
|
8 | $ echo This is file b22 > b | |
9 | $ hg commit -m"comment #1" -d "1000000 0" |
|
9 | $ hg commit -m"comment #1" -d "1000000 0" | |
10 | $ hg update 0 |
|
10 | $ hg update 0 | |
11 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
11 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
12 | $ rm b |
|
12 | $ rm b | |
13 | $ hg commit -A -m"comment #2" -d "1000000 0" |
|
13 | $ hg commit -A -m"comment #2" -d "1000000 0" | |
14 | removing b |
|
14 | removing b | |
15 | created new head |
|
15 | created new head | |
|
16 | $ hg update 1 | |||
|
17 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
18 | $ hg update | |||
|
19 | abort: crosses branches (use 'hg merge' or use 'hg update -c') | |||
|
20 | $ hg update -c | |||
|
21 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |||
16 | $ mv a c |
|
22 | $ mv a c | |
17 | in theory, we shouldn't need the "-y" below, but it prevents |
|
23 | in theory, we shouldn't need the "-y" below, but it prevents | |
18 | this test from hanging when "hg update" erroneously prompts the |
|
24 | this test from hanging when "hg update" erroneously prompts the | |
19 | user for "keep or delete" |
|
25 | user for "keep or delete" | |
20 |
|
26 | |||
21 | should abort |
|
27 | should abort | |
22 | $ hg update -y 1 |
|
28 | $ hg update -y 1 | |
23 | abort: crosses branches (use 'hg merge' to merge or use 'hg update -C' to discard changes) |
|
29 | abort: crosses branches (use 'hg merge' to merge or use 'hg update -C' to discard changes) | |
24 | $ mv c a |
|
30 | $ mv c a | |
25 | should succeed |
|
31 | should succeed | |
26 | $ hg update -y 1 |
|
32 | $ hg update -y 1 | |
27 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
33 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
28 |
|
34 | |||
29 | $ exit 0 |
|
35 | $ exit 0 |
General Comments 0
You need to be logged in to leave comments.
Login now