[Commented On] D10439: urlutil: deprecate `getpath`
baymax (Baymax, Your Personal Patch-care Companion)
phabricator at mercurial-scm.org
Fri Apr 30 11:59:05 UTC 2021
baymax added a comment.
baymax updated this revision to Diff 27227.
✅ refresh by Heptapod after a successful CI run (🐙 💚)
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D10439?vs=27218&id=27227
BRANCH
default
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D10439/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D10439
AFFECTED FILES
mercurial/ui.py
mercurial/utils/urlutil.py
CHANGE DETAILS
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
To: marmoute, #hg-reviewers, Alphare, pulkit
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210430/2cc830a5/attachment-0002.html>
More information about the Mercurial-patches
mailing list