##// END OF EJS Templates
context.walk: walk all files when file and '.' given...
Martin von Zweigbergk -
r24381:82b82168 default
parent child Browse files
Show More
@@ -588,10 +588,6 b' class changectx(basectx):'
588 588
589 589 def walk(self, match):
590 590 fset = set(match.files())
591 # for dirstate.walk, files=['.'] means "walk the whole tree".
592 # follow that here, too
593 fset.discard('.')
594
595 591 # avoid the entire walk if we're only looking for specific files
596 592 if fset and not match.anypats():
597 593 if util.all(fn in self for fn in fset):
@@ -606,6 +602,9 b' class changectx(basectx):'
606 602 fset.remove(fn)
607 603 if match(fn):
608 604 yield fn
605 # for dirstate.walk, files=['.'] means "walk the whole tree".
606 # follow that here, too
607 fset.discard('.')
609 608 for fn in sorted(fset):
610 609 if not self.hasdir(fn):
611 610 match.bad(fn, _('no such file in rev %s') % self)
@@ -22,10 +22,22 b''
22 22 $ hg cat -r 1 b
23 23 1
24 24
25 Test fileset
25 Test multiple files
26 26
27 27 $ echo 3 > c
28 28 $ hg ci -Am addmore c
29 $ hg cat b c
30 1
31 3
32 $ hg cat .
33 1
34 3
35 $ hg cat . c
36 1
37 3
38
39 Test fileset
40
29 41 $ hg cat 'set:not(b) or a'
30 42 3
31 43 $ hg cat 'set:c or b'
General Comments 0
You need to be logged in to leave comments. Login now