# HG changeset patch # User Pierre-Yves David # Date 1669854807 -3600 # Node ID 1fae401b3b147236928b614cdf598001f027cb93 # Parent 0acefbbcc82a9122582eb545c30fee7503a46829 path: have `get_push_paths` directly return the push variants So the function directly returns usable paths, that should help the callers! diff -r 0acefbbcc82a -r 1fae401b3b14 mercurial/utils/urlutil.py --- a/mercurial/utils/urlutil.py Thu Dec 01 01:32:24 2022 +0100 +++ b/mercurial/utils/urlutil.py Thu Dec 01 01:33:27 2022 +0100 @@ -480,10 +480,10 @@ if not dests: if b'default-push' in ui.paths: for p in ui.paths[b'default-push']: - yield p + yield p.get_push_variant() elif b'default' in ui.paths: for p in ui.paths[b'default']: - yield p + yield p.get_push_variant() else: raise error.ConfigError( _(b'default repository not configured!'), @@ -493,14 +493,14 @@ for dest in dests: if dest in ui.paths: for p in ui.paths[dest]: - yield p + yield p.get_push_variant() 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 + yield path.get_push_variant() def get_pull_paths(repo, ui, sources):