Patchwork D7249: match: drop support for passing '.' for root dir to visit*() methods

login
register
mail settings
Submitter phabricator
Date Nov. 11, 2019, 12:35 p.m.
Message ID <04b6f6d482634c01c79eb6e02ebfc444@localhost.localdomain>
Download mbox | patch
Permalink /patch/43115/
State Not Applicable
Headers show

Comments

phabricator - Nov. 11, 2019, 12:35 p.m.
Closed by commit rHGecd11c4d3834: match: drop support for passing &#039;.&#039; for root dir to visit*() methods (authored by martinvonz).
This revision was automatically updated to reflect the committed changes.

CHANGED PRIOR TO COMMIT
  https://phab.mercurial-scm.org/D7249?vs=17579&id=18014#toc

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7249?vs=17579&id=18014

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7249/new/

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

AFFECTED FILES
  mercurial/match.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers, pulkit
Cc: mercurial-devel

Patch

diff --git a/mercurial/match.py b/mercurial/match.py
--- a/mercurial/match.py
+++ b/mercurial/match.py
@@ -547,16 +547,6 @@ 
         return b'<predicatenmatcher pred=%s>' % s
 
 
-def normalizerootdir(dir, funcname):
-    if dir == b'.':
-        util.nouideprecwarn(
-            b"match.%s() no longer accepts '.', use '' instead." % funcname,
-            b'5.1',
-        )
-        return b''
-    return dir
-
-
 class patternmatcher(basematcher):
     """Matches a set of (kind, pat, source) against a 'root' directory.
 
@@ -602,7 +592,6 @@ 
         return set(pathutil.dirs(self._fileset))
 
     def visitdir(self, dir):
-        dir = normalizerootdir(dir, b'visitdir')
         if self._prefix and dir in self._fileset:
             return b'all'
         return (
@@ -686,7 +675,6 @@ 
         self._parents = parents
 
     def visitdir(self, dir):
-        dir = normalizerootdir(dir, b'visitdir')
         if self._prefix and dir in self._roots:
             return b'all'
         return (
@@ -767,12 +755,9 @@ 
         return set(pathutil.dirs(self._fileset))
 
     def visitdir(self, dir):
-        dir = normalizerootdir(dir, b'visitdir')
         return dir in self._dirs
 
     def visitchildrenset(self, dir):
-        dir = normalizerootdir(dir, b'visitchildrenset')
-
         if not self._fileset or dir not in self._dirs:
             return set()
 
@@ -1009,7 +994,6 @@ 
         return self._matcher.matchfn(self._path + b"/" + f)
 
     def visitdir(self, dir):
-        dir = normalizerootdir(dir, b'visitdir')
         if dir == b'':
             dir = self._path
         else:
@@ -1017,7 +1001,6 @@ 
         return self._matcher.visitdir(dir)
 
     def visitchildrenset(self, dir):
-        dir = normalizerootdir(dir, b'visitchildrenset')
         if dir == b'':
             dir = self._path
         else: