Show More
@@ -121,13 +121,6 b' class sshpeer(wireproto.wirepeer):' | |||
|
121 | 121 | self._pipeo = self._pipei = self._pipee = None |
|
122 | 122 | |
|
123 | 123 | u = util.url(path, parsequery=False, parsefragment=False) |
|
124 | if u.scheme != 'ssh' or not u.host or u.path is None: | |
|
125 | self._abort(error.RepoError(_("couldn't parse location %s") % path)) | |
|
126 | ||
|
127 | util.checksafessh(path) | |
|
128 | ||
|
129 | if u.passwd is not None: | |
|
130 | self._abort(error.RepoError(_("password in URL not supported"))) | |
|
131 | 124 | |
|
132 | 125 | self._user = u.user |
|
133 | 126 | self._host = u.host |
@@ -371,4 +364,17 b' class sshpeer(wireproto.wirepeer):' | |||
|
371 | 364 | self._readerr() |
|
372 | 365 | |
|
373 | 366 | def instance(ui, path, create): |
|
367 | """Create an SSH peer. | |
|
368 | ||
|
369 | The returned object conforms to the ``wireproto.wirepeer`` interface. | |
|
370 | """ | |
|
371 | u = util.url(path, parsequery=False, parsefragment=False) | |
|
372 | if u.scheme != 'ssh' or not u.host or u.path is None: | |
|
373 | raise error.RepoError(_("couldn't parse location %s") % path) | |
|
374 | ||
|
375 | util.checksafessh(path) | |
|
376 | ||
|
377 | if u.passwd is not None: | |
|
378 | raise error.RepoError(_('password in URL not supported')) | |
|
379 | ||
|
374 | 380 | return sshpeer(ui, path, create=create) |
General Comments 0
You need to be logged in to leave comments.
Login now