need help with hgwebdir

John Stean john at lane15.co.uk
Tue Nov 2 09:36:38 CDT 2010


On 02/11/2010 13:12, Paul Boddie wrote:
> John Stean wrote:
>
>
>> I want to publish multiple repositories on a Fedora box.
>>
>> I have followed the instructions here: 
>> http://mercurial.selenic.com/wiki/RHEL4HgWebDirSetup
>
> Did you use the exact URL scheme described there or something slightly 
> different? What worries me with these instructions is the use of 
> things like ScriptAliasMatch, which is more complicated than 
> ScriptAlias and has some pitfalls, along with things like mixing up 
> the repository location with the Web publishing directory (albeit the 
> CGI directory). This can lead to debugging problems later.

Yes I used the exact scheme , when i hit /hg in the browser I get the 
"Mercurial Repositories" header with only the first repo listed
>
>> It all works fine for 1 repository, but cannot get the 2nd or nth to 
>> work, tried all different config options.
>>
>> I have created two repos:
>>
>> /home/scm/ hg init projecta
>> /home/scm/ hg init projectb
>>
>> in the hgweb.config I have:
>>
>> [paths]
>>
>> projecta = /home/scm/projecta
>> projectb = /home/scm/projectb
>> (i have also tried the /home/scm/* to no avail)
>
> See 
> http://mercurial.selenic.com/wiki/PublishingRepositories#Publishing_multiple_repositories 
> for some details of the configuration file, although I see that 
> wildcards are not described there, so maybe some notes there are also 
> required. Nevertheless, your configuration seems reasonable, and you 
> shouldn't bother making symbolic links into /var/www/cgi-hg, which is 
> what the RHEL4 page suggests.
>
I have tried individual listing the repositories as this

projecta = /home/scm/projecta
projectb = /home/scm/projectb

I have also tried the [collections] but that does nothing, and without 
an entry in the [paths] section it throws a 500 error
>> url / just lists projecta
>
> Does it list "projecta" in the hgweb user interface or as an Apache 
> directory listing?
yes it lists whichever repository is first in the [paths] section , but 
nothing else
>
>> url /projecta shows the projecta repo
>> url /projectb gives an internal server error
>>
>> If I reverse the order or projecta and b in the [paths] section, 
>> projectb works and projecta throws the error.
>>
>> Here is the error:
>>
>>  [error]  Traceback (most recent call last):
>>  [error]    File "/var/www/cgi-hg/hgwebdir.cgi", line 67, in <module>
>>  [error]
>>  [error]  wsgicgi.launch(application)
>>  [error]    File 
>> "/usr/lib/python2.5/site-packages/mercurial/hgweb/wsgicgi.py", line 
>> 69, in launch
>>  [error]
>>  [error]  for chunk in content:
>>  [error]    File 
>> "/usr/lib/python2.5/site-packages/mercurial/util.py", line 319, in 
>> increasingchunks
>>  [error]
>>  [error]  for chunk in source:
>>  [error]    File 
>> "/usr/lib/python2.5/site-packages/mercurial/templater.py", line 148, 
>> in expand
>>  [error]
>>  [error]  item = iters[0].next()
>>  [error]    File 
>> "/usr/lib/python2.5/site-packages/mercurial/templater.py", line 122, 
>> in _process
>>  [error]
>>  [error]  % (key, format))
>>  [error]  SyntaxError
>>  [error]  :
>>  [error]  Error expanding 'sessionvars%urlparameter'
>>  [error]
>>  [error]  Premature end of script headers: hgwebdir.cgi
>
> This indicates that the template serving the page doesn't find 
> sessionvars, which would suggest that the hgweb repository template is 
> being asked to serve up the hgweb repository *list*. Or that's one 
> possible explanation.
>
>> I have disabled selinux to no effect.
>>
>> Can anyone offer a suggestion?
>
> Do you have symbolic links to the repositories in the CGI directory? 
> If so, remove them. That will remove one source of confusion about 
> what Apache will be attempting to do with your repositories.
No symlinks in there at all
>
> Paul
>
> P.S. Don't worry: we'll figure this out eventually; it just takes some 
> patience.
>
>



More information about the Mercurial mailing list