##// END OF EJS Templates
tests: move tests in test-walk.t using ':' in filenames to conditional section...
Mads Kiilerich -
r16983:13cdc109 default
parent child Browse files
Show More
@@ -1,324 +1,329 b''
1 1 $ "$TESTDIR/hghave" no-windows || exit 80
2 2
3 3 $ hg init t
4 4 $ cd t
5 5 $ mkdir -p beans
6 6 $ for b in kidney navy turtle borlotti black pinto; do
7 7 > echo $b > beans/$b
8 8 $ done
9 9 $ mkdir -p mammals/Procyonidae
10 10 $ for m in cacomistle coatimundi raccoon; do
11 11 > echo $m > mammals/Procyonidae/$m
12 12 $ done
13 13 $ echo skunk > mammals/skunk
14 14 $ echo fennel > fennel
15 15 $ echo fenugreek > fenugreek
16 16 $ echo fiddlehead > fiddlehead
17 $ echo glob:glob > glob:glob
18 17 $ hg addremove
19 18 adding beans/black
20 19 adding beans/borlotti
21 20 adding beans/kidney
22 21 adding beans/navy
23 22 adding beans/pinto
24 23 adding beans/turtle
25 24 adding fennel
26 25 adding fenugreek
27 26 adding fiddlehead
28 adding glob:glob
29 27 adding mammals/Procyonidae/cacomistle
30 28 adding mammals/Procyonidae/coatimundi
31 29 adding mammals/Procyonidae/raccoon
32 30 adding mammals/skunk
33 warning: filename contains ':', which is reserved on Windows: 'glob:glob'
34 31 $ hg commit -m "commit #0"
35 32
36 33 $ hg debugwalk
37 34 f beans/black beans/black
38 35 f beans/borlotti beans/borlotti
39 36 f beans/kidney beans/kidney
40 37 f beans/navy beans/navy
41 38 f beans/pinto beans/pinto
42 39 f beans/turtle beans/turtle
43 40 f fennel fennel
44 41 f fenugreek fenugreek
45 42 f fiddlehead fiddlehead
46 f glob:glob glob:glob
47 43 f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
48 44 f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
49 45 f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
50 46 f mammals/skunk mammals/skunk
51 47 $ hg debugwalk -I.
52 48 f beans/black beans/black
53 49 f beans/borlotti beans/borlotti
54 50 f beans/kidney beans/kidney
55 51 f beans/navy beans/navy
56 52 f beans/pinto beans/pinto
57 53 f beans/turtle beans/turtle
58 54 f fennel fennel
59 55 f fenugreek fenugreek
60 56 f fiddlehead fiddlehead
61 f glob:glob glob:glob
62 57 f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
63 58 f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
64 59 f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
65 60 f mammals/skunk mammals/skunk
66 61
67 62 $ cd mammals
68 63 $ hg debugwalk
69 64 f beans/black ../beans/black
70 65 f beans/borlotti ../beans/borlotti
71 66 f beans/kidney ../beans/kidney
72 67 f beans/navy ../beans/navy
73 68 f beans/pinto ../beans/pinto
74 69 f beans/turtle ../beans/turtle
75 70 f fennel ../fennel
76 71 f fenugreek ../fenugreek
77 72 f fiddlehead ../fiddlehead
78 f glob:glob ../glob:glob
79 73 f mammals/Procyonidae/cacomistle Procyonidae/cacomistle
80 74 f mammals/Procyonidae/coatimundi Procyonidae/coatimundi
81 75 f mammals/Procyonidae/raccoon Procyonidae/raccoon
82 76 f mammals/skunk skunk
83 77 $ hg debugwalk -X ../beans
84 78 f fennel ../fennel
85 79 f fenugreek ../fenugreek
86 80 f fiddlehead ../fiddlehead
87 f glob:glob ../glob:glob
88 81 f mammals/Procyonidae/cacomistle Procyonidae/cacomistle
89 82 f mammals/Procyonidae/coatimundi Procyonidae/coatimundi
90 83 f mammals/Procyonidae/raccoon Procyonidae/raccoon
91 84 f mammals/skunk skunk
92 85 $ hg debugwalk -I '*k'
93 86 f mammals/skunk skunk
94 87 $ hg debugwalk -I 'glob:*k'
95 88 f mammals/skunk skunk
96 89 $ hg debugwalk -I 'relglob:*k'
97 90 f beans/black ../beans/black
98 91 f fenugreek ../fenugreek
99 92 f mammals/skunk skunk
100 93 $ hg debugwalk -I 'relglob:*k' .
101 94 f mammals/skunk skunk
102 95 $ hg debugwalk -I 're:.*k$'
103 96 f beans/black ../beans/black
104 97 f fenugreek ../fenugreek
105 98 f mammals/skunk skunk
106 99 $ hg debugwalk -I 'relre:.*k$'
107 100 f beans/black ../beans/black
108 101 f fenugreek ../fenugreek
109 102 f mammals/skunk skunk
110 103 $ hg debugwalk -I 'path:beans'
111 104 f beans/black ../beans/black
112 105 f beans/borlotti ../beans/borlotti
113 106 f beans/kidney ../beans/kidney
114 107 f beans/navy ../beans/navy
115 108 f beans/pinto ../beans/pinto
116 109 f beans/turtle ../beans/turtle
117 110 $ hg debugwalk -I 'relpath:../beans'
118 111 f beans/black ../beans/black
119 112 f beans/borlotti ../beans/borlotti
120 113 f beans/kidney ../beans/kidney
121 114 f beans/navy ../beans/navy
122 115 f beans/pinto ../beans/pinto
123 116 f beans/turtle ../beans/turtle
124 117 $ hg debugwalk .
125 118 f mammals/Procyonidae/cacomistle Procyonidae/cacomistle
126 119 f mammals/Procyonidae/coatimundi Procyonidae/coatimundi
127 120 f mammals/Procyonidae/raccoon Procyonidae/raccoon
128 121 f mammals/skunk skunk
129 122 $ hg debugwalk -I.
130 123 f mammals/Procyonidae/cacomistle Procyonidae/cacomistle
131 124 f mammals/Procyonidae/coatimundi Procyonidae/coatimundi
132 125 f mammals/Procyonidae/raccoon Procyonidae/raccoon
133 126 f mammals/skunk skunk
134 127 $ hg debugwalk Procyonidae
135 128 f mammals/Procyonidae/cacomistle Procyonidae/cacomistle
136 129 f mammals/Procyonidae/coatimundi Procyonidae/coatimundi
137 130 f mammals/Procyonidae/raccoon Procyonidae/raccoon
138 131
139 132 $ cd Procyonidae
140 133 $ hg debugwalk .
141 134 f mammals/Procyonidae/cacomistle cacomistle
142 135 f mammals/Procyonidae/coatimundi coatimundi
143 136 f mammals/Procyonidae/raccoon raccoon
144 137 $ hg debugwalk ..
145 138 f mammals/Procyonidae/cacomistle cacomistle
146 139 f mammals/Procyonidae/coatimundi coatimundi
147 140 f mammals/Procyonidae/raccoon raccoon
148 141 f mammals/skunk ../skunk
149 142 $ cd ..
150 143
151 144 $ hg debugwalk ../beans
152 145 f beans/black ../beans/black
153 146 f beans/borlotti ../beans/borlotti
154 147 f beans/kidney ../beans/kidney
155 148 f beans/navy ../beans/navy
156 149 f beans/pinto ../beans/pinto
157 150 f beans/turtle ../beans/turtle
158 151 $ hg debugwalk .
159 152 f mammals/Procyonidae/cacomistle Procyonidae/cacomistle
160 153 f mammals/Procyonidae/coatimundi Procyonidae/coatimundi
161 154 f mammals/Procyonidae/raccoon Procyonidae/raccoon
162 155 f mammals/skunk skunk
163 156 $ hg debugwalk .hg
164 157 abort: path 'mammals/.hg' is inside nested repo 'mammals'
165 158 [255]
166 159 $ hg debugwalk ../.hg
167 160 abort: path contains illegal component: .hg
168 161 [255]
169 162 $ cd ..
170 163
171 164 $ hg debugwalk -Ibeans
172 165 f beans/black beans/black
173 166 f beans/borlotti beans/borlotti
174 167 f beans/kidney beans/kidney
175 168 f beans/navy beans/navy
176 169 f beans/pinto beans/pinto
177 170 f beans/turtle beans/turtle
178 171 $ hg debugwalk -I '{*,{b,m}*/*}k'
179 172 f beans/black beans/black
180 173 f fenugreek fenugreek
181 174 f mammals/skunk mammals/skunk
182 175 $ hg debugwalk 'glob:mammals/../beans/b*'
183 176 f beans/black beans/black
184 177 f beans/borlotti beans/borlotti
185 178 $ hg debugwalk '-X*/Procyonidae' mammals
186 179 f mammals/skunk mammals/skunk
187 180 $ hg debugwalk path:mammals
188 181 f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
189 182 f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
190 183 f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
191 184 f mammals/skunk mammals/skunk
192 185 $ hg debugwalk ..
193 186 abort: .. not under root
194 187 [255]
195 188 $ hg debugwalk beans/../..
196 189 abort: beans/../.. not under root
197 190 [255]
198 191 $ hg debugwalk .hg
199 192 abort: path contains illegal component: .hg
200 193 [255]
201 194 $ hg debugwalk beans/../.hg
202 195 abort: path contains illegal component: .hg
203 196 [255]
204 197 $ hg debugwalk beans/../.hg/data
205 198 abort: path contains illegal component: .hg/data
206 199 [255]
207 200 $ hg debugwalk beans/.hg
208 201 abort: path 'beans/.hg' is inside nested repo 'beans'
209 202 [255]
210 203
211 204 Test absolute paths:
212 205
213 206 $ hg debugwalk `pwd`/beans
214 207 f beans/black beans/black
215 208 f beans/borlotti beans/borlotti
216 209 f beans/kidney beans/kidney
217 210 f beans/navy beans/navy
218 211 f beans/pinto beans/pinto
219 212 f beans/turtle beans/turtle
220 213 $ hg debugwalk `pwd`/..
221 214 abort: $TESTTMP/t/.. not under root
222 215 [255]
223 216
224 217 Test patterns:
225 218
226 219 $ hg debugwalk glob:\*
227 220 f fennel fennel
228 221 f fenugreek fenugreek
229 222 f fiddlehead fiddlehead
223 #if eol-in-paths
224 $ echo glob:glob > glob:glob
225 $ hg addremove
226 adding glob:glob
227 warning: filename contains ':', which is reserved on Windows: 'glob:glob'
228 $ hg debugwalk glob:\*
229 f fennel fennel
230 f fenugreek fenugreek
231 f fiddlehead fiddlehead
230 232 f glob:glob glob:glob
233 $ rm glob:glob
234 $ hg addremove
235 removing glob:glob
236 #endif
231 237
232 238 $ hg debugwalk 'glob:**e'
233 239 f beans/turtle beans/turtle
234 240 f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
235 241
236 242 $ hg debugwalk 're:.*[kb]$'
237 243 f beans/black beans/black
238 244 f fenugreek fenugreek
239 f glob:glob glob:glob
240 245 f mammals/skunk mammals/skunk
241 246
242 247 $ hg debugwalk path:beans/black
243 248 f beans/black beans/black exact
244 249 $ hg debugwalk path:beans//black
245 250 f beans/black beans/black exact
246 251
247 252 $ hg debugwalk relglob:Procyonidae
248 253 $ hg debugwalk 'relglob:Procyonidae/**'
249 254 f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
250 255 f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
251 256 f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
252 257 $ hg debugwalk 'relglob:Procyonidae/**' fennel
253 258 f fennel fennel exact
254 259 f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
255 260 f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
256 261 f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
257 262 $ hg debugwalk beans 'glob:beans/*'
258 263 f beans/black beans/black
259 264 f beans/borlotti beans/borlotti
260 265 f beans/kidney beans/kidney
261 266 f beans/navy beans/navy
262 267 f beans/pinto beans/pinto
263 268 f beans/turtle beans/turtle
264 269 $ hg debugwalk 'glob:mamm**'
265 270 f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
266 271 f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
267 272 f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
268 273 f mammals/skunk mammals/skunk
269 274 $ hg debugwalk 'glob:mamm**' fennel
270 275 f fennel fennel exact
271 276 f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
272 277 f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
273 278 f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
274 279 f mammals/skunk mammals/skunk
275 280 $ hg debugwalk 'glob:j*'
276 281 $ hg debugwalk NOEXIST
277 282 NOEXIST: * (glob)
278 283
279 284 #if fifo
280 285 $ mkfifo fifo
281 286 $ hg debugwalk fifo
282 287 fifo: unsupported file type (type is fifo)
283 288 #endif
284 289
285 290 $ rm fenugreek
286 291 $ hg debugwalk fenugreek
287 292 f fenugreek fenugreek exact
288 293 $ hg rm fenugreek
289 294 $ hg debugwalk fenugreek
290 295 f fenugreek fenugreek exact
291 296 $ touch new
292 297 $ hg debugwalk new
293 298 f new new exact
294 299
295 300 $ mkdir ignored
296 301 $ touch ignored/file
297 302 $ echo '^ignored$' > .hgignore
298 303 $ hg debugwalk ignored
299 304 $ hg debugwalk ignored/file
300 305 f ignored/file ignored/file exact
301 306
302 307 Test listfile and listfile0
303 308
304 309 $ python -c "file('../listfile0', 'wb').write('fenugreek\0new\0')"
305 310 $ hg debugwalk -I 'listfile0:../listfile0'
306 311 f fenugreek fenugreek
307 312 f new new
308 313 $ python -c "file('../listfile', 'wb').write('fenugreek\nnew\r\nmammals/skunk\n')"
309 314 $ hg debugwalk -I 'listfile:../listfile'
310 315 f fenugreek fenugreek
311 316 f mammals/skunk mammals/skunk
312 317 f new new
313 318
314 319 $ cd ..
315 320 $ hg debugwalk -R t t/mammals/skunk
316 321 f mammals/skunk t/mammals/skunk exact
317 322 $ mkdir t2
318 323 $ cd t2
319 324 $ hg debugwalk -R ../t ../t/mammals/skunk
320 325 f mammals/skunk ../t/mammals/skunk exact
321 326 $ hg debugwalk --cwd ../t mammals/skunk
322 327 f mammals/skunk mammals/skunk exact
323 328
324 329 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now