##// END OF EJS Templates
treemanifest: visit directory 'foo' when given e.g. '-X foo/ba?'...
Martin von Zweigbergk -
r25362:20ad936a default
parent child Browse files
Show More
@@ -129,6 +129,7 class match(object):
129 129 kindpats = self._normalize(exclude, 'glob', root, cwd, auditor)
130 130 self.excludepat, em = _buildmatch(ctx, kindpats, '(?:/|$)',
131 131 listsubrepos, root)
132 if not _anypats(kindpats):
132 133 self._excluderoots.update(_roots(kindpats))
133 134 self._excluderoots.discard('.')
134 135 matchfns.append(lambda f: not em(f))
@@ -322,6 +322,13 Test files from the root.
322 322 c.txt
323 323 d.py
324 324
325 Excludes with a glob should not exclude everything from the glob's root
326
327 $ hg files -r . -X 'b/fo?' b
328 b/bar/fruits.txt
329 b/bar/orange/fly/gnat.py
330 b/bar/orange/fly/housefly.txt
331
325 332 Test files for a subdirectory.
326 333
327 334 $ mv .hg/store/meta/a oldmf
@@ -337,7 +344,7 Test files with just includes and exclud
337 344 $ mv .hg/store/meta/a oldmf
338 345 $ mv .hg/store/meta/b/bar/orange/fly oldmf2
339 346 $ mv .hg/store/meta/b/foo/apple/bees oldmf3
340 $ hg files -r . -I b/bar -X b/bar/orange/fly -I b/foo -X b/foo/apple/bees
347 $ hg files -r . -I path:b/bar -X path:b/bar/orange/fly -I path:b/foo -X path:b/foo/apple/bees
341 348 b/bar/fruits.txt (glob)
342 349 $ mv oldmf .hg/store/meta/a
343 350 $ mv oldmf2 .hg/store/meta/b/bar/orange/fly
@@ -347,7 +354,7 Test files for a subdirectory, excluding
347 354
348 355 $ mv .hg/store/meta/a oldmf
349 356 $ mv .hg/store/meta/b/foo oldmf2
350 $ hg files -r . -X b/foo b
357 $ hg files -r . -X path:b/foo b
351 358 b/bar/fruits.txt (glob)
352 359 b/bar/orange/fly/gnat.py (glob)
353 360 b/bar/orange/fly/housefly.txt (glob)
@@ -359,7 +366,7 including an unrelated directory.
359 366
360 367 $ mv .hg/store/meta/a oldmf
361 368 $ mv .hg/store/meta/b/foo oldmf2
362 $ hg files -r . -I b/bar/orange -I a b
369 $ hg files -r . -I path:b/bar/orange -I path:a b
363 370 b/bar/orange/fly/gnat.py (glob)
364 371 b/bar/orange/fly/housefly.txt (glob)
365 372 $ mv oldmf .hg/store/meta/a
@@ -371,7 +378,7 within that.
371 378 $ mv .hg/store/meta/a oldmf
372 379 $ mv .hg/store/meta/b/foo oldmf2
373 380 $ mv .hg/store/meta/b/bar/orange oldmf3
374 $ hg files -r . glob:**.txt -I b/bar -X b/bar/orange
381 $ hg files -r . glob:**.txt -I path:b/bar -X path:b/bar/orange
375 382 b/bar/fruits.txt (glob)
376 383 $ mv oldmf .hg/store/meta/a
377 384 $ mv oldmf2 .hg/store/meta/b/foo
General Comments 0
You need to be logged in to leave comments. Login now