diff --git a/mercurial/sshpeer.py b/mercurial/sshpeer.py --- a/mercurial/sshpeer.py +++ b/mercurial/sshpeer.py @@ -640,7 +640,7 @@ def make_peer( """ u = urlutil.url(path.loc, parsequery=False, parsefragment=False) if u.scheme != b'ssh' or not u.host or u.path is None: - raise error.RepoError(_(b"couldn't parse location %s") % path) + raise error.RepoError(_(b"couldn't parse location %s") % path.loc) urlutil.checksafessh(path.loc)