comparison mercurial/logexchange.py @ 49760:5bceea1a8234

logexchange: use the proper accessors to get the remote url There is an official method, let us use it. this will prevent a crash when the private attribute disappear.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sat, 03 Dec 2022 06:16:45 +0100
parents f254fc73d956
children f4733654f144
comparison
equal deleted inserted replaced
49759:cfe8d88a453e 49760:5bceea1a8234
111 # use the string given to us 111 # use the string given to us
112 rpath = remote 112 rpath = remote
113 if local: 113 if local:
114 rpath = util.pconvert(remote._repo.root) 114 rpath = util.pconvert(remote._repo.root)
115 elif not isinstance(remote, bytes): 115 elif not isinstance(remote, bytes):
116 rpath = remote._url 116 rpath = remote.url()
117 117
118 # represent the remotepath with user defined path name if exists 118 # represent the remotepath with user defined path name if exists
119 for path, url in repo.ui.configitems(b'paths'): 119 for path, url in repo.ui.configitems(b'paths'):
120 # remove auth info from user defined url 120 # remove auth info from user defined url
121 noauthurl = urlutil.removeauth(url) 121 noauthurl = urlutil.removeauth(url)