Details
Details
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
( )
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
Path | Packages | |||
---|---|---|---|---|
M | hgext/narrow/__init__.py (12 lines) | |||
M | mercurial/verify.py (3 lines) |
Status | Author | Revision | |
---|---|---|---|
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz |
# Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for | # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for | ||||
# extensions which SHIP WITH MERCURIAL. Non-mainline extensions should | # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should | ||||
# be specifying the version(s) of Mercurial they are tested with, or | # be specifying the version(s) of Mercurial they are tested with, or | ||||
# leave the attribute unspecified. | # leave the attribute unspecified. | ||||
testedwith = 'ships-with-hg-core' | testedwith = 'ships-with-hg-core' | ||||
from mercurial import ( | from mercurial import ( | ||||
extensions, | |||||
localrepo, | localrepo, | ||||
registrar, | registrar, | ||||
repository, | repository, | ||||
verify as verifymod, | |||||
) | ) | ||||
from . import ( | from . import ( | ||||
narrowbundle2, | narrowbundle2, | ||||
narrowcommands, | narrowcommands, | ||||
narrowpatch, | narrowpatch, | ||||
narrowrepo, | narrowrepo, | ||||
narrowtemplates, | narrowtemplates, | ||||
if not repo.local(): | if not repo.local(): | ||||
return | return | ||||
if repository.NARROW_REQUIREMENT in repo.requirements: | if repository.NARROW_REQUIREMENT in repo.requirements: | ||||
narrowrepo.wraprepo(repo) | narrowrepo.wraprepo(repo) | ||||
narrowpatch.setup(repo) | narrowpatch.setup(repo) | ||||
narrowwirepeer.reposetup(repo) | narrowwirepeer.reposetup(repo) | ||||
def _verifierinit(orig, self, repo, matcher=None): | |||||
# The verifier's matcher argument was desgined for narrowhg, so it should | |||||
# be None from core. If another extension passes a matcher (unlikely), | |||||
# we'll have to fail until matchers can be composed more easily. | |||||
assert matcher is None | |||||
orig(self, repo, repo.narrowmatch()) | |||||
def extsetup(ui): | |||||
extensions.wrapfunction(verifymod.verifier, '__init__', _verifierinit) | |||||
templatekeyword = narrowtemplates.templatekeyword | templatekeyword = narrowtemplates.templatekeyword | ||||
revsetpredicate = narrowtemplates.revsetpredicate | revsetpredicate = narrowtemplates.revsetpredicate |
match is unused after this change. Should we drop it?