Show More
@@ -5,7 +5,7 | |||||
5 | # This software may be used and distributed according to the terms of the |
|
5 | # This software may be used and distributed according to the terms of the | |
6 | # GNU General Public License version 2 or any later version. |
|
6 | # GNU General Public License version 2 or any later version. | |
7 |
|
7 | |||
8 | import re |
|
8 | import copy, re | |
9 | import util, pathutil |
|
9 | import util, pathutil | |
10 | from i18n import _ |
|
10 | from i18n import _ | |
11 |
|
11 | |||
@@ -305,6 +305,14 def exact(root, cwd, files): | |||||
305 | def always(root, cwd): |
|
305 | def always(root, cwd): | |
306 | return match(root, cwd, []) |
|
306 | return match(root, cwd, []) | |
307 |
|
307 | |||
|
308 | def badmatch(match, badfn): | |||
|
309 | """Make a copy of the given matcher, replacing its bad method with the given | |||
|
310 | one. | |||
|
311 | """ | |||
|
312 | m = copy.copy(match) | |||
|
313 | m.bad = badfn | |||
|
314 | return m | |||
|
315 | ||||
308 | class narrowmatcher(match): |
|
316 | class narrowmatcher(match): | |
309 | """Adapt a matcher to work on a subdirectory only. |
|
317 | """Adapt a matcher to work on a subdirectory only. | |
310 |
|
318 |
General Comments 0
You need to be logged in to leave comments.
Login now