[PATCH] hgweb: require files and directory links to begin with 'path:'

Angel Ezquerra angel.ezquerra at gmail.com
Thu Mar 21 16:07:42 CDT 2013


On Thu, Mar 21, 2013 at 3:51 PM, Kevin Bullock
<kbullock+mercurial at ringworld.org> wrote:
> On 20 Mar 2013, at 5:15 PM, Angel Ezquerra wrote:
>
>> # HG changeset patch
>> # User Angel Ezquerra <angel.ezquerra at gmail.com>
>> # Date 1363809088 -3600
>> #      Wed Mar 20 20:51:28 2013 +0100
>> # Node ID 84f24bbe0c3e97e4e1753c894e3c963d1e6c6d63
>> # Parent  136516cd3d6902aaa2edc9befc65763c56a6dbfc
>> hgweb: require files and directory links to begin with 'path:'
>
> I'm -1 on this. It simplifies the code slightly but leaks an implementation detail. In fact I'm becoming more convinced that we should just be returning a 404 here anyway, and document the new feature as only taking explicit path names.
>
> Either way, we still need to turn an empty archive into a 404.

OK,

it seems actually quite easy to through an error.Abort when
archival.archive finds no files. I will prepare a patch and send it.
Note that I think we should only throw the exception if we pass a
pattern and it matches no files. If we pass no pattern and there are
no files (e.g. the repo is empty) then there should be no exception
thrown IMO.

Cheers,

Angel


More information about the Mercurial-devel mailing list