From patchwork Wed Apr 14 23:40:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D10415: identify: use `get_unique_pull_path` From: phabricator X-Patchwork-Id: 48732 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Wed, 14 Apr 2021 23:40:15 +0000 marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The command only support a single destination. We use the associated API. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10415 AFFECTED FILES mercurial/commands.py CHANGE DETAILS To: marmoute, #hg-reviewers Cc: mercurial-patches, mercurial-devel diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -3863,7 +3863,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()