Patchwork D10432: ui: deprecated `ui.expandpath`

login
register
mail settings
Submitter phabricator
Date April 14, 2021, 11:41 p.m.
Message ID <differential-rev-PHID-DREV-oce6khrkwspwxxoyuh5m-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48748/
State Superseded
Headers show

Comments

phabricator - April 14, 2021, 11:41 p.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This function return a single path, something incompatible with the coming
  change to `[paths]` definition to allow multiple associated urls.
  
  Now that all user got migrated, we deprecate the function.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/ui.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/ui.py b/mercurial/ui.py
--- a/mercurial/ui.py
+++ b/mercurial/ui.py
@@ -1030,6 +1030,8 @@ 
 
     def expandpath(self, loc, default=None):
         """Return repository location relative to cwd or from [paths]"""
+        msg = b'ui.expandpath is deprecated, use `get_*` functions from urlutil'
+        self.deprecwarn(msg, '6.0')
         try:
             p = self.getpath(loc)
             if p: