[PATCH 3 of 3] Leave urlbase empty in templates if url is already absolute

Emanuele Aina em at nerd.ocracy.org
Wed May 28 05:21:35 CDT 2008


Patrick Mézard ipotizzò:

> The two other patches are good for me (except I will switch the test
> and the fix order), but I am less sure about this one. I am really
> tempted to make "url" always a relative URL instead. Is this issue
> related to the RSS template only or am I missing something ?

The RSS/Atom templates use {urlbase}{url} to always get absolute urls
while other web templates use only {url}.

Problems arise when you use a full url for 'baseurl' in hgweb.config
(e.g. 'http://techn.ocracy.org'), as it will make {url} already complete
but it will nevertheless appended to {urlbase}.

I didn't make {url} always relative as it will break the web templates
when using 'baseurl' and I'm not confident enough with the codebase to
do changes of this size, even if this solution seems cleaner to me.

-- 
Buongiorno.
Complimenti per l'ottima scelta.



More information about the Mercurial-devel mailing list