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