hg clone error... setup help.

Mukesh Rathor mukesh.rathor at oracle.com
Thu Jul 3 16:57:56 CDT 2008


Hi Brendan,

 > Hi Mukesh, fancy seeing you here.
Yeah, I'm trying to setup hg for our small group here. BTW, missed you at the 
summit.

 > It might interest you to know that hgwebdir will let you provide a
 > partial path, showing only repositories under that path. So if your
 > hgwebdir root is http://host/hg, then http://host/hg/d1 will show only
 > the two d2 repos above.

I don't get anything tho when i go to http://host/hg unless i use 
[collections] in which case i don't see any folders.

Basially, all i'm trying to achieve is simple: http://host/hg should display 
d1 and d3, then clicking on d1 will display d2 and clicking on d2 will display 
r1.hg and r2.hg, and cliking r1.hg will give the repo details...
Finally, I should be able to do hg clone http://host/hg/d1/d2/r1.hg

thanks for the help.
Mukesh



Brendan Cully wrote:
> Hi Mukesh, fancy seeing you here.
> 
> On Tuesday, 01 July 2008 at 17:57, Mukesh Rathor wrote:
>> 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.
> 
> It might interest you to know that hgwebdir will let you provide a
> partial path, showing only repositories under that path. So if your
> hgwebdir root is http://host/hg, then http://host/hg/d1 will show only
> the two d2 repos above.
> 
> ...
>> [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 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)
> 
> Take a closer look at the distributed hgweb.cgi:
> 
> from mercurial.hgweb.hgweb_mod import hgweb
> import mercurial.hgweb.wsgicgi as wsgicgi
> 
> application = hgweb("/path/to/repo", "repository name")
> wsgicgi.launch(application)


More information about the Mercurial mailing list