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.
| No Linters Available |
| No Unit Test Coverage |
| Path | Packages | |||
|---|---|---|---|---|
| M | mercurial/ui.py (2 lines) |
| Commit | Parents | Author | Summary | Date |
|---|---|---|---|---|
| 27bb7efd574a | 007d284a6b83 | Pierre-Yves David | Apr 14 2021, 7:03 PM |
| 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, '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: | ||||