Disable hgweb browsing
Paul Boddie
paul.boddie at biotek.uio.no
Mon May 30 10:06:54 UTC 2011
On 30/05/11 10:03, moroswitie wrote:
>
> We are setting up multiple repositories and are creating a custom repository
> browser. To avoid confusion we would like to disable the build in browser.
>
> By making use of the webserver, we are able to allow/disallow pull/push
> actions based on the username and password. Some developers are not able to
> make use of ssh all the time so we are looking for a solution to do this
> with http, and could only find the hgweb.cgi script to do this. If there are
> other ways of allowing push/pull over http/https that would make things even
> easier. I hope that explains it a little better.
So you effectively want to use HTTP(S) as a transport for performing the
normal "fundamental" hg operations, but to switch off the user-readable
Web pages for repositories? Looking at mercurial.hgweb.hgweb_mod, it
appears that after checking for the "fundamental" operations, the code
then checks if one of the Web commands (defined in
mercurial.hgweb.webcommands) is being used. I imagine that you could try
editing the webcommands module's __all__ attribute, potentially leaving
it as an empty list, and see how far this gets you.
Paul
More information about the Mercurial
mailing list