Fwd: Re: Disable hgweb browsing

J.S. van Bethlehem j.s.van.bethlehem at astro.rug.nl
Wed Jun 1 01:43:55 CDT 2011


Oops, forgot the mailinglist, apologies.
Jakob

-------- Original Message --------
Subject: 	Re: Disable hgweb browsing
Date: 	Tue, 31 May 2011 09:04:53 +0200
From: 	J.S. van Bethlehem <j.s.van.bethlehem at astro.rug.nl>
To: 	Martin Geisler <mg at lazybytes.net>



On 05/30/2011 09:44 AM, Martin Geisler wrote:
> moroswitie<moroswitie at gmail.com>  writes:
>
>> I'm currently starting to work on a custom mercurial project web
>> application and need to disable the build in repository browser.
>>
>> I wasn't able to find such an option, and a quick work around would be
>> to redirect all repository browser requests. The problemd is I
>> couldn't find the format that the hgweb.cgi scripts accepts to show
>> the repository browser.
> Try running 'hg serve' and accesshttp://localhost:8000/  in your
> browser. Now access it with hg, the command line client.
>
>> Could anybody point me in the right direction so I know how to rewrite
>> the request so that I can serve up a nice error message saying that
>> repository browsing is disabled with the build in browser.
>>
>> Disabling the browser should not disable pull or push. So I think I
>> also need to know the urls for the push and pull commands.
> If people can pull, then they can just run 'hg serve' locally and do
> what you are trying to disable... so why do you want to disable the
> repository browser on your server?
>
> All the commands done by the command line client access URLs of the form
>
>    /?cmd=COMMAND
>
> so you can direct other requests to your error page.
>
>
>

Wouldn't simply setting 'deny_read = *' in the [web]-section of the 
.hg/hgrc file of your repository do the trick?
(Look here http://www.selenic.com/mercurial/hgrc.5.html for the [web] 
section -> deny_read option)
Jakob

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial/attachments/20110601/9445fc6e/attachment.htm>


More information about the Mercurial mailing list