Show More
@@ -964,6 +964,9 b" coreconfigitem('ui', 'slash'," | |||
|
964 | 964 | coreconfigitem('ui', 'ssh', |
|
965 | 965 | default='ssh', |
|
966 | 966 | ) |
|
967 | coreconfigitem('ui', 'ssherrorhint', | |
|
968 | default=None, | |
|
969 | ) | |
|
967 | 970 | coreconfigitem('ui', 'statuscopies', |
|
968 | 971 | default=False, |
|
969 | 972 | ) |
@@ -2188,6 +2188,10 b' User interface controls.' | |||
|
2188 | 2188 | ``ssh`` |
|
2189 | 2189 | Command to use for SSH connections. (default: ``ssh``) |
|
2190 | 2190 | |
|
2191 | ``ssherrorhint`` | |
|
2192 | A hint shown to the user in the case of SSH error (e.g. | |
|
2193 | ``Please see http://company/internalwiki/ssh.html``) | |
|
2194 | ||
|
2191 | 2195 | ``strict`` |
|
2192 | 2196 | Require exact command names, instead of allowing unambiguous |
|
2193 | 2197 | abbreviations. (default: False) |
@@ -204,8 +204,9 b' class sshpeer(wireproto.wirepeer):' | |||
|
204 | 204 | self._pipeo = doublepipe(self.ui, self._pipeo, self._pipee) |
|
205 | 205 | |
|
206 | 206 | def badresponse(): |
|
207 |
|
|
|
208 | 'remote hg'))) | |
|
207 | msg = _("no suitable response from remote hg") | |
|
208 | hint = self.ui.config("ui", "ssherrorhint") | |
|
209 | self._abort(error.RepoError(msg, hint=hint)) | |
|
209 | 210 | |
|
210 | 211 | try: |
|
211 | 212 | # skip any noise generated by remote shell |
@@ -578,3 +578,20 b' abort during pull is properly reported a' | |||
|
578 | 578 | remote: abort: this is an exercise |
|
579 | 579 | abort: pull failed on remote |
|
580 | 580 | [255] |
|
581 | ||
|
582 | abort with no error hint when there is a ssh problem when pulling | |
|
583 | ||
|
584 | $ hg pull ssh://brokenrepository | |
|
585 | pulling from ssh://brokenrepository/ | |
|
586 | remote: ssh: Could not resolve hostname brokenrepository: Name or service not known | |
|
587 | abort: no suitable response from remote hg! | |
|
588 | [255] | |
|
589 | ||
|
590 | abort with configured error hint when there is a ssh problem when pulling | |
|
591 | ||
|
592 | $ hg pull ssh://brokenrepository --config ui.ssherrorhint="Please see http://company/internalwiki/ssh.html" | |
|
593 | pulling from ssh://brokenrepository/ | |
|
594 | remote: ssh: Could not resolve hostname brokenrepository: Name or service not known | |
|
595 | abort: no suitable response from remote hg! | |
|
596 | (Please see http://company/internalwiki/ssh.html) | |
|
597 | [255] |
General Comments 0
You need to be logged in to leave comments.
Login now