ui: drop the deprecated `expandpath()`
authorMatt Harbison <matt_harbison@yahoo.com>
Tue, 03 Jan 2023 11:48:21 -0500
changeset 49837 dcf983a5f906
parent 49828 9854a9adc466
child 49838 b7f33ed1d909
ui: drop the deprecated `expandpath()` This was deprecated since 5.8.
mercurial/ui.py
--- a/mercurial/ui.py	Thu Dec 22 16:57:56 2022 +0000
+++ b/mercurial/ui.py	Tue Jan 03 11:48:21 2023 -0500
@@ -1099,27 +1099,6 @@
             user = stringutil.shortuser(user)
         return user
 
-    def expandpath(self, loc, default=None):
-        """Return repository location relative to cwd or from [paths]"""
-        msg = b'ui.expandpath is deprecated, use `get_*` functions from urlutil'
-        self.deprecwarn(msg, b'6.0')
-        try:
-            p = self.getpath(loc)
-            if p:
-                return p.rawloc
-        except error.RepoError:
-            pass
-
-        if default:
-            try:
-                p = self.getpath(default)
-                if p:
-                    return p.rawloc
-            except error.RepoError:
-                pass
-
-        return loc
-
     @util.propertycache
     def paths(self):
         return urlutil.paths(self)