[PATCH] hgweb: accept /path/to/file as a shortcut to /file/somehead/path/to/file

Alexander Solovyov alexander at solovyov.net
Sat Apr 30 07:36:56 CDT 2011


On Sat, Apr 30, 2011 at 14:18, Matt Mackall <mpm at selenic.com> wrote:
> Well there are two magical things here (read two different pitfalls for
> users):
>
> - what happens if someone tries to use this and their file path collides
> with hgweb's URL space?

It uses hgweb's webcommand, which is fine for fallback/shortcut I
think... Especially if it will redirect in case of success.

> - it chooses an effectively arbitrary head to display a file name, so
> it's highly dependent on commit order between branches

Yes, I thought about that and it could just skip this part and check
if there is anything in tip; this will remove ambiguity. But usually
you have only single head in your published repository and if you have
few and if you want specific one, you can do that.

-- 
Alexander


More information about the Mercurial-devel mailing list