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.
| pulkit |
| hg-reviewers |
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.
| Automatic diff as part of commit; lint not applicable. |
| Automatic diff as part of commit; unit tests not applicable. |
| Path | Packages | |||
|---|---|---|---|---|
| M | mercurial/ui.py (2 lines) |
| def shortuser(self, user): | def shortuser(self, user): | ||||
| """Return a short representation of a user name or email address.""" | """Return a short representation of a user name or email address.""" | ||||
| if not self.verbose: | if not self.verbose: | ||||
| user = stringutil.shortuser(user) | user = stringutil.shortuser(user) | ||||
| return user | return user | ||||
| def expandpath(self, loc, default=None): | def expandpath(self, loc, default=None): | ||||
| """Return repository location relative to cwd or from [paths]""" | """Return repository location relative to cwd or from [paths]""" | ||||
| msg = b'ui.expandpath is deprecated, use `get_*` functions from urlutil' | |||||
| self.deprecwarn(msg, b'6.0') | |||||
| try: | try: | ||||
| p = self.getpath(loc) | p = self.getpath(loc) | ||||
| if p: | if p: | ||||
| return p.rawloc | return p.rawloc | ||||
| except error.RepoError: | except error.RepoError: | ||||
| pass | pass | ||||
| if default: | if default: | ||||