Details
Details
- Reviewers
yuja - Group Reviewers
hg-reviewers - Commits
- rHGe6487522ef92: py3: use pycompat.maplist() instead of map()
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
( )
| yuja |
| hg-reviewers |
| Lint Skipped |
| Unit Tests Skipped |
| except error.RequirementError: | except error.RequirementError: | ||||
| raise | raise | ||||
| except error.RepoError: | except error.RepoError: | ||||
| if rpath and rpath[-1]: # invalid -R path | if rpath and rpath[-1]: # invalid -R path | ||||
| raise | raise | ||||
| if not func.optionalrepo: | if not func.optionalrepo: | ||||
| if func.inferrepo and args and not path: | if func.inferrepo and args and not path: | ||||
| # try to infer -R from command args | # try to infer -R from command args | ||||
| repos = map(cmdutil.findrepo, args) | repos = pycompat.maplist(cmdutil.findrepo, args) | ||||
| guess = repos[0] | guess = repos[0] | ||||
| if guess and repos.count(guess) == len(repos): | if guess and repos.count(guess) == len(repos): | ||||
| req.args = ['--repository', guess] + fullargs | req.args = ['--repository', guess] + fullargs | ||||
| return _dispatch(req) | return _dispatch(req) | ||||
| if not path: | if not path: | ||||
| raise error.RepoError(_("no repository found in" | raise error.RepoError(_("no repository found in" | ||||
| " '%s' (.hg not found)") | " '%s' (.hg not found)") | ||||
| % pycompat.getcwd()) | % pycompat.getcwd()) | ||||