mercurial/sshpeer.py
changeset 49757 5f71fff8dc74
parent 49751 a6e2a668c746
child 49761 73ed1d13c0bf
equal deleted inserted replaced
49756:d979c76d6e54 49757:5f71fff8dc74
   610 def make_peer(ui, path, create, intents=None, createopts=None):
   610 def make_peer(ui, path, create, intents=None, createopts=None):
   611     """Create an SSH peer.
   611     """Create an SSH peer.
   612 
   612 
   613     The returned object conforms to the ``wireprotov1peer.wirepeer`` interface.
   613     The returned object conforms to the ``wireprotov1peer.wirepeer`` interface.
   614     """
   614     """
       
   615     path = path.loc
   615     u = urlutil.url(path, parsequery=False, parsefragment=False)
   616     u = urlutil.url(path, parsequery=False, parsefragment=False)
   616     if u.scheme != b'ssh' or not u.host or u.path is None:
   617     if u.scheme != b'ssh' or not u.host or u.path is None:
   617         raise error.RepoError(_(b"couldn't parse location %s") % path)
   618         raise error.RepoError(_(b"couldn't parse location %s") % path)
   618 
   619 
   619     urlutil.checksafessh(path)
   620     urlutil.checksafessh(path)