hgext/narrow/__init__.py
changeset 36472 d0d5eef57fb0
parent 36468 6aae86976324
child 37136 e2d386b8a38f
equal deleted inserted replaced
36471:c28b6d609c47 36472:d0d5eef57fb0
    82 def _verifierinit(orig, self, repo, matcher=None):
    82 def _verifierinit(orig, self, repo, matcher=None):
    83     # The verifier's matcher argument was desgined for narrowhg, so it should
    83     # The verifier's matcher argument was desgined for narrowhg, so it should
    84     # be None from core. If another extension passes a matcher (unlikely),
    84     # be None from core. If another extension passes a matcher (unlikely),
    85     # we'll have to fail until matchers can be composed more easily.
    85     # we'll have to fail until matchers can be composed more easily.
    86     assert matcher is None
    86     assert matcher is None
    87     matcher = getattr(repo, 'narrowmatch', lambda: None)()
    87     orig(self, repo, repo.narrowmatch())
    88     orig(self, repo, matcher)
       
    89 
    88 
    90 def extsetup(ui):
    89 def extsetup(ui):
    91     extensions.wrapfunction(verifymod.verifier, '__init__', _verifierinit)
    90     extensions.wrapfunction(verifymod.verifier, '__init__', _verifierinit)
    92     extensions.wrapfunction(hg, 'postshare', narrowrepo.wrappostshare)
    91     extensions.wrapfunction(hg, 'postshare', narrowrepo.wrappostshare)
    93     extensions.wrapfunction(hg, 'copystore', narrowrepo.unsharenarrowspec)
    92     extensions.wrapfunction(hg, 'copystore', narrowrepo.unsharenarrowspec)