path: pass `path` to `peer` in `hg debugdiscovery`
authorPierre-Yves David <pierre-yves.david@octobus.net>
Fri, 02 Dec 2022 06:21:08 +0100
changeset 49726 4303fa8f4232
parent 49725 f632b9e1e047
child 49727 aae6b10d93f2
path: pass `path` to `peer` in `hg debugdiscovery` We directly use the `path` object to build the `peer` object.
mercurial/debugcommands.py
--- a/mercurial/debugcommands.py	Fri Dec 02 05:11:53 2022 +0100
+++ b/mercurial/debugcommands.py	Fri Dec 02 06:21:08 2022 +0100
@@ -1234,12 +1234,12 @@
     random.seed(int(opts[b'seed']))
 
     if not remote_revs:
-
-        remoteurl, branches = urlutil.get_unique_pull_path(
-            b'debugdiscovery', repo, ui, remoteurl
+        path = urlutil.get_unique_pull_path_obj(
+            b'debugdiscovery', ui, remoteurl
         )
-        remote = hg.peer(repo, opts, remoteurl)
-        ui.status(_(b'comparing with %s\n') % urlutil.hidepassword(remoteurl))
+        branches = (path.branch, [])
+        remote = hg.peer(repo, opts, path)
+        ui.status(_(b'comparing with %s\n') % urlutil.hidepassword(path.loc))
     else:
         branches = (None, [])
         remote_filtered_revs = logcmdutil.revrange(