equal
deleted
inserted
replaced
39 '''create a matcher that matches only the largefiles in the original |
39 '''create a matcher that matches only the largefiles in the original |
40 matcher''' |
40 matcher''' |
41 m = copy.copy(match) |
41 m = copy.copy(match) |
42 lfile = lambda f: lfutil.standin(f) in manifest |
42 lfile = lambda f: lfutil.standin(f) in manifest |
43 m._files = filter(lfile, m._files) |
43 m._files = filter(lfile, m._files) |
44 m._fileroots = set(m._files) |
44 m._fileset = set(m._files) |
45 m._always = False |
45 m._always = False |
46 origmatchfn = m.matchfn |
46 origmatchfn = m.matchfn |
47 m.matchfn = lambda f: lfile(f) and origmatchfn(f) |
47 m.matchfn = lambda f: lfile(f) and origmatchfn(f) |
48 return m |
48 return m |
49 |
49 |
54 |
54 |
55 m = copy.copy(match) |
55 m = copy.copy(match) |
56 notlfile = lambda f: not (lfutil.isstandin(f) or lfutil.standin(f) in |
56 notlfile = lambda f: not (lfutil.isstandin(f) or lfutil.standin(f) in |
57 manifest or f in excluded) |
57 manifest or f in excluded) |
58 m._files = filter(notlfile, m._files) |
58 m._files = filter(notlfile, m._files) |
59 m._fileroots = set(m._files) |
59 m._fileset = set(m._files) |
60 m._always = False |
60 m._always = False |
61 origmatchfn = m.matchfn |
61 origmatchfn = m.matchfn |
62 m.matchfn = lambda f: notlfile(f) and origmatchfn(f) |
62 m.matchfn = lambda f: notlfile(f) and origmatchfn(f) |
63 return m |
63 return m |
64 |
64 |
366 if standin in ctx: |
366 if standin in ctx: |
367 m._files[i] = standin |
367 m._files[i] = standin |
368 elif m._files[i] not in ctx and repo.wvfs.isdir(standin): |
368 elif m._files[i] not in ctx and repo.wvfs.isdir(standin): |
369 m._files.append(standin) |
369 m._files.append(standin) |
370 |
370 |
371 m._fileroots = set(m._files) |
371 m._fileset = set(m._files) |
372 m._always = False |
372 m._always = False |
373 origmatchfn = m.matchfn |
373 origmatchfn = m.matchfn |
374 def lfmatchfn(f): |
374 def lfmatchfn(f): |
375 lf = lfutil.splitstandin(f) |
375 lf = lfutil.splitstandin(f) |
376 if lf is not None and origmatchfn(lf): |
376 if lf is not None and origmatchfn(lf): |
642 newpats.append(pat) |
642 newpats.append(pat) |
643 match = oldmatch(ctx, newpats, opts, globbed, default, badfn=badfn) |
643 match = oldmatch(ctx, newpats, opts, globbed, default, badfn=badfn) |
644 m = copy.copy(match) |
644 m = copy.copy(match) |
645 lfile = lambda f: lfutil.standin(f) in manifest |
645 lfile = lambda f: lfutil.standin(f) in manifest |
646 m._files = [lfutil.standin(f) for f in m._files if lfile(f)] |
646 m._files = [lfutil.standin(f) for f in m._files if lfile(f)] |
647 m._fileroots = set(m._files) |
647 m._fileset = set(m._files) |
648 origmatchfn = m.matchfn |
648 origmatchfn = m.matchfn |
649 def matchfn(f): |
649 def matchfn(f): |
650 lfile = lfutil.splitstandin(f) |
650 lfile = lfutil.splitstandin(f) |
651 return (lfile is not None and |
651 return (lfile is not None and |
652 (f in manifest) and |
652 (f in manifest) and |
765 elif standin in wctx or lfdirstate[f] == 'r': |
765 elif standin in wctx or lfdirstate[f] == 'r': |
766 continue |
766 continue |
767 else: |
767 else: |
768 matchfiles.append(f) |
768 matchfiles.append(f) |
769 m._files = matchfiles |
769 m._files = matchfiles |
770 m._fileroots = set(m._files) |
770 m._fileset = set(m._files) |
771 origmatchfn = m.matchfn |
771 origmatchfn = m.matchfn |
772 def matchfn(f): |
772 def matchfn(f): |
773 lfile = lfutil.splitstandin(f) |
773 lfile = lfutil.splitstandin(f) |
774 if lfile is not None: |
774 if lfile is not None: |
775 return (origmatchfn(lfile) and |
775 return (origmatchfn(lfile) and |