Is freehg.org code available?

Ondrej Certik ondrej at certik.cz
Fri Jul 4 08:53:18 CDT 2008


On Fri, Jul 4, 2008 at 12:45 PM, Jesper Noehr <jesper at noehr.org> wrote:
> On Jul 3, 2008, at 10:25 PM, Ondrej Certik wrote:
>>
>> On Thu, Jul 3, 2008 at 9:57 PM, Ondrej Certik <ondrej at certik.cz> wrote:
>>>
>>> On Thu, Jul 3, 2008 at 8:38 PM, Dirkjan Ochtman <dirkjan at ochtman.nl>
>>> wrote:
>>>>
>>>> Ondrej Certik <ondrej <at> certik.cz> writes:
>>>>>
>>>>> Could the answer to all my problems be, that I also need to setup
>>>>> hgwebdir somehow? And tell apache to redirect shortlog, changelog etc.
>>>>> to it? And tell it to use templates from the hgtemplates/freehg
>>>>> directory?
>>>>
>>>> Yeah, that would make sense, I guess.
>>>
>>> Yes, I made a huge progress, now it almost does what it should, but
>>> now I am struggling with apache directives. If anyone could post here
>>> his apache config file, it would spare me a lot of time to figure
>>> things out.
>
> [...]
>
>> etc. Only addresses of the exact form of
>> "http://freehg.sympy.org/u/a/test/" and
>> "http://freehg.sympy.org/u/a/test/edit/" should be skipped. I am
>> giving up for today, will try some other time again. If you know how
>> to do it, I would be very happy. :)
>
> You should be able to use RewriteCond[1] in combination with a regex
> catching urls ending with the patterns you want to skip, e.g.
>
> RewriteCond     %{REQUEST_URI}  !edit/$
> RewriteCond     %{REQUEST_URI}  !delete/$

Thanks a lot Jesper. It turned out I need to use:

    RewriteCond %{QUERY_STRING} .+
    RewriteRule /u(/.*) /home/ondra/repos/freehg/web/hgwebdir.cgi$1

    RewriteCond %{REQUEST_URI} !u/([^/]+)/([^/?]+)/?$
    RewriteCond %{REQUEST_URI} !u/([^/]+)/([^/?]+)/edit/?$
    RewriteCond %{REQUEST_URI} !u/([^/]+)/([^/?]+)/delete/?$
    RewriteRule /u(/.*) /home/ondra/repos/freehg/web/hgwebdir.cgi$1
      <Directory "/home/ondra/repos/freehg/web/">
        Order allow,deny
        Allow from all
        AllowOverride All
        SetHandler None
        Options ExecCGI
        AddHandler cgi-script .cgi
      </Directory>

Uff, now I am going to document it, then setup uploads.

Ondrej


More information about the Mercurial mailing list