comparison mercurial/commands.py @ 49835:970491e630a5

path: pass `path` to `peer` in `hg identify` We directly use the `path` object to build the `peer` object.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 02 Dec 2022 04:31:08 +0100
parents 06083c5f9e29
children f3b685d9e899
comparison
equal deleted inserted replaced
49834:f4626b74b941 49835:970491e630a5
3909 revs = [] 3909 revs = []
3910 3910
3911 peer = None 3911 peer = None
3912 try: 3912 try:
3913 if source: 3913 if source:
3914 source, branches = urlutil.get_unique_pull_path( 3914 path = urlutil.get_unique_pull_path_obj(b'identify', ui, source)
3915 b'identify', repo, ui, source
3916 )
3917 # only pass ui when no repo 3915 # only pass ui when no repo
3918 peer = hg.peer(repo or ui, opts, source) 3916 peer = hg.peer(repo or ui, opts, path)
3919 repo = peer.local() 3917 repo = peer.local()
3918 branches = (path.branch, [])
3920 revs, checkout = hg.addbranchrevs(repo, peer, branches, None) 3919 revs, checkout = hg.addbranchrevs(repo, peer, branches, None)
3921 3920
3922 fm = ui.formatter(b'identify', opts) 3921 fm = ui.formatter(b'identify', opts)
3923 fm.startitem() 3922 fm.startitem()
3924 3923