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