path: pass `path` to `peer` in `hg identify`
We directly use the `path` object to build the `peer` object.
--- a/mercurial/commands.py Fri Dec 02 03:50:28 2022 +0100
+++ b/mercurial/commands.py Fri Dec 02 04:31:08 2022 +0100
@@ -3911,12 +3911,11 @@
peer = None
try:
if source:
- source, branches = urlutil.get_unique_pull_path(
- b'identify', repo, ui, source
- )
+ path = urlutil.get_unique_pull_path_obj(b'identify', ui, source)
# only pass ui when no repo
- peer = hg.peer(repo or ui, opts, source)
+ peer = hg.peer(repo or ui, opts, path)
repo = peer.local()
+ branches = (path.branch, [])
revs, checkout = hg.addbranchrevs(repo, peer, branches, None)
fm = ui.formatter(b'identify', opts)