«Unknown exception encountered»

Tony Mechelynck antoine.mechelynck at gmail.com
Sun Apr 7 16:03:24 UTC 2013


On 05/04/13 19:15, Matt Mackall wrote:
> On Fri, 2013-04-05 at 17:35 +0200, Tony Mechelynck wrote:
>> On 05/04/13 15:20, Adrian Klaver wrote:
>> [...]
>>> 2) The error looks below looks to me like a network error, somewhat
>>> confirmed by success on retry.
>> [...]
>>
>> In that case, I suppose there isn't much to do on Mercurial's side,
>> unless this kind of error can be identified in order to give the user a
>> meaningful message and a choice between "retry" and "abort" rather than
>> an uncaught exception with an awful lot of messages that look like a
>> mixture of Hebrew and Chinese to any nontechnical user.
>
> Who are these nontechnical users who are downloading the source for
> Vim?

On Linux, the recommended way to keep Vim up-to-date (if you don't want 
to wait for the goodwill of your distro, which will always be late, 
sometime very late depending on the distro) is to compile it yourself 
after getting the source from Bram Moolenaar's Mercurial server: see
	http://vim.wikia.com/wiki/Getting_the_Vim_source_with_Mercurial
	http://users.skynet.be/antoine.mechelynck/vim/compunix.htm

You don't need to be a C and Python wizard to follow these instructions, 
which amount to not much more than repeatedly running "hg fetch", "make" 
and "make install". At least, as long as nothing goes wrong you don't. 
And I'd add that even though I'm the author of these two how-to pages, 
the long error message which I pasted into the original post on this 
thread looked totally like gibberish to me: the only think I could make 
out was that something had gone wrong. (Something, BTW, which hasn't 
-yet- happened again, nor had I seen it before.)

>
> This seems to be another instance of
>
> http://bugs.python.org/issue13721
>
> ..with slightly different timing. Perhaps this will fix it:
>
>
> diff -r f63035b9b38a mercurial/sslutil.py
> --- a/mercurial/sslutil.py	Thu Apr 04 16:37:37 2013 -0500
> +++ b/mercurial/sslutil.py	Fri Apr 05 12:14:16 2013 -0500
> @@ -111,9 +111,15 @@
>                   self.ui.warn(_("warning: certificate for %s can't be verified "
>                                  "(Python too old)\n") % host)
>               return
> +
>           if not sock.cipher(): # work around http://bugs.python.org/issue13721
>               raise util.Abort(_('%s ssl connection error') % host)
> -        peercert = sock.getpeercert(True)
> +        try:
> +            peercert = sock.getpeercert(True)
> +            peercert2 = sock.getpeercert()
> +        except AttributeError:
> +            raise util.Abort(_('%s ssl connection error') % host)
> +
>           if not peercert:
>               raise util.Abort(_('%s certificate error: '
>                                  'no certificate received') % host)
> @@ -129,7 +135,7 @@
>               self.ui.debug('%s certificate matched fingerprint %s\n' %
>                             (host, nicefingerprint))
>           elif cacerts:
> -            msg = _verifycert(sock.getpeercert(), host)
> +            msg = _verifycert(peercert2, host)
>               if msg:
>                   raise util.Abort(_('%s certificate error: %s') % (host, msg),
>                                    hint=_('configure hostfingerprint %s or use '
>
>

Looks like something like a network timeout. Thanks for looking into it.


Best regards,
Tony.
-- 
TERRY GILLIAM PLAYED: PATSY (ARTHUR'S TRUSTY STEED), THE GREEN KNIGHT
                       SOOTHSAYER, BRIDGEKEEPER, SIR GAWAIN (THE FIRST TO BE
                       KILLED BY THE RABBIT)
                  "Monty Python and the Holy Grail" PYTHON (MONTY) 
PICTURES LTD




More information about the Mercurial mailing list