match: delete unused rel() (API)
authorMartin von Zweigbergk <martinvonz@google.com>
Sat, 09 Feb 2019 16:46:11 -0800
changeset 41668 c4f023b656cf
parent 41667 8fa1a5fb8a28
child 41669 a13268524c25
match: delete unused rel() (API) Differential Revision: https://phab.mercurial-scm.org/D5923
mercurial/match.py
--- a/mercurial/match.py	Sat Feb 09 16:43:20 2019 -0800
+++ b/mercurial/match.py	Sat Feb 09 16:46:11 2019 -0800
@@ -277,10 +277,6 @@
     # by recursive traversal is visited.
     traversedir = None
 
-    def rel(self, f):
-        '''Convert repo path back to path that is relative to cwd of matcher.'''
-        return util.pathto(self._root, self._cwd, f)
-
     @propertycache
     def _files(self):
         return []
@@ -710,7 +706,6 @@
         m.bad = m1.bad
         m.explicitdir = m1.explicitdir
         m.traversedir = m1.traversedir
-        m.rel = m1.rel
         return m
     if m2.always():
         m = copy.copy(m1)
@@ -798,8 +793,6 @@
     ['b.txt']
     >>> m2.exact(b'b.txt')
     True
-    >>> util.pconvert(m2.rel(b'b.txt'))
-    'sub/b.txt'
     >>> def bad(f, msg):
     ...     print(pycompat.sysstr(b"%s: %s" % (f, msg)))
     >>> m1.bad = bad
@@ -824,9 +817,6 @@
     def bad(self, f, msg):
         self._matcher.bad(self._path + "/" + f, msg)
 
-    def rel(self, f):
-        return self._matcher.rel(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