Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am having trouble having my hgweb.cgi script successfully read my hgweb.config file. It fails with the error Abort: /var/www/hg/hgweb.config: not a Mercurial bundle file. Details below


/ = /home/danish/repos/hg/

baseurl = /hg
style = git-web

Error Details

Traceback (most recent call last):
  File "hgweb.cgi", line 17, in <module>
    application = hgweb(config)
  File "/usr/lib/pymodules/python2.6/mercurial/hgweb/", line 12, in hgweb
    return hgweb_mod.hgweb(*args, **kwargs)
  File "/usr/lib/pymodules/python2.6/mercurial/hgweb/", line 30, in __init__
    self.repo = hg.repository(u, repo)
  File "/usr/lib/pymodules/python2.6/mercurial/", line 63, in repository
    repo = _lookup(path).instance(ui, path, create)
  File "/usr/lib/pymodules/python2.6/mercurial/", line 303, in instance
    return bundlerepository(ui, repopath, bundlename)
  File "/usr/lib/pymodules/python2.6/mercurial/", line 175, in __init__
    raise util.Abort(_("%s: not a Mercurial bundle file") % bundlename)
Abort: /var/www/hg/hgweb.config: not a Mercurial bundle file
share|improve this question
up vote 2 down vote accepted

As it turns out. I was using an old version of Mercurial with the latest merged hgweb.cgi script. The standard install of Mercurial on my Ubuntu 10.04 comes with a version that like 4 releases behind.

Once I upgraded my Mercurial, it started working.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.