The part that get_push_paths needs is quite simple, inclining will help us
to deprecated getpath.
Details
Details
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Branch
- default
- Lint
No Linters Available - Unit
No Unit Test Coverage
The part that get_push_paths needs is quite simple, inclining will help us
to deprecated getpath.
| No Linters Available |
| No Unit Test Coverage |
| Path | Packages | |||
|---|---|---|---|---|
| M | mercurial/utils/urlutil.py (10 lines) |
| Commit | Parents | Author | Summary | Date |
|---|---|---|---|---|
| 5d02950ca4b3 | bb460944f315 | Pierre-Yves David | Apr 15 2021, 4:01 AM |
| yield ui.paths[b'default'] | yield ui.paths[b'default'] | ||||
| else: | else: | ||||
| raise error.ConfigError( | raise error.ConfigError( | ||||
| _(b'default repository not configured!'), | _(b'default repository not configured!'), | ||||
| hint=_(b"see 'hg help config.paths'"), | hint=_(b"see 'hg help config.paths'"), | ||||
| ) | ) | ||||
| else: | else: | ||||
| for dest in dests: | for dest in dests: | ||||
| yield ui.getpath(dest) | if dest in ui.paths: | ||||
| yield ui.paths[dest] | |||||
| else: | |||||
| path = try_path(ui, dest) | |||||
| if path is None: | |||||
| msg = _(b'repository %s does not exist') | |||||
| msg %= dest | |||||
| raise error.RepoError(msg) | |||||
| yield path | |||||
| def get_pull_paths(repo, ui, sources, default_branches=()): | def get_pull_paths(repo, ui, sources, default_branches=()): | ||||
| """yields all the `(path, branch)` selected as pull source by `sources`""" | """yields all the `(path, branch)` selected as pull source by `sources`""" | ||||
| if not sources: | if not sources: | ||||
| sources = [b'default'] | sources = [b'default'] | ||||
| for source in sources: | for source in sources: | ||||
| if source in ui.paths: | if source in ui.paths: | ||||