Mercurial > public > mercurial-scm > hg-stable
diff mercurial/revset.py @ 46956:c5c2936f6fb2
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
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 14 Apr 2021 20:21:11 +0200 |
parents | 9519312ecd81 |
children | 1e2f2c782928 |
line wrap: on
line diff
--- a/mercurial/revset.py Wed Apr 14 20:15:09 2021 +0200 +++ b/mercurial/revset.py Wed Apr 14 20:21:11 2021 +0200 @@ -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)