[Updated] [+ ] D10439: urlutil: deprecate `getpath`

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Thu Apr 15 14:39:47 UTC 2021


marmoute updated this revision to Diff 26948.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D10439?vs=26926&id=26948

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
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210415/75b8bf6f/attachment-0002.html>


More information about the Mercurial-patches mailing list