changeset 47070:9ea75ea23534

urlutil: deprecate `getpath` There as no remaining user of that function. Differential Revision: https://phab.mercurial-scm.org/D10439
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 15 Apr 2021 10:05:51 +0200
parents d69a9628eba7
children c2b5365aa827
files mercurial/ui.py mercurial/utils/urlutil.py
diffstat 2 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/ui.py	Thu Apr 15 10:01:44 2021 +0200
+++ b/mercurial/ui.py	Thu Apr 15 10:05:51 2021 +0200
@@ -1058,6 +1058,8 @@
 
         This method exist as `getpath` need a ui for potential warning message.
         """
+        msg = b'ui.getpath is deprecated, use `get_*` functions from urlutil'
+        self.deprecwarn(msg, '6.0')
         return self.paths.getpath(self, *args, **kwargs)
 
     @property
--- a/mercurial/utils/urlutil.py	Thu Apr 15 10:01:44 2021 +0200
+++ b/mercurial/utils/urlutil.py	Thu Apr 15 10:05:51 2021 +0200
@@ -610,6 +610,8 @@
         Returns None if ``name`` is not a registered path, a URI, or a local
         path to a repo.
         """
+        msg = b'getpath is deprecated, use `get_*` functions from urlutil'
+        self.deprecwarn(msg, '6.0')
         # Only fall back to default if no path was requested.
         if name is None:
             if not default: