D11672: path: unify path creation in `get_pull_paths`

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Fri Oct 15 08:18:40 UTC 2021


marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This remove a special case and will make it possible to return `path` instance
  directly.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D11672

AFFECTED FILES
  mercurial/utils/urlutil.py

CHANGE DETAILS

diff --git a/mercurial/utils/urlutil.py b/mercurial/utils/urlutil.py
--- a/mercurial/utils/urlutil.py
+++ b/mercurial/utils/urlutil.py
@@ -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):



To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel


More information about the Mercurial-devel mailing list