Is freehg.org code available?

Ondrej Certik ondrej at certik.cz
Fri Jul 4 10:19:34 CDT 2008


On Fri, Jul 4, 2008 at 3:56 PM, Jesper Noehr <jesper at noehr.org> wrote:
> On Jul 4, 2008, at 3:53 PM, Ondrej Certik wrote:
>>
>> 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
>
> I think the above rule is redundant. It basically matches *anything*, which
> is not necessary as the rule below catches everything that is not matched by
> the 3 conditionals.

Unfortunately it is needed, notice the QUERY_STRING and especially .+,
instead of .*. The above rule only matches if the "hg" command passes
some query string. In contrast, the other rule doesn't match it.

Ondrej


More information about the Mercurial mailing list