##// END OF EJS Templates
match: introduce badmatch() to eliminate long callback chains with subrepos...
Matt Harbison -
r25433:419ac63f default
parent child Browse files
Show More
@@ -5,7 +5,7
5 5 # This software may be used and distributed according to the terms of the
6 6 # GNU General Public License version 2 or any later version.
7 7
8 import re
8 import copy, re
9 9 import util, pathutil
10 10 from i18n import _
11 11
@@ -305,6 +305,14 def exact(root, cwd, files):
305 305 def always(root, cwd):
306 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 316 class narrowmatcher(match):
309 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