path: pass `path` to `peer` in `hg transplant`
authorPierre-Yves David <pierre-yves.david@octobus.net>
Fri, 02 Dec 2022 06:31:19 +0100
changeset 49841 acf4be97033b
parent 49840 5177be2b4387
child 49842 c6ae90515660
path: pass `path` to `peer` in `hg transplant` We directly use the `path` object to build the `peer` object.
hgext/transplant.py
--- a/hgext/transplant.py	Fri Dec 02 06:29:11 2022 +0100
+++ b/hgext/transplant.py	Fri Dec 02 06:31:19 2022 +0100
@@ -817,8 +817,8 @@
 
     sourcerepo = opts.get(b'source')
     if sourcerepo:
-        u = urlutil.get_unique_pull_path(b'transplant', repo, ui, sourcerepo)[0]
-        peer = hg.peer(repo, opts, u)
+        path = urlutil.get_unique_pull_path_obj(b'transplant', ui, sourcerepo)
+        peer = hg.peer(repo, opts, path)
         heads = pycompat.maplist(peer.lookup, opts.get(b'branch', ()))
         target = set(heads)
         for r in revs: