Show More
@@ -24,7 +24,6 b' from mercurial import (' | |||||
24 | hg, |
|
24 | hg, | |
25 | localrepo, |
|
25 | localrepo, | |
26 | registrar, |
|
26 | registrar, | |
27 | util, |
|
|||
28 | verify as verifymod, |
|
27 | verify as verifymod, | |
29 | ) |
|
28 | ) | |
30 |
|
29 | |||
@@ -85,15 +84,6 b' def reposetup(ui, repo):' | |||||
85 | narrowpatch.setup(repo) |
|
84 | narrowpatch.setup(repo) | |
86 | narrowwirepeer.reposetup(repo) |
|
85 | narrowwirepeer.reposetup(repo) | |
87 |
|
86 | |||
88 | def _narrowvalidpath(orig, repo, path): |
|
|||
89 | matcher = getattr(repo, 'narrowmatch', None) |
|
|||
90 | if matcher is None: |
|
|||
91 | return orig(repo, path) |
|
|||
92 | matcher = matcher() |
|
|||
93 | if matcher.visitdir(path) or matcher(path): |
|
|||
94 | return orig(repo, path) |
|
|||
95 | return False |
|
|||
96 |
|
||||
97 | def _verifierinit(orig, self, repo, matcher=None): |
|
87 | def _verifierinit(orig, self, repo, matcher=None): | |
98 | # The verifier's matcher argument was desgined for narrowhg, so it should |
|
88 | # The verifier's matcher argument was desgined for narrowhg, so it should | |
99 | # be None from core. If another extension passes a matcher (unlikely), |
|
89 | # be None from core. If another extension passes a matcher (unlikely), | |
@@ -103,9 +93,6 b' def _verifierinit(orig, self, repo, matc' | |||||
103 | orig(self, repo, matcher) |
|
93 | orig(self, repo, matcher) | |
104 |
|
94 | |||
105 | def extsetup(ui): |
|
95 | def extsetup(ui): | |
106 | if util.safehasattr(verifymod, '_validpath'): |
|
96 | extensions.wrapfunction(verifymod.verifier, '__init__', _verifierinit) | |
107 | extensions.wrapfunction(verifymod, '_validpath', _narrowvalidpath) |
|
|||
108 | else: |
|
|||
109 | extensions.wrapfunction(verifymod.verifier, '__init__', _verifierinit) |
|
|||
110 | extensions.wrapfunction(hg, 'postshare', narrowrepo.wrappostshare) |
|
97 | extensions.wrapfunction(hg, 'postshare', narrowrepo.wrappostshare) | |
111 | extensions.wrapfunction(hg, 'copystore', narrowrepo.unsharenarrowspec) |
|
98 | extensions.wrapfunction(hg, 'copystore', narrowrepo.unsharenarrowspec) |
General Comments 0
You need to be logged in to leave comments.
Login now