mercurial/httppeer.py
changeset 30484 ef9f197188ec
parent 30474 40a1871eea5e
child 30493 d1b97fc87f55
equal deleted inserted replaced
30483:b02e210a6817 30484:ef9f197188ec
   167             raise
   167             raise
   168         except httplib.HTTPException as inst:
   168         except httplib.HTTPException as inst:
   169             self.ui.debug('http error while sending %s command\n' % cmd)
   169             self.ui.debug('http error while sending %s command\n' % cmd)
   170             self.ui.traceback()
   170             self.ui.traceback()
   171             raise IOError(None, inst)
   171             raise IOError(None, inst)
   172         except IndexError:
       
   173             # this only happens with Python 2.3, later versions raise URLError
       
   174             raise error.Abort(_('http error, possibly caused by proxy setting'))
       
   175         # record the url we got redirected to
   172         # record the url we got redirected to
   176         resp_url = resp.geturl()
   173         resp_url = resp.geturl()
   177         if resp_url.endswith(qs):
   174         if resp_url.endswith(qs):
   178             resp_url = resp_url[:-len(qs)]
   175             resp_url = resp_url[:-len(qs)]
   179         if self._url.rstrip('/') != resp_url.rstrip('/'):
   176         if self._url.rstrip('/') != resp_url.rstrip('/'):