path: have `get_push_paths` directly return the push variants
So the function directly returns usable paths, that should help the callers!
--- 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):