Skip to content
Snippets Groups Projects
Commit c5c2936f6fb2 authored by Pierre-Yves David's avatar Pierre-Yves David
Browse files

revset: use `get_unique_pull_path` for `remote(…)`

This one is also resolving path. For now we restrict the feature to a single
destination. This might change in the future.

Differential Revision: https://phab.mercurial-scm.org/D10422
parent 3000f2100711
Branches
Tags
No related merge requests found
......@@ -2121,8 +2121,11 @@
if len(l) > 1:
# i18n: "remote" is a keyword
dest = getstring(l[1], _(b"remote requires a repository path"))
dest = repo.ui.expandpath(dest or b'default')
dest, branches = urlutil.parseurl(dest)
if not dest:
dest = b'default'
dest, branches = urlutil.get_unique_pull_path(
b'remote', repo, repo.ui, dest
)
other = hg.peer(repo, {}, dest)
n = other.lookup(q)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment