##// END OF EJS Templates
debugwalk: also print matcher representation...
Martin von Zweigbergk -
r32453:2def402b default
parent child Browse files
Show More
@@ -2125,6 +2125,7 b' def debugupgraderepo(ui, repo, run=False'
2125 2125 def debugwalk(ui, repo, *pats, **opts):
2126 2126 """show how files match on given patterns"""
2127 2127 m = scmutil.match(repo[None], pats, opts)
2128 ui.write(('matcher: %r\n' % m))
2128 2129 items = list(repo[None].walk(m))
2129 2130 if not items:
2130 2131 return
@@ -33,6 +33,7 b' test issue352'
33 33 [255]
34 34 $ echo foo > "$A"
35 35 $ hg debugwalk
36 matcher: <matcher files=[], patterns=None, includes=None, excludes=None>
36 37 f he\r (no-eol) (esc)
37 38 llo he\r (no-eol) (esc)
38 39 llo
@@ -29,6 +29,7 b''
29 29 $ hg commit -m "commit #0"
30 30
31 31 $ hg debugwalk
32 matcher: <matcher files=[], patterns=None, includes=None, excludes=None>
32 33 f beans/black beans/black
33 34 f beans/borlotti beans/borlotti
34 35 f beans/kidney beans/kidney
@@ -43,6 +44,7 b''
43 44 f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
44 45 f mammals/skunk mammals/skunk
45 46 $ hg debugwalk -I.
47 matcher: <matcher files=[], patterns=None, includes='(?:)', excludes=None>
46 48 f beans/black beans/black
47 49 f beans/borlotti beans/borlotti
48 50 f beans/kidney beans/kidney
@@ -59,6 +61,7 b''
59 61
60 62 $ cd mammals
61 63 $ hg debugwalk
64 matcher: <matcher files=[], patterns=None, includes=None, excludes=None>
62 65 f beans/black ../beans/black
63 66 f beans/borlotti ../beans/borlotti
64 67 f beans/kidney ../beans/kidney
@@ -73,6 +76,7 b''
73 76 f mammals/Procyonidae/raccoon Procyonidae/raccoon
74 77 f mammals/skunk skunk
75 78 $ hg debugwalk -X ../beans
79 matcher: <matcher files=[], patterns=None, includes=None, excludes='(?:beans(?:/|$))'>
76 80 f fennel ../fennel
77 81 f fenugreek ../fenugreek
78 82 f fiddlehead ../fiddlehead
@@ -81,24 +85,31 b''
81 85 f mammals/Procyonidae/raccoon Procyonidae/raccoon
82 86 f mammals/skunk skunk
83 87 $ hg debugwalk -I '*k'
88 matcher: <matcher files=[], patterns=None, includes='(?:mammals\\/[^/]*k(?:/|$))', excludes=None>
84 89 f mammals/skunk skunk
85 90 $ hg debugwalk -I 'glob:*k'
91 matcher: <matcher files=[], patterns=None, includes='(?:mammals\\/[^/]*k(?:/|$))', excludes=None>
86 92 f mammals/skunk skunk
87 93 $ hg debugwalk -I 'relglob:*k'
94 matcher: <matcher files=[], patterns=None, includes='(?:(?:|.*/)[^/]*k(?:/|$))', excludes=None>
88 95 f beans/black ../beans/black
89 96 f fenugreek ../fenugreek
90 97 f mammals/skunk skunk
91 98 $ hg debugwalk -I 'relglob:*k' .
99 matcher: <matcher files=['mammals'], patterns='(?:mammals(?:/|$))', includes='(?:(?:|.*/)[^/]*k(?:/|$))', excludes=None>
92 100 f mammals/skunk skunk
93 101 $ hg debugwalk -I 're:.*k$'
102 matcher: <matcher files=[], patterns=None, includes='(?:.*k$)', excludes=None>
94 103 f beans/black ../beans/black
95 104 f fenugreek ../fenugreek
96 105 f mammals/skunk skunk
97 106 $ hg debugwalk -I 'relre:.*k$'
107 matcher: <matcher files=[], patterns=None, includes='(?:.*.*k$)', excludes=None>
98 108 f beans/black ../beans/black
99 109 f fenugreek ../fenugreek
100 110 f mammals/skunk skunk
101 111 $ hg debugwalk -I 'path:beans'
112 matcher: <matcher files=[], patterns=None, includes='(?:^beans(?:/|$))', excludes=None>
102 113 f beans/black ../beans/black
103 114 f beans/borlotti ../beans/borlotti
104 115 f beans/kidney ../beans/kidney
@@ -106,6 +117,7 b''
106 117 f beans/pinto ../beans/pinto
107 118 f beans/turtle ../beans/turtle
108 119 $ hg debugwalk -I 'relpath:detour/../../beans'
120 matcher: <matcher files=[], patterns=None, includes='(?:beans(?:/|$))', excludes=None>
109 121 f beans/black ../beans/black
110 122 f beans/borlotti ../beans/borlotti
111 123 f beans/kidney ../beans/kidney
@@ -114,22 +126,27 b''
114 126 f beans/turtle ../beans/turtle
115 127
116 128 $ hg debugwalk 'rootfilesin:'
129 matcher: <matcher files=[], patterns='(?:^[^/]+$)', includes=None, excludes=None>
117 130 f fennel ../fennel
118 131 f fenugreek ../fenugreek
119 132 f fiddlehead ../fiddlehead
120 133 $ hg debugwalk -I 'rootfilesin:'
134 matcher: <matcher files=[], patterns=None, includes='(?:^[^/]+$)', excludes=None>
121 135 f fennel ../fennel
122 136 f fenugreek ../fenugreek
123 137 f fiddlehead ../fiddlehead
124 138 $ hg debugwalk 'rootfilesin:.'
139 matcher: <matcher files=[], patterns='(?:^[^/]+$)', includes=None, excludes=None>
125 140 f fennel ../fennel
126 141 f fenugreek ../fenugreek
127 142 f fiddlehead ../fiddlehead
128 143 $ hg debugwalk -I 'rootfilesin:.'
144 matcher: <matcher files=[], patterns=None, includes='(?:^[^/]+$)', excludes=None>
129 145 f fennel ../fennel
130 146 f fenugreek ../fenugreek
131 147 f fiddlehead ../fiddlehead
132 148 $ hg debugwalk -X 'rootfilesin:'
149 matcher: <matcher files=[], patterns=None, includes=None, excludes='(?:^[^/]+$)'>
133 150 f beans/black ../beans/black
134 151 f beans/borlotti ../beans/borlotti
135 152 f beans/kidney ../beans/kidney
@@ -141,10 +158,15 b''
141 158 f mammals/Procyonidae/raccoon Procyonidae/raccoon
142 159 f mammals/skunk skunk
143 160 $ hg debugwalk 'rootfilesin:fennel'
161 matcher: <matcher files=[], patterns='(?:^fennel/[^/]+$)', includes=None, excludes=None>
144 162 $ hg debugwalk -I 'rootfilesin:fennel'
163 matcher: <matcher files=[], patterns=None, includes='(?:^fennel/[^/]+$)', excludes=None>
145 164 $ hg debugwalk 'rootfilesin:skunk'
165 matcher: <matcher files=[], patterns='(?:^skunk/[^/]+$)', includes=None, excludes=None>
146 166 $ hg debugwalk -I 'rootfilesin:skunk'
167 matcher: <matcher files=[], patterns=None, includes='(?:^skunk/[^/]+$)', excludes=None>
147 168 $ hg debugwalk 'rootfilesin:beans'
169 matcher: <matcher files=[], patterns='(?:^beans/[^/]+$)', includes=None, excludes=None>
148 170 f beans/black ../beans/black
149 171 f beans/borlotti ../beans/borlotti
150 172 f beans/kidney ../beans/kidney
@@ -152,6 +174,7 b''
152 174 f beans/pinto ../beans/pinto
153 175 f beans/turtle ../beans/turtle
154 176 $ hg debugwalk -I 'rootfilesin:beans'
177 matcher: <matcher files=[], patterns=None, includes='(?:^beans/[^/]+$)', excludes=None>
155 178 f beans/black ../beans/black
156 179 f beans/borlotti ../beans/borlotti
157 180 f beans/kidney ../beans/kidney
@@ -159,14 +182,19 b''
159 182 f beans/pinto ../beans/pinto
160 183 f beans/turtle ../beans/turtle
161 184 $ hg debugwalk 'rootfilesin:mammals'
185 matcher: <matcher files=[], patterns='(?:^mammals/[^/]+$)', includes=None, excludes=None>
162 186 f mammals/skunk skunk
163 187 $ hg debugwalk -I 'rootfilesin:mammals'
188 matcher: <matcher files=[], patterns=None, includes='(?:^mammals/[^/]+$)', excludes=None>
164 189 f mammals/skunk skunk
165 190 $ hg debugwalk 'rootfilesin:mammals/'
191 matcher: <matcher files=[], patterns='(?:^mammals/[^/]+$)', includes=None, excludes=None>
166 192 f mammals/skunk skunk
167 193 $ hg debugwalk -I 'rootfilesin:mammals/'
194 matcher: <matcher files=[], patterns=None, includes='(?:^mammals/[^/]+$)', excludes=None>
168 195 f mammals/skunk skunk
169 196 $ hg debugwalk -X 'rootfilesin:mammals'
197 matcher: <matcher files=[], patterns=None, includes=None, excludes='(?:^mammals/[^/]+$)'>
170 198 f beans/black ../beans/black
171 199 f beans/borlotti ../beans/borlotti
172 200 f beans/kidney ../beans/kidney
@@ -181,26 +209,31 b''
181 209 f mammals/Procyonidae/raccoon Procyonidae/raccoon
182 210
183 211 $ hg debugwalk .
212 matcher: <matcher files=['mammals'], patterns='(?:mammals(?:/|$))', includes=None, excludes=None>
184 213 f mammals/Procyonidae/cacomistle Procyonidae/cacomistle
185 214 f mammals/Procyonidae/coatimundi Procyonidae/coatimundi
186 215 f mammals/Procyonidae/raccoon Procyonidae/raccoon
187 216 f mammals/skunk skunk
188 217 $ hg debugwalk -I.
218 matcher: <matcher files=[], patterns=None, includes='(?:mammals(?:/|$))', excludes=None>
189 219 f mammals/Procyonidae/cacomistle Procyonidae/cacomistle
190 220 f mammals/Procyonidae/coatimundi Procyonidae/coatimundi
191 221 f mammals/Procyonidae/raccoon Procyonidae/raccoon
192 222 f mammals/skunk skunk
193 223 $ hg debugwalk Procyonidae
224 matcher: <matcher files=['mammals/Procyonidae'], patterns='(?:mammals\\/Procyonidae(?:/|$))', includes=None, excludes=None>
194 225 f mammals/Procyonidae/cacomistle Procyonidae/cacomistle
195 226 f mammals/Procyonidae/coatimundi Procyonidae/coatimundi
196 227 f mammals/Procyonidae/raccoon Procyonidae/raccoon
197 228
198 229 $ cd Procyonidae
199 230 $ hg debugwalk .
231 matcher: <matcher files=['mammals/Procyonidae'], patterns='(?:mammals\\/Procyonidae(?:/|$))', includes=None, excludes=None>
200 232 f mammals/Procyonidae/cacomistle cacomistle
201 233 f mammals/Procyonidae/coatimundi coatimundi
202 234 f mammals/Procyonidae/raccoon raccoon
203 235 $ hg debugwalk ..
236 matcher: <matcher files=['mammals'], patterns='(?:mammals(?:/|$))', includes=None, excludes=None>
204 237 f mammals/Procyonidae/cacomistle cacomistle
205 238 f mammals/Procyonidae/coatimundi coatimundi
206 239 f mammals/Procyonidae/raccoon raccoon
@@ -208,6 +241,7 b''
208 241 $ cd ..
209 242
210 243 $ hg debugwalk ../beans
244 matcher: <matcher files=['beans'], patterns='(?:beans(?:/|$))', includes=None, excludes=None>
211 245 f beans/black ../beans/black
212 246 f beans/borlotti ../beans/borlotti
213 247 f beans/kidney ../beans/kidney
@@ -215,6 +249,7 b''
215 249 f beans/pinto ../beans/pinto
216 250 f beans/turtle ../beans/turtle
217 251 $ hg debugwalk .
252 matcher: <matcher files=['mammals'], patterns='(?:mammals(?:/|$))', includes=None, excludes=None>
218 253 f mammals/Procyonidae/cacomistle Procyonidae/cacomistle
219 254 f mammals/Procyonidae/coatimundi Procyonidae/coatimundi
220 255 f mammals/Procyonidae/raccoon Procyonidae/raccoon
@@ -228,6 +263,7 b''
228 263 $ cd ..
229 264
230 265 $ hg debugwalk -Ibeans
266 matcher: <matcher files=[], patterns=None, includes='(?:beans(?:/|$))', excludes=None>
231 267 f beans/black beans/black
232 268 f beans/borlotti beans/borlotti
233 269 f beans/kidney beans/kidney
@@ -235,41 +271,56 b''
235 271 f beans/pinto beans/pinto
236 272 f beans/turtle beans/turtle
237 273 $ hg debugwalk -I '{*,{b,m}*/*}k'
274 matcher: <matcher files=[], patterns=None, includes='(?:(?:[^/]*|(?:b|m)[^/]*\\/[^/]*)k(?:/|$))', excludes=None>
238 275 f beans/black beans/black
239 276 f fenugreek fenugreek
240 277 f mammals/skunk mammals/skunk
241 278 $ hg debugwalk -Ibeans mammals
279 matcher: <matcher files=['mammals'], patterns='(?:mammals(?:/|$))', includes='(?:beans(?:/|$))', excludes=None>
242 280 $ hg debugwalk -Inon-existent
281 matcher: <matcher files=[], patterns=None, includes='(?:non\\-existent(?:/|$))', excludes=None>
243 282 $ hg debugwalk -Inon-existent -Ibeans/black
283 matcher: <matcher files=[], patterns=None, includes='(?:non\\-existent(?:/|$)|beans\\/black(?:/|$))', excludes=None>
244 284 f beans/black beans/black
245 285 $ hg debugwalk -Ibeans beans/black
286 matcher: <matcher files=['beans/black'], patterns='(?:beans\\/black(?:/|$))', includes='(?:beans(?:/|$))', excludes=None>
246 287 f beans/black beans/black exact
247 288 $ hg debugwalk -Ibeans/black beans
289 matcher: <matcher files=['beans'], patterns='(?:beans(?:/|$))', includes='(?:beans\\/black(?:/|$))', excludes=None>
248 290 f beans/black beans/black
249 291 $ hg debugwalk -Xbeans/black beans
292 matcher: <matcher files=['beans'], patterns='(?:beans(?:/|$))', includes=None, excludes='(?:beans\\/black(?:/|$))'>
250 293 f beans/borlotti beans/borlotti
251 294 f beans/kidney beans/kidney
252 295 f beans/navy beans/navy
253 296 f beans/pinto beans/pinto
254 297 f beans/turtle beans/turtle
255 298 $ hg debugwalk -Xbeans/black -Ibeans
299 matcher: <matcher files=[], patterns=None, includes='(?:beans(?:/|$))', excludes='(?:beans\\/black(?:/|$))'>
256 300 f beans/borlotti beans/borlotti
257 301 f beans/kidney beans/kidney
258 302 f beans/navy beans/navy
259 303 f beans/pinto beans/pinto
260 304 f beans/turtle beans/turtle
261 305 $ hg debugwalk -Xbeans/black beans/black
306 matcher: <matcher files=['beans/black'], patterns='(?:beans\\/black(?:/|$))', includes=None, excludes='(?:beans\\/black(?:/|$))'>
262 307 f beans/black beans/black exact
263 308 $ hg debugwalk -Xbeans/black -Ibeans/black
309 matcher: <matcher files=[], patterns=None, includes='(?:beans\\/black(?:/|$))', excludes='(?:beans\\/black(?:/|$))'>
264 310 $ hg debugwalk -Xbeans beans/black
311 matcher: <matcher files=['beans/black'], patterns='(?:beans\\/black(?:/|$))', includes=None, excludes='(?:beans(?:/|$))'>
265 312 f beans/black beans/black exact
266 313 $ hg debugwalk -Xbeans -Ibeans/black
314 matcher: <matcher files=[], patterns=None, includes='(?:beans\\/black(?:/|$))', excludes='(?:beans(?:/|$))'>
267 315 $ hg debugwalk 'glob:mammals/../beans/b*'
316 matcher: <matcher files=['beans'], patterns='(?:beans\\/b[^/]*$)', includes=None, excludes=None>
268 317 f beans/black beans/black
269 318 f beans/borlotti beans/borlotti
270 319 $ hg debugwalk '-X*/Procyonidae' mammals
320 matcher: <matcher files=['mammals'], patterns='(?:mammals(?:/|$))', includes=None, excludes='(?:[^/]*\\/Procyonidae(?:/|$))'>
271 321 f mammals/skunk mammals/skunk
272 322 $ hg debugwalk path:mammals
323 matcher: <matcher files=['mammals'], patterns='(?:^mammals(?:/|$))', includes=None, excludes=None>
273 324 f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
274 325 f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
275 326 f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
@@ -296,6 +347,7 b''
296 347 Test absolute paths:
297 348
298 349 $ hg debugwalk `pwd`/beans
350 matcher: <matcher files=['beans'], patterns='(?:beans(?:/|$))', includes=None, excludes=None>
299 351 f beans/black beans/black
300 352 f beans/borlotti beans/borlotti
301 353 f beans/kidney beans/kidney
@@ -309,6 +361,7 b' Test absolute paths:'
309 361 Test patterns:
310 362
311 363 $ hg debugwalk glob:\*
364 matcher: <matcher files=['.'], patterns='(?:[^/]*$)', includes=None, excludes=None>
312 365 f fennel fennel
313 366 f fenugreek fenugreek
314 367 f fiddlehead fiddlehead
@@ -318,15 +371,19 b' Test patterns:'
318 371 adding glob:glob
319 372 warning: filename contains ':', which is reserved on Windows: 'glob:glob'
320 373 $ hg debugwalk glob:\*
374 matcher: <matcher files=['.'], patterns='(?:[^/]*$)', includes=None, excludes=None>
321 375 f fennel fennel
322 376 f fenugreek fenugreek
323 377 f fiddlehead fiddlehead
324 378 f glob:glob glob:glob
325 379 $ hg debugwalk glob:glob
380 matcher: <matcher files=['glob'], patterns='(?:glob$)', includes=None, excludes=None>
326 381 glob: No such file or directory
327 382 $ hg debugwalk glob:glob:glob
383 matcher: <matcher files=['glob:glob'], patterns='(?:glob\\:glob$)', includes=None, excludes=None>
328 384 f glob:glob glob:glob exact
329 385 $ hg debugwalk path:glob:glob
386 matcher: <matcher files=['glob:glob'], patterns='(?:^glob\\:glob(?:/|$))', includes=None, excludes=None>
330 387 f glob:glob glob:glob exact
331 388 $ rm glob:glob
332 389 $ hg addremove
@@ -334,30 +391,38 b' Test patterns:'
334 391 #endif
335 392
336 393 $ hg debugwalk 'glob:**e'
394 matcher: <matcher files=['.'], patterns='(?:.*e$)', includes=None, excludes=None>
337 395 f beans/turtle beans/turtle
338 396 f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
339 397
340 398 $ hg debugwalk 're:.*[kb]$'
399 matcher: <matcher files=['.'], patterns='(?:.*[kb]$)', includes=None, excludes=None>
341 400 f beans/black beans/black
342 401 f fenugreek fenugreek
343 402 f mammals/skunk mammals/skunk
344 403
345 404 $ hg debugwalk path:beans/black
405 matcher: <matcher files=['beans/black'], patterns='(?:^beans\\/black(?:/|$))', includes=None, excludes=None>
346 406 f beans/black beans/black exact
347 407 $ hg debugwalk path:beans//black
408 matcher: <matcher files=['beans/black'], patterns='(?:^beans\\/black(?:/|$))', includes=None, excludes=None>
348 409 f beans/black beans/black exact
349 410
350 411 $ hg debugwalk relglob:Procyonidae
412 matcher: <matcher files=['.'], patterns='(?:(?:|.*/)Procyonidae$)', includes=None, excludes=None>
351 413 $ hg debugwalk 'relglob:Procyonidae/**'
414 matcher: <matcher files=['.'], patterns='(?:(?:|.*/)Procyonidae\\/.*$)', includes=None, excludes=None>
352 415 f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
353 416 f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
354 417 f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
355 418 $ hg debugwalk 'relglob:Procyonidae/**' fennel
419 matcher: <matcher files=['.', 'fennel'], patterns='(?:(?:|.*/)Procyonidae\\/.*$|fennel(?:/|$))', includes=None, excludes=None>
356 420 f fennel fennel exact
357 421 f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
358 422 f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
359 423 f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
360 424 $ hg debugwalk beans 'glob:beans/*'
425 matcher: <matcher files=['beans', 'beans'], patterns='(?:beans(?:/|$)|beans\\/[^/]*$)', includes=None, excludes=None>
361 426 f beans/black beans/black
362 427 f beans/borlotti beans/borlotti
363 428 f beans/kidney beans/kidney
@@ -365,63 +430,78 b' Test patterns:'
365 430 f beans/pinto beans/pinto
366 431 f beans/turtle beans/turtle
367 432 $ hg debugwalk 'glob:mamm**'
433 matcher: <matcher files=['.'], patterns='(?:mamm.*$)', includes=None, excludes=None>
368 434 f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
369 435 f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
370 436 f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
371 437 f mammals/skunk mammals/skunk
372 438 $ hg debugwalk 'glob:mamm**' fennel
439 matcher: <matcher files=['.', 'fennel'], patterns='(?:mamm.*$|fennel(?:/|$))', includes=None, excludes=None>
373 440 f fennel fennel exact
374 441 f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
375 442 f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
376 443 f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
377 444 f mammals/skunk mammals/skunk
378 445 $ hg debugwalk 'glob:j*'
446 matcher: <matcher files=['.'], patterns='(?:j[^/]*$)', includes=None, excludes=None>
379 447 $ hg debugwalk NOEXIST
448 matcher: <matcher files=['NOEXIST'], patterns='(?:NOEXIST(?:/|$))', includes=None, excludes=None>
380 449 NOEXIST: * (glob)
381 450
382 451 #if fifo
383 452 $ mkfifo fifo
384 453 $ hg debugwalk fifo
454 matcher: <matcher files=['fifo'], patterns='(?:fifo(?:/|$))', includes=None, excludes=None>
385 455 fifo: unsupported file type (type is fifo)
386 456 #endif
387 457
388 458 $ rm fenugreek
389 459 $ hg debugwalk fenugreek
460 matcher: <matcher files=['fenugreek'], patterns='(?:fenugreek(?:/|$))', includes=None, excludes=None>
390 461 f fenugreek fenugreek exact
391 462 $ hg rm fenugreek
392 463 $ hg debugwalk fenugreek
464 matcher: <matcher files=['fenugreek'], patterns='(?:fenugreek(?:/|$))', includes=None, excludes=None>
393 465 f fenugreek fenugreek exact
394 466 $ touch new
395 467 $ hg debugwalk new
468 matcher: <matcher files=['new'], patterns='(?:new(?:/|$))', includes=None, excludes=None>
396 469 f new new exact
397 470
398 471 $ mkdir ignored
399 472 $ touch ignored/file
400 473 $ echo '^ignored$' > .hgignore
401 474 $ hg debugwalk ignored
475 matcher: <matcher files=['ignored'], patterns='(?:ignored(?:/|$))', includes=None, excludes=None>
402 476 $ hg debugwalk ignored/file
477 matcher: <matcher files=['ignored/file'], patterns='(?:ignored\\/file(?:/|$))', includes=None, excludes=None>
403 478 f ignored/file ignored/file exact
404 479
405 480 Test listfile and listfile0
406 481
407 482 $ $PYTHON -c "file('listfile0', 'wb').write('fenugreek\0new\0')"
408 483 $ hg debugwalk -I 'listfile0:listfile0'
484 matcher: <matcher files=[], patterns=None, includes='(?:fenugreek(?:/|$)|new(?:/|$))', excludes=None>
409 485 f fenugreek fenugreek
410 486 f new new
411 487 $ $PYTHON -c "file('listfile', 'wb').write('fenugreek\nnew\r\nmammals/skunk\n')"
412 488 $ hg debugwalk -I 'listfile:listfile'
489 matcher: <matcher files=[], patterns=None, includes='(?:fenugreek(?:/|$)|new(?:/|$)|mammals\\/skunk(?:/|$))', excludes=None>
413 490 f fenugreek fenugreek
414 491 f mammals/skunk mammals/skunk
415 492 f new new
416 493
417 494 $ cd ..
418 495 $ hg debugwalk -R t t/mammals/skunk
496 matcher: <matcher files=['mammals/skunk'], patterns='(?:mammals\\/skunk(?:/|$))', includes=None, excludes=None>
419 497 f mammals/skunk t/mammals/skunk exact
420 498 $ mkdir t2
421 499 $ cd t2
422 500 $ hg debugwalk -R ../t ../t/mammals/skunk
501 matcher: <matcher files=['mammals/skunk'], patterns='(?:mammals\\/skunk(?:/|$))', includes=None, excludes=None>
423 502 f mammals/skunk ../t/mammals/skunk exact
424 503 $ hg debugwalk --cwd ../t mammals/skunk
504 matcher: <matcher files=['mammals/skunk'], patterns='(?:mammals\\/skunk(?:/|$))', includes=None, excludes=None>
425 505 f mammals/skunk mammals/skunk exact
426 506
427 507 $ cd ..
@@ -432,7 +512,7 b' Test split patterns on overflow'
432 512 $ echo fennel > overflow.list
433 513 $ $PYTHON -c "for i in xrange(20000 / 100): print 'x' * 100" >> overflow.list
434 514 $ echo fenugreek >> overflow.list
435 $ hg debugwalk 'listfile:overflow.list' 2>&1 | grep -v '^xxx'
515 $ hg debugwalk 'listfile:overflow.list' 2>&1 | egrep -v '(^matcher: |^xxx)'
436 516 f fennel fennel exact
437 517 f fenugreek fenugreek exact
438 518 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now