##// END OF EJS Templates
sshpeer: add a configurable hint for the ssh error message...
Zuzanna Mroczek -
r35107:8b1c887d default
parent child Browse files
Show More
@@ -964,6 +964,9 b" coreconfigitem('ui', 'slash',"
964 coreconfigitem('ui', 'ssh',
964 coreconfigitem('ui', 'ssh',
965 default='ssh',
965 default='ssh',
966 )
966 )
967 coreconfigitem('ui', 'ssherrorhint',
968 default=None,
969 )
967 coreconfigitem('ui', 'statuscopies',
970 coreconfigitem('ui', 'statuscopies',
968 default=False,
971 default=False,
969 )
972 )
@@ -2188,6 +2188,10 b' User interface controls.'
2188 ``ssh``
2188 ``ssh``
2189 Command to use for SSH connections. (default: ``ssh``)
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 ``strict``
2195 ``strict``
2192 Require exact command names, instead of allowing unambiguous
2196 Require exact command names, instead of allowing unambiguous
2193 abbreviations. (default: False)
2197 abbreviations. (default: False)
@@ -204,8 +204,9 b' class sshpeer(wireproto.wirepeer):'
204 self._pipeo = doublepipe(self.ui, self._pipeo, self._pipee)
204 self._pipeo = doublepipe(self.ui, self._pipeo, self._pipee)
205
205
206 def badresponse():
206 def badresponse():
207 self._abort(error.RepoError(_('no suitable response from '
207 msg = _("no suitable response from remote hg")
208 'remote hg')))
208 hint = self.ui.config("ui", "ssherrorhint")
209 self._abort(error.RepoError(msg, hint=hint))
209
210
210 try:
211 try:
211 # skip any noise generated by remote shell
212 # skip any noise generated by remote shell
@@ -578,3 +578,20 b' abort during pull is properly reported a'
578 remote: abort: this is an exercise
578 remote: abort: this is an exercise
579 abort: pull failed on remote
579 abort: pull failed on remote
580 [255]
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