Patchwork D5906: match: delete unused uipath() and _uipathrelative (API)

login
register
mail settings
Submitter phabricator
Date Feb. 10, 2019, 3:40 a.m.
Message ID <53db60434b74d47a5c248ccedd38b867@localhost.localdomain>
Download mbox | patch
Permalink /patch/38633/
State Not Applicable
Headers show

Comments

phabricator - Feb. 10, 2019, 3:40 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGdadbfcc63b3e: match: delete unused uipath() and _uipathrelative (API) (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5906?vs=13972&id=13988

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

AFFECTED FILES
  mercurial/match.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/match.py b/mercurial/match.py
--- a/mercurial/match.py
+++ b/mercurial/match.py
@@ -170,7 +170,7 @@ 
     if patterns:
         kindpats = normalize(patterns, default, root, cwd, auditor, warn)
         if _kindpatsalwaysmatch(kindpats):
-            m = alwaysmatcher(root, cwd, badfn, relativeuipath=True)
+            m = alwaysmatcher(root, cwd, badfn)
         else:
             m = _buildkindpatsmatcher(patternmatcher, root, cwd, kindpats,
                                       ctx=ctx, listsubrepos=listsubrepos,
@@ -252,12 +252,11 @@ 
 
 class basematcher(object):
 
-    def __init__(self, root, cwd, badfn=None, relativeuipath=True):
+    def __init__(self, root, cwd, badfn=None):
         self._root = root
         self._cwd = cwd
         if badfn is not None:
             self.bad = badfn
-        self._relativeuipath = relativeuipath
 
     def __call__(self, fn):
         return self.matchfn(fn)
@@ -287,12 +286,6 @@ 
         '''Convert repo path back to path that is relative to cwd of matcher.'''
         return util.pathto(self._root, self._cwd, f)
 
-    def uipath(self, f):
-        '''Convert repo path to a display path.  If patterns or -I/-X were used
-        to create this matcher, the display path will be relative to cwd.
-        Otherwise it is relative to the root of the repo.'''
-        return (self._relativeuipath and self.rel(f)) or self.abs(f)
-
     @propertycache
     def _files(self):
         return []
@@ -393,9 +386,8 @@ 
 class alwaysmatcher(basematcher):
     '''Matches everything.'''
 
-    def __init__(self, root, cwd, badfn=None, relativeuipath=False):
-        super(alwaysmatcher, self).__init__(root, cwd, badfn,
-                                            relativeuipath=relativeuipath)
+    def __init__(self, root, cwd, badfn=None):
+        super(alwaysmatcher, self).__init__(root, cwd, badfn)
 
     def always(self):
         return True
@@ -725,11 +717,9 @@ 
         m.traversedir = m1.traversedir
         m.abs = m1.abs
         m.rel = m1.rel
-        m._relativeuipath |= m1._relativeuipath
         return m
     if m2.always():
         m = copy.copy(m1)
-        m._relativeuipath |= m2._relativeuipath
         return m
     return intersectionmatcher(m1, m2)
 
@@ -848,9 +838,6 @@ 
     def rel(self, f):
         return self._matcher.rel(self._path + "/" + f)
 
-    def uipath(self, f):
-        return self._matcher.uipath(self._path + "/" + f)
-
     def matchfn(self, f):
         # Some information is lost in the superclass's constructor, so we
         # can not accurately create the matching function for the subdirectory