##// END OF EJS Templates
test-resolve: add test resolving one of two files...
Martin von Zweigbergk -
r23021:41770cee default
parent child Browse files
Show More
@@ -1,65 +1,79
1 test that a commit clears the merge state.
1 test that a commit clears the merge state.
2
2
3 $ hg init repo
3 $ hg init repo
4 $ cd repo
4 $ cd repo
5
5
6 $ echo foo > file
6 $ echo foo > file1
7 $ hg commit -Am 'add file'
7 $ echo foo > file2
8 adding file
8 $ hg commit -Am 'add files'
9 adding file1
10 adding file2
9
11
10 $ echo bar >> file
12 $ echo bar >> file1
11 $ hg commit -Am 'append bar'
13 $ echo bar >> file2
12
14 $ hg commit -Am 'append bar to files'
13
15
14 create a second head
16 create a second head
15
17
16 $ hg up -C 0
18 $ hg up -C 0
17 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
19 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
18 $ echo baz >> file
20 $ echo baz >> file1
19 $ hg commit -Am 'append baz'
21 $ echo baz >> file2
22 $ hg commit -Am 'append baz to files'
20 created new head
23 created new head
21
24
22 failing merge
25 failing merge
23
26
24 $ hg merge --tool=internal:fail
27 $ hg merge --tool=internal:fail
25 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
28 0 files updated, 0 files merged, 0 files removed, 2 files unresolved
26 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
29 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
27 [1]
30 [1]
28
31
29 resolve -l should contain an unresolved entry
32 resolve -l should contain unresolved entries
30
33
31 $ hg resolve -l
34 $ hg resolve -l
32 U file
35 U file1
36 U file2
33
37
34 resolving an unknown path should emit a warning
38 resolving an unknown path should emit a warning
35
39
36 $ hg resolve -m does-not-exist
40 $ hg resolve -m does-not-exist
37 arguments do not match paths that need resolving
41 arguments do not match paths that need resolving
38
42
39 resolve the failure
43 resolve the failure
40
44
41 $ echo resolved > file
45 $ echo resolved > file1
42 $ hg resolve -m file
46 $ hg resolve -m file1
47
48 resolve -l should show resolved file as resolved
49
50 $ hg resolve -l
51 R file1
52 U file2
53
54 resolve -m without paths should mark all resolved
55
56 $ hg resolve -m
43 (no more unresolved files)
57 (no more unresolved files)
44 $ hg commit -m 'resolved'
58 $ hg commit -m 'resolved'
45
59
46 resolve -l should be empty after commit
60 resolve -l should be empty after commit
47
61
48 $ hg resolve -l
62 $ hg resolve -l
49
63
50 resolve -m should abort when no merge in progress
64 resolve -m should abort when no merge in progress
51
65
52 $ hg resolve -m
66 $ hg resolve -m
53 abort: resolve command not applicable when not merging
67 abort: resolve command not applicable when not merging
54 [255]
68 [255]
55
69
56 test crashed merge with empty mergestate
70 test crashed merge with empty mergestate
57
71
58 $ mkdir .hg/merge
72 $ mkdir .hg/merge
59 $ touch .hg/merge/state
73 $ touch .hg/merge/state
60
74
61 resolve -l should be empty
75 resolve -l should be empty
62
76
63 $ hg resolve -l
77 $ hg resolve -l
64
78
65 $ cd ..
79 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now