path: unify path creation in `get_pull_paths`
authorPierre-Yves David <pierre-yves.david@octobus.net>
Fri, 15 Oct 2021 02:36:54 +0200
changeset 48239 08630dd719f9
parent 48238 ea50caada82d
child 48240 607e9322fc89
path: unify path creation in `get_pull_paths` This remove a special case and will make it possible to return `path` instance directly. Differential Revision: https://phab.mercurial-scm.org/D11672
mercurial/utils/urlutil.py
--- a/mercurial/utils/urlutil.py	Fri Oct 15 02:36:38 2021 +0200
+++ b/mercurial/utils/urlutil.py	Fri Oct 15 02:36:54 2021 +0200
@@ -512,13 +512,8 @@
             for p in ui.paths[source]:
                 yield parseurl(p.rawloc, default_branches)
         else:
-            # Try to resolve as a local path or URI.
-            path = try_path(ui, source)
-            if path is not None:
-                url = path.rawloc
-            else:
-                url = source
-            yield parseurl(url, default_branches)
+            p = path(ui, None, source, validate_path=False)
+            yield parseurl(p.rawloc, default_branches)
 
 
 def get_unique_push_path(action, repo, ui, dest=None):