Mercurial > hg > mercurial-crew-with-dirclash
comparison mercurial/httprepo.py @ 2336:f77edcffb837
http: print better error if exception happens.
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Mon, 22 May 2006 09:00:24 -0700 |
parents | ce67fa312f61 |
children | 3f24bc5dee81 |
comparison
equal
deleted
inserted
replaced
2335:f0680b2d1d64 | 2336:f77edcffb837 |
---|---|
104 qs = urllib.urlencode(q) | 104 qs = urllib.urlencode(q) |
105 cu = "%s?%s" % (self.url, qs) | 105 cu = "%s?%s" % (self.url, qs) |
106 try: | 106 try: |
107 resp = urllib2.urlopen(cu) | 107 resp = urllib2.urlopen(cu) |
108 except httplib.HTTPException, inst: | 108 except httplib.HTTPException, inst: |
109 raise IOError(None, _('http error while sending %s command') % cmd) | 109 self.ui.debug(_('http error while sending %s command\n') % cmd) |
110 self.ui.print_exc() | |
111 raise IOError(None, inst) | |
110 proto = resp.headers['content-type'] | 112 proto = resp.headers['content-type'] |
111 | 113 |
112 # accept old "text/plain" and "application/hg-changegroup" for now | 114 # accept old "text/plain" and "application/hg-changegroup" for now |
113 if not proto.startswith('application/mercurial') and \ | 115 if not proto.startswith('application/mercurial') and \ |
114 not proto.startswith('text/plain') and \ | 116 not proto.startswith('text/plain') and \ |