comparison mercurial/revset.py @ 49837:f632b9e1e047

path: pass `path` to `peer` in `remote(...)` revset We directly use the `path` object to build the `peer` object.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 02 Dec 2022 05:11:53 +0100
parents e2a31b0bc5d0
children 1bd33932713d
comparison
equal deleted inserted replaced
49836:f3b685d9e899 49837:f632b9e1e047
2128 if len(l) > 1: 2128 if len(l) > 1:
2129 # i18n: "remote" is a keyword 2129 # i18n: "remote" is a keyword
2130 dest = getstring(l[1], _(b"remote requires a repository path")) 2130 dest = getstring(l[1], _(b"remote requires a repository path"))
2131 if not dest: 2131 if not dest:
2132 dest = b'default' 2132 dest = b'default'
2133 dest, branches = urlutil.get_unique_pull_path( 2133 path = urlutil.get_unique_pull_path_obj(b'remote', repo.ui, dest)
2134 b'remote', repo, repo.ui, dest 2134
2135 ) 2135 other = hg.peer(repo, {}, path)
2136
2137 other = hg.peer(repo, {}, dest)
2138 n = other.lookup(q) 2136 n = other.lookup(q)
2139 if n in repo: 2137 if n in repo:
2140 r = repo[n].rev() 2138 r = repo[n].rev()
2141 if r in subset: 2139 if r in subset:
2142 return baseset([r]) 2140 return baseset([r])