Show More
@@ -34,3 +34,18 b' class match(object):' | |||||
34 | return self._files |
|
34 | return self._files | |
35 | def anypats(self): |
|
35 | def anypats(self): | |
36 | return self._anypats |
|
36 | return self._anypats | |
|
37 | ||||
|
38 | def always(root, cwd): | |||
|
39 | return match(root, cwd, [], None, None, 'relpath') | |||
|
40 | ||||
|
41 | def never(root, cwd): | |||
|
42 | m = match(root, cwd, [], None, None, 'relpath') | |||
|
43 | m._matchfn = lambda f: False | |||
|
44 | return m | |||
|
45 | ||||
|
46 | def exact(root, cwd, files): | |||
|
47 | m = always(root, cwd) | |||
|
48 | m._files = files | |||
|
49 | m._fmap = dict.fromkeys(files) | |||
|
50 | m._matchfn = m._fmap.has_key | |||
|
51 | return m |
General Comments 0
You need to be logged in to leave comments.
Login now