##// END OF EJS Templates
tests: unify test-add
Nicolas Dumazet -
r11795:06793ad3 default
parent child Browse files
Show More
@@ -1,55 +1,96 b''
1 #!/bin/sh
1 $ hg init a
2
2 $ cd a
3 hg init a
3 $ echo a > a
4 cd a
4 $ hg add -n
5 echo a > a
5 adding a
6 hg add -n
6 $ hg st
7 hg st
7 ? a
8 hg add
8 $ hg add
9 hg st
9 adding a
10 hg forget a
10 $ hg st
11 hg add
11 A a
12 hg st
12 $ hg forget a
13 $ hg add
14 adding a
15 $ hg st
16 A a
13
17
14 echo b > b
18 $ echo b > b
15 hg add -n b
19 $ hg add -n b
16 hg st
20 $ hg st
17 hg add b || echo "failed to add b"
21 A a
18 hg st
22 ? b
19 echo % should fail
23 $ hg add b || echo "failed to add b"
20 hg add b
24 $ hg st
21 hg st
25 A a
26 A b
27
28 should fail
22
29
23 hg ci -m 0 --traceback
30 $ hg add b
24 echo % should fail
31 b already tracked!
25 hg add a
32 $ hg st
33 A a
34 A b
35
36 $ hg ci -m 0 --traceback
37
38 should fail
39
40 $ hg add a
41 a already tracked!
26
42
27 echo aa > a
43 $ echo aa > a
28 hg ci -m 1
44 $ hg ci -m 1
29 hg up 0
45 $ hg up 0
30 echo aaa > a
46 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
31 hg ci -m 2
47 $ echo aaa > a
48 $ hg ci -m 2
49 created new head
32
50
33 hg merge
51 $ hg merge
34 hg st
52 merging a
35 echo % should fail
53 warning: conflicts during merge.
36 hg add a
54 merging a failed!
37 hg st
55 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
38 hg resolve -m a
56 use 'hg resolve' to retry unresolved file merges or 'hg update -C' to abandon
39 hg ci -m merge
57 $ hg st
58 M a
59 ? a.orig
60
61 should fail
40
62
41 echo % issue683
63 $ hg add a
42 hg forget a
64 a already tracked!
43 hg add a
65 $ hg st
44 hg st
66 M a
45 hg rm a
67 ? a.orig
46 hg st
68 $ hg resolve -m a
47 echo a > a
69 $ hg ci -m merge
48 hg add a
70
49 hg st
71 issue683
50
72
51 hg add c && echo "unexpected addition of missing file"
73 $ hg forget a
52 echo c > c
74 $ hg add a
53 hg add d c && echo "unexpected addition of missing file"
75 $ hg st
54 hg st
76 ? a.orig
77 $ hg rm a
78 $ hg st
79 R a
80 ? a.orig
81 $ echo a > a
82 $ hg add a
83 $ hg st
84 M a
85 ? a.orig
55
86
87 $ hg add c && echo "unexpected addition of missing file"
88 c: No such file or directory
89 $ echo c > c
90 $ hg add d c && echo "unexpected addition of missing file"
91 d: No such file or directory
92 $ hg st
93 M a
94 A c
95 ? a.orig
96
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