changeset 46944:0428e555acb7

transplant: use `get_unique_pull_path` The command does not support multiple destination (yet). Differential Revision: https://phab.mercurial-scm.org/D10410
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 16 Apr 2021 10:46:56 +0200
parents 30ee1224b9a2
children c1749dd31cdf
files hgext/transplant.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/transplant.py	Fri Apr 16 10:46:52 2021 +0200
+++ b/hgext/transplant.py	Fri Apr 16 10:46:56 2021 +0200
@@ -47,6 +47,7 @@
 from mercurial.utils import (
     procutil,
     stringutil,
+    urlutil,
 )
 
 
@@ -818,7 +819,8 @@
 
     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: