Show More
@@ -15,11 +15,9 b' from __future__ import absolute_import' | |||||
15 | testedwith = 'ships-with-hg-core' |
|
15 | testedwith = 'ships-with-hg-core' | |
16 |
|
16 | |||
17 | from mercurial import ( |
|
17 | from mercurial import ( | |
18 | extensions, |
|
|||
19 | localrepo, |
|
18 | localrepo, | |
20 | registrar, |
|
19 | registrar, | |
21 | repository, |
|
20 | repository, | |
22 | verify as verifymod, |
|
|||
23 | ) |
|
21 | ) | |
24 |
|
22 | |||
25 | from . import ( |
|
23 | from . import ( | |
@@ -70,15 +68,5 b' def reposetup(ui, repo):' | |||||
70 | narrowpatch.setup(repo) |
|
68 | narrowpatch.setup(repo) | |
71 | narrowwirepeer.reposetup(repo) |
|
69 | narrowwirepeer.reposetup(repo) | |
72 |
|
70 | |||
73 | def _verifierinit(orig, self, repo, matcher=None): |
|
|||
74 | # The verifier's matcher argument was desgined for narrowhg, so it should |
|
|||
75 | # be None from core. If another extension passes a matcher (unlikely), |
|
|||
76 | # we'll have to fail until matchers can be composed more easily. |
|
|||
77 | assert matcher is None |
|
|||
78 | orig(self, repo, repo.narrowmatch()) |
|
|||
79 |
|
||||
80 | def extsetup(ui): |
|
|||
81 | extensions.wrapfunction(verifymod.verifier, '__init__', _verifierinit) |
|
|||
82 |
|
||||
83 | templatekeyword = narrowtemplates.templatekeyword |
|
71 | templatekeyword = narrowtemplates.templatekeyword | |
84 | revsetpredicate = narrowtemplates.revsetpredicate |
|
72 | revsetpredicate = narrowtemplates.revsetpredicate |
@@ -19,7 +19,6 b' from . import (' | |||||
19 | error, |
|
19 | error, | |
20 | pycompat, |
|
20 | pycompat, | |
21 | revlog, |
|
21 | revlog, | |
22 | scmutil, |
|
|||
23 | util, |
|
22 | util, | |
24 | ) |
|
23 | ) | |
25 |
|
24 | |||
@@ -35,12 +34,10 b' def _normpath(f):' | |||||
35 | return f |
|
34 | return f | |
36 |
|
35 | |||
37 | class verifier(object): |
|
36 | class verifier(object): | |
38 | # The match argument is always None in hg core, but e.g. the narrowhg |
|
37 | def __init__(self, repo): | |
39 | # extension will pass in a matcher here. |
|
|||
40 | def __init__(self, repo, match=None): |
|
|||
41 | self.repo = repo.unfiltered() |
|
38 | self.repo = repo.unfiltered() | |
42 | self.ui = repo.ui |
|
39 | self.ui = repo.ui | |
43 |
self.match = |
|
40 | self.match = repo.narrowmatch() | |
44 | self.badrevs = set() |
|
41 | self.badrevs = set() | |
45 | self.errors = 0 |
|
42 | self.errors = 0 | |
46 | self.warnings = 0 |
|
43 | self.warnings = 0 |
General Comments 0
You need to be logged in to leave comments.
Login now