From patchwork Thu Apr 15 08:53:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D10439: urlutil: deprecate `getpath` From: phabricator X-Patchwork-Id: 48756 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Thu, 15 Apr 2021 08:53:12 +0000 marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY There as no remaining user of that function. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10439 AFFECTED FILES mercurial/ui.py mercurial/utils/urlutil.py CHANGE DETAILS To: marmoute, #hg-reviewers Cc: mercurial-patches, mercurial-devel 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 @@ 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: diff --git a/mercurial/ui.py b/mercurial/ui.py --- a/mercurial/ui.py +++ b/mercurial/ui.py @@ -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