infinitepush: use `get_unique_pull_path`
authorPierre-Yves David <pierre-yves.david@octobus.net>
Fri, 16 Apr 2021 10:46:52 +0200
changeset 46943 30ee1224b9a2
parent 46942 b5e7cdb93abc
child 46944 0428e555acb7
infinitepush: use `get_unique_pull_path` The extension does not support multiple destination (yet). Differential Revision: https://phab.mercurial-scm.org/D10456
hgext/infinitepush/__init__.py
--- a/hgext/infinitepush/__init__.py	Wed Apr 14 12:29:44 2021 +0200
+++ b/hgext/infinitepush/__init__.py	Fri Apr 16 10:46:52 2021 +0200
@@ -684,8 +684,12 @@
 def _pull(orig, ui, repo, source=b"default", **opts):
     opts = pycompat.byteskwargs(opts)
     # Copy paste from `pull` command
-    source, branches = urlutil.parseurl(
-        ui.expandpath(source), opts.get(b'branch')
+    source, branches = urlutil.get_unique_pull_path(
+        b"infinite-push's pull",
+        repo,
+        ui,
+        source,
+        default_branches=opts.get(b'branch'),
     )
 
     scratchbookmarks = {}