# HG changeset patch # User Pierre-Yves David # Date 2021-04-16 08:46:56 # Node ID 0428e555acb78c5cb2d74b2b828db7f4cadd62a3 # Parent 30ee1224b9a2c0efcf975e3d4b1e2822ca9aa3da transplant: use `get_unique_pull_path` The command does not support multiple destination (yet). Differential Revision: https://phab.mercurial-scm.org/D10410 diff --git a/hgext/transplant.py b/hgext/transplant.py --- a/hgext/transplant.py +++ b/hgext/transplant.py @@ -47,6 +47,7 @@ from mercurial import ( from mercurial.utils import ( procutil, stringutil, + urlutil, ) @@ -818,7 +819,8 @@ def _dotransplant(ui, repo, *revs, **opt sourcerepo = opts.get(b'source') if sourcerepo: - peer = hg.peer(repo, opts, ui.expandpath(sourcerepo)) + u = urlutil.get_unique_pull_path(b'transplant', repo, ui, sourcerepo)[0] + peer = hg.peer(repo, opts, u) heads = pycompat.maplist(peer.lookup, opts.get(b'branch', ())) target = set(heads) for r in revs: