comparison mercurial/commands.py @ 46949:3800a6aafb6f

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
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 14 Apr 2021 17:29:27 +0200
parents 946db89607c8
children 279df499511e
comparison
equal deleted inserted replaced
46948:946db89607c8 46949:3800a6aafb6f
3862 revs = [] 3862 revs = []
3863 3863
3864 peer = None 3864 peer = None
3865 try: 3865 try:
3866 if source: 3866 if source:
3867 source, branches = urlutil.parseurl(ui.expandpath(source)) 3867 source, branches = urlutil.get_unique_pull_path(
3868 b'identify', repo, ui, source
3869 )
3868 # only pass ui when no repo 3870 # only pass ui when no repo
3869 peer = hg.peer(repo or ui, opts, source) 3871 peer = hg.peer(repo or ui, opts, source)
3870 repo = peer.local() 3872 repo = peer.local()
3871 revs, checkout = hg.addbranchrevs(repo, peer, branches, None) 3873 revs, checkout = hg.addbranchrevs(repo, peer, branches, None)
3872 3874