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')) |