[Python-apps-team] Bug#613403: reopened: hg clone fails with https site behind an http proxy

Jan Braun janbraun at gmx.net
Wed Jun 18 18:44:46 UTC 2014


Package: mercurial
Version: 3.0-1
Followup-For: Bug #613403

Hi,
I have the same issue:

| $ hg clone http://bitbucket.org/mstrobel/procyon
| ** unknown exception encountered, please report by visiting
| ** http://mercurial.selenic.com/wiki/BugTracker
| ** Python 2.7.7 (default, Jun  3 2014, 16:16:56) [GCC 4.8.3]
| ** Mercurial Distributed SCM (version 3.0)
| ** Extensions loaded:
| Traceback (most recent call last):
|   File "/usr/bin/hg", line 38, in <module>
|     mercurial.dispatch.run()
|   File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 28, in run
|     sys.exit((dispatch(request(sys.argv[1:])) or 0) & 255)
|   File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 69, in dispatch
|     ret = _runcatch(req)
|   File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 138, in _runcatch
|     return _dispatch(req)
|   File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 810, in _dispatch
|     cmdpats, cmdoptions)
|   File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 590, in runcommand
|     ret = _runcommand(ui, options, cmd, d)
|   File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 901, in _runcommand
|     return checkargs()
|   File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 872, in checkargs
|     return cmdfunc()
|   File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 807, in <lambda>
|     d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
|   File "/usr/lib/python2.7/dist-packages/mercurial/util.py", line 518, in check
|     return func(*args, **kwargs)
|   File "/usr/lib/python2.7/dist-packages/mercurial/commands.py", line 1298, in clone
|     branch=opts.get('branch'))
|   File "/usr/lib/python2.7/dist-packages/mercurial/hg.py", line 295, in clone
|     srcpeer = peer(ui, peeropts, source)
|   File "/usr/lib/python2.7/dist-packages/mercurial/hg.py", line 129, in peer
|     return _peerorrepo(rui, path, create).peer()
|   File "/usr/lib/python2.7/dist-packages/mercurial/hg.py", line 106, in _peerorrepo
|     obj = _peerlookup(path).instance(ui, path, create)
|   File "/usr/lib/python2.7/dist-packages/mercurial/httppeer.py", line 261, in instance
|     inst._fetchcaps()
|   File "/usr/lib/python2.7/dist-packages/mercurial/httppeer.py", line 58, in _fetchcaps
|     self.caps = set(self._call('capabilities').split())
|   File "/usr/lib/python2.7/dist-packages/mercurial/httppeer.py", line 172, in _call
|     fp = self._callstream(cmd, **args)
|   File "/usr/lib/python2.7/dist-packages/mercurial/httppeer.py", line 119, in _callstream
|     resp = self.urlopener.open(req)
|   File "/usr/lib/python2.7/urllib2.py", line 410, in open
|     response = meth(req, response)
|   File "/usr/lib/python2.7/urllib2.py", line 523, in http_response
|     'http', request, response, code, msg, hdrs)
|   File "/usr/lib/python2.7/urllib2.py", line 442, in error
|     result = self._call_chain(*args)
|   File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
|     result = func(*args)
|   File "/usr/lib/python2.7/urllib2.py", line 629, in http_error_302
|     return self.parent.open(new, timeout=req.timeout)
|   File "/usr/lib/python2.7/urllib2.py", line 404, in open
|     response = self._open(req, data)
|   File "/usr/lib/python2.7/urllib2.py", line 422, in _open
|     '_open', req)
|   File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
|     result = func(*args)
|   File "/usr/lib/python2.7/dist-packages/mercurial/url.py", line 372, in https_open
|     return self.do_open(self._makeconnection, req)
|   File "/usr/lib/python2.7/dist-packages/mercurial/keepalive.py", line 254, in do_open
|     self._start_transaction(h, req)
|   File "/usr/lib/python2.7/dist-packages/mercurial/url.py", line 358, in _start_transaction
|     return keepalive.KeepAliveHandler._start_transaction(self, h, req)
|   File "/usr/lib/python2.7/dist-packages/mercurial/keepalive.py", line 352, in _start_transaction
|     h.endheaders()
|   File "/usr/lib/python2.7/httplib.py", line 991, in endheaders
|     self._send_output(message_body)
|   File "/usr/lib/python2.7/httplib.py", line 844, in _send_output
|     self.send(msg)
|   File "/usr/lib/python2.7/dist-packages/mercurial/url.py", line 144, in _sendfile
|     orgsend(self, data)
|   File "/usr/lib/python2.7/dist-packages/mercurial/keepalive.py", line 532, in safesend
|     self.connect()
|   File "/usr/lib/python2.7/dist-packages/mercurial/url.py", line 342, in connect
|     _generic_proxytunnel(self)
|   File "/usr/lib/python2.7/dist-packages/mercurial/url.py", line 228, in _generic_proxytunnel
|     self._set_hostport(self.host, self.port)
| AttributeError: httpsconnection instance has no attribute '_set_hostport'
| $ env -u http_proxy  hg clone http://bitbucket.org/mstrobel/procyon
| real URL is https://bitbucket.org/mstrobel/procyon
| destination directory: procyon
| requesting all changes
| ^Cinterrupted!
| $ echo $http_proxy
| http://[::1]:8123/
| $


My local proxy is polipo,
| $ sudo apt-get install polipo
| $ http_proxy='http://127.0.0.1:8123/'
| $ hg clone http://bitbucket.org/mstrobel/procyon
was enough to reproduce on a different machine also running testing.


regards,
    Jan

-- System Information:
Debian Release: jessie/sid
  APT prefers testing
  APT policy: (800, 'testing'), (550, 'unstable'), (10, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.14-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=C.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages mercurial depends on:
ii  libc6             2.18-7
ii  mercurial-common  3.0-1
ii  python            2.7.6-2
ii  ucf               3.0030

Versions of packages mercurial recommends:
ii  openssh-client  1:6.6p1-5

Versions of packages mercurial suggests:
pn  kdiff3 | kdiff3-qt | kompare | meld | tkcvs | mgdiff  <none>
pn  qct                                                   <none>

-- no debconf information
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/python-apps-team/attachments/20140618/dbf9638d/attachment.sig>


More information about the Python-apps-team mailing list