path: pass `path` to `peer` in `hg debugdiscovery`
We directly use the `path` object to build the `peer` object.
--- 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(