Conclusion and Issues

Sam Hart

2007-05-24 15:30:33

When it's all said and done, you should have a working Hg repository server and should be able to pull/push from/to it.

However, there were some small issues that I ran into that I should note simply because they seemed to be a bit tricky.


abort: consistency error adding group!


The first problem I ran into was when I tried to get a friend of mine online to try out the new repository for our IRC bots code. When he tried to clone the repo, he got the following error:


[17:02] < schultmc> | $ hg clone http://dev.samhart.net/bots/
[17:02] < schultmc> | destination directory: bots
[17:02] < schultmc> | requesting all changes
[17:02] < schultmc> | adding changesets
[17:02] < schultmc> | adding manifests
[17:02] < schultmc> | adding file changes
[17:02] < schultmc> | abort: consistency error adding group!
[17:02] < schultmc> | transaction abort!
[17:02] < schultmc> | rollback completed


Additionally, when I tried to clone it, I would either get the same error he did, or get the following:

$ hg -v clone http://dev.samhart.net/bots
destination directory: bots
requesting all changes
adding changesets
adding manifests
adding file changes
abort: premature EOF reading chunk (got 6822 bytes, expected 34384)
transaction abort!
rollback completed


The strange thing was, other repos worked fine, and a "hg verify" on the server revealed them all to be in working order.

As it turns out, both of these problems have the same root cause: errors on the server. In my case the system was running out of resources, so adding a bit more swap solved the problem. However, it could also be things like permission problems or other misc. Apache errors.

At any rate, if you get errors that look like the above, chances are they are server errors and you should look very closely at what's going on during each attempted transaction.


Stacktrace on push with wrong username/password


This is just an ugly stacktrace, but doesn't seem to cause any problems. If you try to push and use the wrong username/password, you will get a stacktrace that looks a lot like the following:

** unknown exception encountered, details follow
** report bug details to http://www.selenic.com/mercurial/bts
** or mercurial@selenic.com
** Mercurial Distributed SCM (version 0.9.3)
Traceback (most recent call last):
File "/usr/bin/hg", line 12, in ?
commands.run()
File "/var/lib/python-support/python2.4/mercurial/commands.py", line 3000, in run
sys.exit(dispatch(sys.argv[1:]))
File "/var/lib/python-support/python2.4/mercurial/commands.py", line 3223, in dispatch
return d()
File "/var/lib/python-support/python2.4/mercurial/commands.py", line 3182, in
d = lambda: func(u, repo, *args, **cmdoptions)
File "/var/lib/python-support/python2.4/mercurial/commands.py", line 1971, in push
r = repo.push(other, opts['force'], revs=revs)
File "/var/lib/python-support/python2.4/hgext/mq.py", line 2025, in push
return super(mqrepo, self).push(remote, force, revs)
File "/var/lib/python-support/python2.4/mercurial/localrepo.py", line 1360, in push
return self.push_unbundle(remote, force, revs)
File "/var/lib/python-support/python2.4/mercurial/localrepo.py", line 1438, in push_unbundle
return remote.unbundle(cg, remote_heads, 'push')
File "/var/lib/python-support/python2.4/mercurial/httprepo.py", line 352, in unbundle
heads=' '.join(map(hex, heads)))
File "/var/lib/python-support/python2.4/mercurial/httprepo.py", line 235, in do_cmd
resp = urllib2.urlopen(urllib2.Request(cu, data, headers))
File "/usr/lib/python2.4/urllib2.py", line 130, in urlopen
return _opener.open(url, data)
File "/usr/lib/python2.4/urllib2.py", line 364, in open
response = meth(req, response)
File "/usr/lib/python2.4/urllib2.py", line 471, in http_response
response = self.parent.error(
File "/usr/lib/python2.4/urllib2.py", line 396, in error
result = self._call_chain(*args)
File "/usr/lib/python2.4/urllib2.py", line 337, in _call_chain
result = func(*args)
File "/usr/lib/python2.4/urllib2.py", line 741, in http_error_401
host, req, headers)
File "/usr/lib/python2.4/urllib2.py", line 720, in http_error_auth_reqed
return self.retry_http_basic_auth(host, req, realm)
File "/usr/lib/python2.4/urllib2.py", line 730, in retry_http_basic_auth
return self.parent.open(req)
File "/usr/lib/python2.4/urllib2.py", line 364, in open
response = meth(req, response)
File "/usr/lib/python2.4/urllib2.py", line 471, in http_response
response = self.parent.error(
File "/usr/lib/python2.4/urllib2.py", line 396, in error
result = self._call_chain(*args)
File "/usr/lib/python2.4/urllib2.py", line 337, in _call_chain
result = func(*args)
File "/usr/lib/python2.4/urllib2.py", line 916, in http_error_401
host, req, headers)
File "/usr/lib/python2.4/urllib2.py", line 807, in http_error_auth_reqed
raise ValueError("AbstractDigestAuthHandler doesn't know "
ValueError: AbstractDigestAuthHandler doesn't know about Basic


I've been searching the various bug databases involved (Debian's and Mercurial's) but haven't found this particular problem yet. Will likely be filing a bug in a bit.