hg clone error... setup help.

Mukesh Rathor mukesh.rathor at oracle.com
Tue Jul 1 19:57:38 CDT 2008


Hi,
  I've been trying to setup mercurial for our group's use for the last few 
days, now I've hit a wall.

Basically, the goal is to setup a hierarchy like:

/d1/d2/r1.hg
/d1/d2/r2.hg
/d3/d4/r9.hg

I don't want to display all the repos' on first page, but wanna navigate (so 
first display d1 and d2, then d2 or d4 etc...), hence I decided not to use 
hgwebdir.cgi, but hgweb.cgi as hgwebdir seemed to not display folders.

Next, I modified the httpd.conf and got things working fine, where I can type 
the URL, navigate, and view the repos in the browser. However, when I try to 
clone, I get:

[ca-server1]/tmp/muk> hg -v --debug clone 
http://kashmir.us.oracle.com/muk/OVM/unstable-0609/xen-unstable.hg

using http://kashmir.us.oracle.com/muk/OVM/unstable-0609/xen-unstable.hg
destination directory: xen-unstable.hg
sending heads command
real URL is http://kashmir.us.oracle.com/muk/OVM/unstable-0609/xen-unstable.hg/
requesting all changes
sending changegroup command
abort: HTTP Error 500: Internal Server Error


Looking at the http error log, I see:
[Tue Jul 01 17:49:58 2008] [error] [client 139.185.48.5] Not trusting file 
/var/www/muk/OVM/unstable-0609/xen-unstable.hg/.hg/hgrc from untrusted user 
mrathor, group mrathor
[Tue Jul 01 17:49:58 2008] [error] [client 139.185.48.5] Not trusting file 
/var/www/muk/OVM/unstable-0609/xen-unstable.hg/.hg/hgrc from untrusted user 
mrathor, group mrathor
[Tue Jul 01 17:49:58 2008] [error] [client 139.185.48.5] Not trusting file 
/var/www/muk/OVM/unstable-0609/xen-unstable.hg/.hg/hgrc from untrusted user 
mrathor, group mrathor
[Tue Jul 01 17:49:58 2008] [error] [client 139.185.48.5] Not trusting file 
/var/www/muk/OVM/unstable-0609/xen-unstable.hg/.hg/hgrc from untrusted user 
mrathor, group mrathor
[Tue Jul 01 17:49:58 2008] [error] [client 139.185.48.5] malformed header from 
script. Bad header=6 changesets found: hgweb.cgi



My httpd.conf:
Alias /muk "/var/www/muk"
<Directory "/var/www/muk">
             Options +ExecCGI Indexes MultiViews
             Order allow,deny
             Allow from all
</Directory>
<Directory ~ "^/.*/*.hg/">
             Allow from all
             DirectoryIndex /cgi-bin/hgweb.cgi
             Options +ExecCGI
             Order allow,deny
</Directory>

My hgweb.cgi looks like:
#!/usr/bin/env python

import cgitb, os, sys
cgitb.enable()
from mercurial import hgweb
MYURL='/var/www'+os.environ['REQUEST_URI']
arr=MYURL.split('?')
MYURL=arr[0]
os.chdir(MYURL)

h = hgweb.hgweb("", "")
h.run()


I got an error (hgweb is not callable) when I tried to run the newer cgi to 
test it out:
application = hgweb("/var/www/muk/OVM/unstable-0609/xen-unstable.hg", "XYZ")
wsgicgi.launch(application)


I'd appreciate any help.

Thanks,
Mukesh


More information about the Mercurial mailing list