changeset 49725: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 f3b685d9e899
children 4303fa8f4232
files mercurial/revset.py
diffstat 1 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revset.py	Fri Dec 02 05:10:05 2022 +0100
+++ b/mercurial/revset.py	Fri Dec 02 05:11:53 2022 +0100
@@ -2130,11 +2130,9 @@
         dest = getstring(l[1], _(b"remote requires a repository path"))
     if not dest:
         dest = b'default'
-    dest, branches = urlutil.get_unique_pull_path(
-        b'remote', repo, repo.ui, dest
-    )
-
-    other = hg.peer(repo, {}, dest)
+    path = urlutil.get_unique_pull_path_obj(b'remote', repo.ui, dest)
+
+    other = hg.peer(repo, {}, path)
     n = other.lookup(q)
     if n in repo:
         r = repo[n].rev()