1

I'm having kind of a strange error that I'm trying to track down. I was trying to setup mercurial on my home server this weekend. I seem to have it running up to the point where I'm trying to get repositories published correctly.

I'm running Ubuntu 10.04 LTS with Mercurial version 1.4.3.

I followed the hgwebdir guide and everything seems to work great, I can pull and push my local repositories. Then I tried to add basic auth changing

ScriptAliasMatch     ^/hg(.*)      /var/hg/hgwebdir.cgi$1
<Directory "/var/hg">
    Options ExecCGI FollowSymLinks
    AllowOverride None
</Directory>

to

ScriptAliasMatch     ^/hg(.*)      /var/hg/hgwebdir.cgi$1
<Directory "/var/hg">
    Options ExecCGI FollowSymLinks
    AllowOverride None
    AuthType Basic
    AuthName hgwebdir
    AuthUserFile /usr/local/etc/httpd/users
    Require valid-user
</Directory>

This works exactly as I'd expect it to when I navigate to the directory via my web browser, but when I hg push get a long section repeating of

File "/usr/lib/python2.6/urllib2.py", line 369, in _call_chain
  result = func(*args)
File "/usr/lib/python2.6/urllib2.py", line 855, in http_error_401
  url, req, headers)
File "/usr/lib/python2.6/urllib2.py", line 833, in http_error_auth_reqed
  return self.retry_http_basic_auth(host, req, realm)
File "/usr/lib/python2.6/urllib2.py", line 843, in retry_http_basic_auth
  return self.parent.open(req, timeout=req.timeout)

followed by

File "/usr/lib/pymodules/python2.6/mercurial/keepalive.py", line 249, in do_open
  self._start_transaction(h, req)
File "/usr/lib/pymodules/python2.6/mercurial/url.py", line 419, in _start_transaction
  return keepalive.HTTPHandler._start_transaction(self, h, req)
File "/usr/lib/pymodules/python2.6/mercurial/keepalive.py", line 342, in _start_transaction
  h.endheaders()
File "/usr/lib/python2.6/httplib.py", line 904, in endheaders
  self._send_output()
File "/usr/lib/python2.6/httplib.py", line 776, in _send_output
  self.send(msg)
File "/usr/lib/pymodules/python2.6/mercurial/url.py", line 247, in _sendfile
  connection.send(self, data)
File "/usr/lib/pymodules/python2.6/mercurial/keepalive.py", line 519, in safesend
  self.connect()
File "/usr/lib/pymodules/python2.6/mercurial/url.py", line 273, in connect
  keepalive.HTTPConnection.connect(self)
RuntimeError: maximum recursion depth exceeded while calling a Python object

I'm a bit at a loss on this one. I'm really not sure why adding the authorization seems to work fine via my web browser but throw these errors from hg. Any help would be greatly appreciated.

1 Answer 1

1

got a response from the great folks on the Mercurial IRC channel. This was addressed in Issue2255. I made their changes and it works like a charm.

1
  • Please accept this answer so that your question doesn't show up on the "unanswered questions" list. Dec 23, 2011 at 10:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .