Patchwork D10456: infinitepush: use `get_unique_pull_path`

login
register
mail settings
Submitter phabricator
Date April 16, 2021, 8:52 a.m.
Message ID <differential-rev-PHID-DREV-ovpicfph74peuavrh4uf-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48773/
State Superseded
Headers show

Comments

phabricator - April 16, 2021, 8:52 a.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  The extension does not support multiple destination (yet).

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  hgext/infinitepush/__init__.py

CHANGE DETAILS




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

Patch

diff --git a/hgext/infinitepush/__init__.py b/hgext/infinitepush/__init__.py
--- a/hgext/infinitepush/__init__.py
+++ b/hgext/infinitepush/__init__.py
@@ -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 = {}