Mercurial > hg
comparison mercurial/ui.py @ 46965:b03527bdac01
ui: deprecated `ui.expandpath`
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.
Differential Revision: https://phab.mercurial-scm.org/D10432
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 15 Apr 2021 01:03:12 +0200 |
parents | ffd3e823a7e5 |
children | 9ea75ea23534 5b3513177f2b |
comparison
equal
deleted
inserted
replaced
46964:221f8585e985 | 46965:b03527bdac01 |
---|---|
1028 user = stringutil.shortuser(user) | 1028 user = stringutil.shortuser(user) |
1029 return user | 1029 return user |
1030 | 1030 |
1031 def expandpath(self, loc, default=None): | 1031 def expandpath(self, loc, default=None): |
1032 """Return repository location relative to cwd or from [paths]""" | 1032 """Return repository location relative to cwd or from [paths]""" |
1033 msg = b'ui.expandpath is deprecated, use `get_*` functions from urlutil' | |
1034 self.deprecwarn(msg, b'6.0') | |
1033 try: | 1035 try: |
1034 p = self.getpath(loc) | 1036 p = self.getpath(loc) |
1035 if p: | 1037 if p: |
1036 return p.rawloc | 1038 return p.rawloc |
1037 except error.RepoError: | 1039 except error.RepoError: |