##// END OF EJS Templates
largefiles: split the creation of a normal matcher out of its install method...
Matt Harbison -
r23428:b5e3f3d2 default
parent child Browse files
Show More
@@ -22,20 +22,23 b' import basestore'
22
22
23 # -- Utility functions: commonly/repeatedly needed functionality ---------------
23 # -- Utility functions: commonly/repeatedly needed functionality ---------------
24
24
25 def composenormalfilematcher(match, manifest):
26 m = copy.copy(match)
27 notlfile = lambda f: not (lfutil.isstandin(f) or lfutil.standin(f) in
28 manifest)
29 m._files = filter(notlfile, m._files)
30 m._fmap = set(m._files)
31 m._always = False
32 origmatchfn = m.matchfn
33 m.matchfn = lambda f: notlfile(f) and origmatchfn(f)
34 return m
35
25 def installnormalfilesmatchfn(manifest):
36 def installnormalfilesmatchfn(manifest):
26 '''installmatchfn with a matchfn that ignores all largefiles'''
37 '''installmatchfn with a matchfn that ignores all largefiles'''
27 def overridematch(ctx, pats=[], opts={}, globbed=False,
38 def overridematch(ctx, pats=[], opts={}, globbed=False,
28 default='relpath'):
39 default='relpath'):
29 match = oldmatch(ctx, pats, opts, globbed, default)
40 match = oldmatch(ctx, pats, opts, globbed, default)
30 m = copy.copy(match)
41 return composenormalfilematcher(match, manifest)
31 notlfile = lambda f: not (lfutil.isstandin(f) or lfutil.standin(f) in
32 manifest)
33 m._files = filter(notlfile, m._files)
34 m._fmap = set(m._files)
35 m._always = False
36 origmatchfn = m.matchfn
37 m.matchfn = lambda f: notlfile(f) and origmatchfn(f)
38 return m
39 oldmatch = installmatchfn(overridematch)
42 oldmatch = installmatchfn(overridematch)
40
43
41 def installmatchfn(f):
44 def installmatchfn(f):
General Comments 0
You need to be logged in to leave comments. Login now