[PATCH 2 of 3] Fix hgwebdir collections when the baseurl option is set

Dirkjan Ochtman dirkjan at ochtman.nl
Thu May 8 05:19:28 CDT 2008


Emanuele Aina <emanuele.aina <at> gmail.com> writes:
> I thought about it, but unfortunately urljoin
> 1) doesn't always add a path level (which is what we want here):
>    urlparse.urljoin('http://example.com/bar', 'foo')
>    'http://example.com/foo'

Maybe we always add a /-prefix to foo? Especially if we're sure foo doesn't have
one itself (as is true in the case of repository identifiers).

> 2) doesn't normalize double slahes in the url:
>    urlparse.urljoin('http://example.com//bar/', 'foo')
>    'http://example.com//bar/foo'

I'm not sure that we want that, anyway. If there's a // in the URL somewhere and
it got to this code (i.e. pointed to the correct handler code), then we should
probably just leave it as is, IMO.

Cheers,

Dirkjan



More information about the Mercurial-devel mailing list