Patchwork D1975: narrow: remove support for old match modules

login
register
mail settings
Submitter phabricator
Date Feb. 12, 2018, 11:17 p.m.
Message ID <7d16737f19b0303a8d6eb18ea53a2c4e@localhost.localdomain>
Download mbox | patch
Permalink /patch/27722/
State Not Applicable
Headers show

Comments

phabricator - Feb. 12, 2018, 11:17 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG9dc28d8ea61e: narrow: remove support for old match modules (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1975?vs=5096&id=5542

REVISION DETAIL
  https://phab.mercurial-scm.org/D1975

AFFECTED FILES
  hgext/narrow/__init__.py

CHANGE DETAILS




To: durin42, #hg-reviewers, indygreg
Cc: mercurial-devel

Patch

diff --git a/hgext/narrow/__init__.py b/hgext/narrow/__init__.py
--- a/hgext/narrow/__init__.py
+++ b/hgext/narrow/__init__.py
@@ -24,7 +24,6 @@ 
     hg,
     localrepo,
     registrar,
-    util,
     verify as verifymod,
 )
 
@@ -85,15 +84,6 @@ 
         narrowpatch.setup(repo)
         narrowwirepeer.reposetup(repo)
 
-def _narrowvalidpath(orig, repo, path):
-    matcher = getattr(repo, 'narrowmatch', None)
-    if matcher is None:
-        return orig(repo, path)
-    matcher = matcher()
-    if matcher.visitdir(path) or matcher(path):
-        return orig(repo, path)
-    return False
-
 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),
@@ -103,9 +93,6 @@ 
     orig(self, repo, matcher)
 
 def extsetup(ui):
-    if util.safehasattr(verifymod, '_validpath'):
-        extensions.wrapfunction(verifymod, '_validpath', _narrowvalidpath)
-    else:
-        extensions.wrapfunction(verifymod.verifier, '__init__', _verifierinit)
+    extensions.wrapfunction(verifymod.verifier, '__init__', _verifierinit)
     extensions.wrapfunction(hg, 'postshare', narrowrepo.wrappostshare)
     extensions.wrapfunction(hg, 'copystore', narrowrepo.unsharenarrowspec)