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