Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

/var/www/hg/hgweb.config

[collections]
/ = /home/danish/repos/hg/

[web]
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/__init__.py", line 12, in hgweb
    return hgweb_mod.hgweb(*args, **kwargs)
  File "/usr/lib/pymodules/python2.6/mercurial/hgweb/hgweb_mod.py", line 30, in __init__
    self.repo = hg.repository(u, repo)
  File "/usr/lib/pymodules/python2.6/mercurial/hg.py", line 63, in repository
    repo = _lookup(path).instance(ui, path, create)
  File "/usr/lib/pymodules/python2.6/mercurial/bundlerepo.py", line 303, in instance
    return bundlerepository(ui, repopath, bundlename)
  File "/usr/lib/pymodules/python2.6/mercurial/bundlerepo.py", 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
add comment

1 Answer 1

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
add comment

Your Answer

 
discard

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.