Mercurial Server not working


#1

Hi,
I had a mercurial server set up and running on dreamhost (I realise it is not officially supported by Dreamhost)

The last time i used it was about 3 weeks ago, but now I am getting a HTTP 500 error !

Any idea whats going on? I haven’t touched it or played with the configuration in a long time. Seems like something in dreamhost changed underneath me

I have svn server running on dreamhost as well and that seems to be running fine.

Any help would be greatly appreciated.


#2

I enabled traceback in my hgwebdir.cgi file and this is what I got

Traceback (most recent call last):
File “hgwebdir.cgi”, line 66, in
application = hgwebdir(‘hgweb.config’)
File “/home//lib/python/mercurial/hgweb/hgwebdir_mod.py”, line 26, in init
interactive = False)
File “/home//lib/python/mercurial/ui.py”, line 50, in init
self.readconfig(util.rcpath())
File “/home//lib/python/mercurial/util.py”, line 1959, in rcpath
_rcpath = os_rcpath()
File “/home//lib/python/mercurial/util.py”, line 1935, in os_rcpath
path = system_rcpath()
File “/home//lib/python/mercurial/util.py”, line 1327, in system_rcpath
’/…/etc/mercurial’))
File “/home//lib/python/mercurial/util.py”, line 1316, in rcfiles
for f, kind in osutil.listdir(rcdir)
File “/home//lib/python/mercurial/demandimport.py”, line 74, in getattribute
self._load()
File “/home//lib/python/mercurial/demandimport.py”, line 46, in _load
mod = _origimport(head, globals, locals)
ImportError: /home//lib/python/mercurial/osutil.so: undefined symbol: Py_InitModule4

seems like this osutil.so file is missing perhaps.

Help? Anyone? Surely I am not the only one running a mercurial server on dreamhost? I am pretty sure its a versioning problem with python, but I am can’t figure out how to fix it


#3

Looks like you installed mercurial manually under Python 2.4, and the server is now running Python 2.5 (which isn’t compatible with Python 2.4 compiled modules on 64-bit systems). Mercurial should be installed system-wide now, so you can probably just remove your install and use the system version. If that doesn’t work, though, you’ll need to rebuild Mercurial using whatever steps you used the first time around.


#4

Thanks andrew. I did install it manually using the instructions found here http://www.iterasi.net/openviewer.aspx?sqrlitid=h8keqww_h0qd0bam2cuifq

Any idea/links how i can upgrade to the system wide install without losing my repository?


#5

Ok, basically a reinstallation/upgrade of mercurial fixes the problem. I did the first few steps shown here http://wiki.dreamhost.com/Mercurial

basically had to download the latest mercurial (1.5), ftp’ed it into my directory. Exctracted and did a make-install. Hey presto everything works and my repositories are all still there.


#6

Andrew, can you please elaborate on how we can use the installed version?


#7

Simply delete any version you’ve installed yourself, and “hg” will refer to the system version instead.