identify: use `get_unique_pull_path`
The command only support a single destination. We use the associated API.
Differential Revision: https://phab.mercurial-scm.org/D10415
--- a/mercurial/commands.py Wed Apr 14 17:02:20 2021 +0200
+++ b/mercurial/commands.py Wed Apr 14 17:29:27 2021 +0200
@@ -3864,7 +3864,9 @@
peer = None
try:
if source:
- source, branches = urlutil.parseurl(ui.expandpath(source))
+ source, branches = urlutil.get_unique_pull_path(
+ b'identify', repo, ui, source
+ )
# only pass ui when no repo
peer = hg.peer(repo or ui, opts, source)
repo = peer.local()