infinitepush: use `get_unique_pull_path`
The extension does not support multiple destination (yet).
Differential Revision: https://phab.mercurial-scm.org/D10456
--- 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 = {}