Message6892

Author tonfa
Recipients mpm, yozh
Date 2008-09-01.14:15:36
Content
keepalive.py mimicks urllib2. urllib2 doesn't put the hostname in the exception.
A possible fix might be:

diff -r 7e5f3480c45b mercurial/httprepo.py
--- a/mercurial/httprepo.py	Fri Aug 29 16:50:11 2008 +0200
+++ b/mercurial/httprepo.py	Mon Sep 01 16:09:35 2008 +0200
@@ -303,6 +303,9 @@
             if data:
                 self.ui.debug(_("sending %s bytes\n") % len(data))
             resp = urllib2.urlopen(request(cu, data, headers))
+        except urllib2.URLError, inst:
+            raise util.Abort(_('failed to connect to %s: %s')
+                             % (self._url, inst.reason[1]))
         except urllib2.HTTPError, inst:
             if inst.code == 401:
                 raise util.Abort(_('authorization failed'))
History
Date User Action Args
2008-09-01 14:15:37tonfasetmessageid: <1220278537.57.0.619909709008.issue1100@selenic.com>
2008-09-01 14:15:37tonfasetrecipients: + mpm, yozh
2008-09-01 14:15:37tonfalinkissue1100 messages
2008-09-01 14:15:36tonfacreate