D5908: match: delete unused abs() (API)

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Fri Feb 8 16:37:59 EST 2019


martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/match.py

CHANGE DETAILS

diff --git a/mercurial/match.py b/mercurial/match.py
--- a/mercurial/match.py
+++ b/mercurial/match.py
@@ -283,11 +283,6 @@
     # by recursive traversal is visited.
     traversedir = None
 
-    def abs(self, f):
-        '''Convert a repo path back to path that is relative to the root of the
-        matcher.'''
-        return f
-
     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)
@@ -721,7 +716,6 @@
         m.bad = m1.bad
         m.explicitdir = m1.explicitdir
         m.traversedir = m1.traversedir
-        m.abs = m1.abs
         m.rel = m1.rel
         return m
     if m2.always():
@@ -817,8 +811,6 @@
     >>> m1.bad = bad
     >>> m2.bad(b'x.txt', b'No such file')
     sub/x.txt: No such file
-    >>> m2.abs(b'c.txt')
-    'sub/c.txt'
     """
 
     def __init__(self, path, matcher):
@@ -838,9 +830,6 @@
     def bad(self, f, msg):
         self._matcher.bad(self._path + "/" + f, msg)
 
-    def abs(self, f):
-        return self._matcher.abs(self._path + "/" + f)
-
     def rel(self, f):
         return self._matcher.rel(self._path + "/" + f)
 



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


More information about the Mercurial-devel mailing list