Patchwork D10871: urlutil: use the deprecation warning function on the `ui` object

login
register
mail settings
Submitter phabricator
Date June 12, 2021, 4:56 a.m.
Message ID <differential-rev-PHID-DREV-um4iwmjfnzknbm35xjsx-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49192/
State Superseded
Headers show

Comments

phabricator - June 12, 2021, 4:56 a.m.
mharbison72 created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  PyCharm flagged this as not existing, and I suspect a copy/paste error.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D10871

AFFECTED FILES
  mercurial/utils/urlutil.py

CHANGE DETAILS




To: mharbison72, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/utils/urlutil.py b/mercurial/utils/urlutil.py
--- a/mercurial/utils/urlutil.py
+++ b/mercurial/utils/urlutil.py
@@ -684,7 +684,7 @@ 
         path to a repo.
         """
         msg = b'getpath is deprecated, use `get_*` functions from urlutil'
-        self.deprecwarn(msg, '6.0')
+        ui.deprecwarn(msg, '6.0')
         # Only fall back to default if no path was requested.
         if name is None:
             if not default: