# HG changeset patch # User Pierre-Yves David # Date 2021-04-15 08:05:51 # Node ID 9ea75ea235347aa20e93de6c24afc6912fee498a # Parent d69a9628eba73d9128fcde5ce008e9d4afd3b967 urlutil: deprecate `getpath` There as no remaining user of that function. Differential Revision: https://phab.mercurial-scm.org/D10439 diff --git a/mercurial/ui.py b/mercurial/ui.py --- a/mercurial/ui.py +++ b/mercurial/ui.py @@ -1058,6 +1058,8 @@ class ui(object): 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 diff --git a/mercurial/utils/urlutil.py b/mercurial/utils/urlutil.py --- a/mercurial/utils/urlutil.py +++ b/mercurial/utils/urlutil.py @@ -610,6 +610,8 @@ class paths(dict): 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: