Show More
@@ -22,20 +22,23 b' import basestore' | |||
|
22 | 22 | |
|
23 | 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 | 36 | def installnormalfilesmatchfn(manifest): |
|
26 | 37 | '''installmatchfn with a matchfn that ignores all largefiles''' |
|
27 | 38 | def overridematch(ctx, pats=[], opts={}, globbed=False, |
|
28 | 39 | default='relpath'): |
|
29 | 40 | match = oldmatch(ctx, pats, opts, globbed, default) |
|
30 | m = copy.copy(match) | |
|
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 | |
|
41 | return composenormalfilematcher(match, manifest) | |
|
39 | 42 | oldmatch = installmatchfn(overridematch) |
|
40 | 43 | |
|
41 | 44 | def installmatchfn(f): |
General Comments 0
You need to be logged in to leave comments.
Login now