##// END OF EJS Templates
test-revert-interactive: eliminate bashism in wildcard pattern...
Yuya Nishihara -
r24389:93d3e1a8 default
parent child Browse files
Show More
@@ -1,203 +1,203
1 1 Revert interactive tests
2 2 1 add and commit file f
3 3 2 add commit file folder1/g
4 4 3 add and commit file folder2/h
5 5 4 add and commit file folder1/i
6 6 5 commit change to file f
7 7 6 commit changes to files folder1/g folder2/h
8 8 7 commit changes to files folder1/g folder2/h
9 9 8 revert interactive to commit id 2 (line 3 above), check that folder1/i is removed and
10 10 9 make workdir match 7
11 11 10 run the same test than 8 from within folder1 and check same expectations
12 12
13 13 $ cat <<EOF >> $HGRCPATH
14 14 > [ui]
15 15 > interactive = true
16 16 > [extensions]
17 17 > record =
18 18 > EOF
19 19
20 20
21 $ mkdir -p a/{folder1,folder2}
21 $ mkdir -p a/folder1 a/folder2
22 22 $ cd a
23 23 $ hg init
24 24 $ python $TESTDIR/seq.py 1 5 > f ; hg add f ; hg commit -m "adding f"
25 25 $ cat f > folder1/g ; hg add folder1/g ; hg commit -m "adding folder1/g"
26 26 $ cat f > folder2/h ; hg add folder2/h ; hg commit -m "adding folder2/h"
27 27 $ cat f > folder1/i ; hg add folder1/i ; hg commit -m "adding folder1/i"
28 28 $ echo "a" > f ; python $TESTDIR/seq.py 1 5 >> f ; echo "b" >> f ; hg commit -m "modifying f"
29 29 $ echo "c" > folder1/g ; python $TESTDIR/seq.py 1 5 >> folder1/g ; echo "d" >> folder1/g ; hg commit -m "modifying folder1/g"
30 30 $ echo "e" > folder2/h ; python $TESTDIR/seq.py 1 5 >> folder2/h ; echo "f" >> folder2/h ; hg commit -m "modifying folder2/h"
31 31 $ hg tip
32 32 changeset: 6:59dd6e4ab63a
33 33 tag: tip
34 34 user: test
35 35 date: Thu Jan 01 00:00:00 1970 +0000
36 36 summary: modifying folder2/h
37 37
38 38 $ hg revert -i -r 2 --all -- << EOF
39 39 > y
40 40 > y
41 41 > y
42 42 > y
43 43 > y
44 44 > n
45 45 > n
46 46 > EOF
47 47 reverting f
48 48 reverting folder1/g (glob)
49 49 removing folder1/i (glob)
50 50 reverting folder2/h (glob)
51 51 diff -r 89ac3d72e4a4 f
52 52 2 hunks, 2 lines changed
53 53 examine changes to 'f'? [Ynesfdaq?] y
54 54
55 55 @@ -1,6 +1,5 @@
56 56 -a
57 57 1
58 58 2
59 59 3
60 60 4
61 61 5
62 62 record change 1/6 to 'f'? [Ynesfdaq?] y
63 63
64 64 @@ -2,6 +1,5 @@
65 65 1
66 66 2
67 67 3
68 68 4
69 69 5
70 70 -b
71 71 record change 2/6 to 'f'? [Ynesfdaq?] y
72 72
73 73 diff -r 89ac3d72e4a4 folder1/g
74 74 2 hunks, 2 lines changed
75 75 examine changes to 'folder1/g'? [Ynesfdaq?] y
76 76
77 77 @@ -1,6 +1,5 @@
78 78 -c
79 79 1
80 80 2
81 81 3
82 82 4
83 83 5
84 84 record change 3/6 to 'folder1/g'? [Ynesfdaq?] y
85 85
86 86 @@ -2,6 +1,5 @@
87 87 1
88 88 2
89 89 3
90 90 4
91 91 5
92 92 -d
93 93 record change 4/6 to 'folder1/g'? [Ynesfdaq?] n
94 94
95 95 diff -r 89ac3d72e4a4 folder2/h
96 96 2 hunks, 2 lines changed
97 97 examine changes to 'folder2/h'? [Ynesfdaq?] n
98 98
99 99 $ cat f
100 100 1
101 101 2
102 102 3
103 103 4
104 104 5
105 105 $ cat folder1/g
106 106 1
107 107 2
108 108 3
109 109 4
110 110 5
111 111 d
112 112 $ cat folder2/h
113 113 e
114 114 1
115 115 2
116 116 3
117 117 4
118 118 5
119 119 f
120 120 $ hg update -C 6
121 121 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
122 122 $ hg revert -i -r 2 --all -- << EOF
123 123 > y
124 124 > y
125 125 > y
126 126 > y
127 127 > y
128 128 > n
129 129 > n
130 130 > EOF
131 131 reverting f
132 132 reverting folder1/g (glob)
133 133 removing folder1/i (glob)
134 134 reverting folder2/h (glob)
135 135 diff -r 89ac3d72e4a4 f
136 136 2 hunks, 2 lines changed
137 137 examine changes to 'f'? [Ynesfdaq?] y
138 138
139 139 @@ -1,6 +1,5 @@
140 140 -a
141 141 1
142 142 2
143 143 3
144 144 4
145 145 5
146 146 record change 1/6 to 'f'? [Ynesfdaq?] y
147 147
148 148 @@ -2,6 +1,5 @@
149 149 1
150 150 2
151 151 3
152 152 4
153 153 5
154 154 -b
155 155 record change 2/6 to 'f'? [Ynesfdaq?] y
156 156
157 157 diff -r 89ac3d72e4a4 folder1/g
158 158 2 hunks, 2 lines changed
159 159 examine changes to 'folder1/g'? [Ynesfdaq?] y
160 160
161 161 @@ -1,6 +1,5 @@
162 162 -c
163 163 1
164 164 2
165 165 3
166 166 4
167 167 5
168 168 record change 3/6 to 'folder1/g'? [Ynesfdaq?] y
169 169
170 170 @@ -2,6 +1,5 @@
171 171 1
172 172 2
173 173 3
174 174 4
175 175 5
176 176 -d
177 177 record change 4/6 to 'folder1/g'? [Ynesfdaq?] n
178 178
179 179 diff -r 89ac3d72e4a4 folder2/h
180 180 2 hunks, 2 lines changed
181 181 examine changes to 'folder2/h'? [Ynesfdaq?] n
182 182
183 183 $ cat f
184 184 1
185 185 2
186 186 3
187 187 4
188 188 5
189 189 $ cat folder1/g
190 190 1
191 191 2
192 192 3
193 193 4
194 194 5
195 195 d
196 196 $ cat folder2/h
197 197 e
198 198 1
199 199 2
200 200 3
201 201 4
202 202 5
203 203 f
General Comments 0
You need to be logged in to leave comments. Login now