Comments
Patch
@@ -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:
@@ -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(
+ "infinite-push's pull",
+ repo,
+ ui,
+ source,
+ default_branches=opts.get(b'branch'),
)
scratchbookmarks = {}