changeset 49697:1fae401b3b14

path: have `get_push_paths` directly return the push variants So the function directly returns usable paths, that should help the callers!
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 01 Dec 2022 01:33:27 +0100
parents 0acefbbcc82a
children c9690836747d
files mercurial/utils/urlutil.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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):