Show More
@@ -1,33 +1,43 b'' | |||||
1 | #!/bin/sh |
|
1 | test that a commit clears the merge state. | |
2 |
|
2 | |||
3 | # test that a commit clears the merge state. |
|
3 | $ hg init repo | |
|
4 | $ cd repo | |||
|
5 | ||||
|
6 | $ echo foo > file | |||
|
7 | $ hg commit -Am 'add file' | |||
|
8 | adding file | |||
4 |
|
9 | |||
5 | hg init repo |
|
10 | $ echo bar >> file | |
6 | cd repo |
|
11 | $ hg commit -Am 'append bar' | |
|
12 | ||||
|
13 | ||||
|
14 | create a second head | |||
7 |
|
15 | |||
8 | echo foo > file |
|
16 | $ hg up -C 0 | |
9 | hg commit -Am 'add file' |
|
17 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
10 |
|
18 | $ echo baz >> file | ||
11 | echo bar >> file |
|
19 | $ hg commit -Am 'append baz' | |
12 | hg commit -Am 'append bar' |
|
20 | created new head | |
13 |
|
21 | |||
14 | echo % create a second head |
|
22 | failing merge | |
15 | hg up -C 0 |
|
|||
16 | echo baz >> file |
|
|||
17 | hg commit -Am 'append baz' |
|
|||
18 |
|
23 | |||
19 | echo % failing merge |
|
24 | $ HGMERGE=internal:fail hg merge | |
20 | HGMERGE=internal:fail hg merge |
|
25 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
|
26 | use 'hg resolve' to retry unresolved file merges or 'hg update -C' to abandon | |||
|
27 | ||||
|
28 | $ echo resolved > file | |||
|
29 | $ hg resolve -m file | |||
|
30 | $ hg commit -m 'resolved' | |||
21 |
|
31 | |||
22 | echo resolved > file |
|
32 | resolve -l, should be empty | |
23 | hg resolve -m file |
|
33 | ||
24 | hg commit -m 'resolved' |
|
34 | $ hg resolve -l | |
|
35 | ||||
|
36 | test crashed merge with empty mergestate | |||
25 |
|
37 | |||
26 | echo % resolve -l, should be empty |
|
38 | $ mkdir .hg/merge | |
27 | hg resolve -l |
|
39 | $ touch .hg/merge/state | |
28 |
|
40 | |||
29 | # test crashed merge with empty mergestate |
|
41 | resolve -l, should be empty | |
30 | mkdir .hg/merge |
|
42 | ||
31 | touch .hg/merge/state |
|
43 | $ hg resolve -l | |
32 | echo % resolve -l, should be empty |
|
|||
33 | hg resolve -l |
|
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