Patchwork D11672: path: unify path creation in `get_pull_paths`

login
register
mail settings
Submitter phabricator
Date Oct. 15, 2021, 8:18 a.m.
Message ID <differential-rev-PHID-DREV-cjqurrwg2u3exp6oftkf-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49996/
State Superseded
Headers show

Comments

phabricator - Oct. 15, 2021, 8:18 a.m.
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




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

Patch

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):