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 have a VPS with Centos 5.5, installed Python 2.6 following Setup Python 2.5, mod_wsgi, and Django 1.0 on CentOS 5 (cPanel) tutorial and Mercurial 1.6 via easy-install.

Now I wanted to update to Mercurial 1.7.5, so I easy-installed it and it seemed to work. At least when used from terminal.

I have been using hgwebdir to push/pull my reposisotires via HTTP. However, when I try to view a repository created with new hg (1.7.5), I get the 500 error page. A look in Apache error_log reads something about dotencode support

 RepoError: requirement 'dotencode' not supported,

Google says it's a problem when old hg tries to read a repository made with a new hg.

How can I find out which hg is used by Apache/mod_wsgi? And how to update it?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

Just to clarify, it sounds like you WERE using mod_wsgi compiled against Python 2.5 (which has an old version of hg). You are now trying to run mod_wsgi with Python 2.6 (which has hg 1.7.5).

Assuming you followed the instructions in the article you linked, you'll notice that you compiled mod_wsgi against the sources in Python 2.5. mod_wsgi doesn't launch a Python interpreter; instead, it calls into the Python sources directly. So if you want mod_wsgi to work with Python 2.6, you'll have to recompile it with the Python 2.6 sources.

You can follow the same steps as the article, only using Python 2.6's sources instead of Python 2.5. I've compiled mod_wsgi against Python 2.6 before, and the article looks like its spot on.

Hope this helps, and definitely leave comments if you encounter any issues.

share|improve this answer

To me, it sounds like one of two things:

  • you need to restart the webserver after installing the new version of Mercurial. When you use mod_wsgi, Apache will keep a copy of the script running in memory so that it can quickly serve new requests. So there might be a Mercurial 1.6 running in memory still. Restarting Apache should help.

  • you've installed multiple versions of Mercurial on the machine. Try searching for commands.py and see if you find more than one version. Then remove the old version and re-install it as Redmumba suggests.

share|improve this answer

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.