Show More
@@ -78,16 +78,6 b' def composenormalfilematcher(match, mani' | |||
|
78 | 78 | m.matchfn = lambda f: notlfile(f) and origmatchfn(f) |
|
79 | 79 | return m |
|
80 | 80 | |
|
81 | def installnormalfilesmatchfn(manifest): | |
|
82 | '''installmatchfn with a matchfn that ignores all largefiles''' | |
|
83 | def overridematch(ctx, pats=(), opts=None, globbed=False, | |
|
84 | default='relpath', badfn=None): | |
|
85 | if opts is None: | |
|
86 | opts = {} | |
|
87 | match = oldmatch(ctx, pats, opts, globbed, default, badfn=badfn) | |
|
88 | return composenormalfilematcher(match, manifest) | |
|
89 | oldmatch = installmatchfn(overridematch) | |
|
90 | ||
|
91 | 81 | def installmatchfn(f): |
|
92 | 82 | '''monkey patch the scmutil module with a custom match function. |
|
93 | 83 | Warning: it is monkey patching the _module_ on runtime! Not thread safe!''' |
@@ -616,7 +606,14 b' def overridecopy(orig, ui, repo, pats, o' | |||
|
616 | 606 | # match largefiles and run it again. |
|
617 | 607 | nonormalfiles = False |
|
618 | 608 | nolfiles = False |
|
619 |
|
|
|
609 | manifest = repo[None].manifest() | |
|
610 | def normalfilesmatchfn(orig, ctx, pats=(), opts=None, globbed=False, | |
|
611 | default='relpath', badfn=None): | |
|
612 | if opts is None: | |
|
613 | opts = {} | |
|
614 | match = orig(ctx, pats, opts, globbed, default, badfn=badfn) | |
|
615 | return composenormalfilematcher(match, manifest) | |
|
616 | with extensions.wrappedfunction(scmutil, 'match', normalfilesmatchfn): | |
|
620 | 617 | try: |
|
621 | 618 | result = orig(ui, repo, pats, opts, rename) |
|
622 | 619 | except error.Abort as e: |
@@ -625,8 +622,6 b' def overridecopy(orig, ui, repo, pats, o' | |||
|
625 | 622 | else: |
|
626 | 623 | nonormalfiles = True |
|
627 | 624 | result = 0 |
|
628 | finally: | |
|
629 | restorematchfn() | |
|
630 | 625 | |
|
631 | 626 | # The first rename can cause our current working directory to be removed. |
|
632 | 627 | # In that case there is nothing left to copy/rename so just quit. |
General Comments 0
You need to be logged in to leave comments.
Login now