ui: drop the deprecated `expandpath()`
This was deprecated since 5.8.
--- 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)