Mercurial > hg
diff mercurial/utils/urlutil.py @ 48240:607e9322fc89
path: return path instance directly from get_pull_paths
This means the caller has to do a bit more work, however it give access to the
`path` instance and the information it contains.
Differential Revision: https://phab.mercurial-scm.org/D11673
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 15 Oct 2021 02:44:14 +0200 |
parents | 08630dd719f9 |
children | 4d2ab365699e |
line wrap: on
line diff
--- a/mercurial/utils/urlutil.py Fri Oct 15 02:36:54 2021 +0200 +++ b/mercurial/utils/urlutil.py Fri Oct 15 02:44:14 2021 +0200 @@ -503,17 +503,17 @@ yield path -def get_pull_paths(repo, ui, sources, default_branches=()): +def get_pull_paths(repo, ui, sources): """yields all the `(path, branch)` selected as pull source by `sources`""" if not sources: sources = [b'default'] for source in sources: if source in ui.paths: for p in ui.paths[source]: - yield parseurl(p.rawloc, default_branches) + yield p else: p = path(ui, None, source, validate_path=False) - yield parseurl(p.rawloc, default_branches) + yield p def get_unique_push_path(action, repo, ui, dest=None):