[PATCH V2] hgweb: teach archive how to handle file patterns
mads at kiilerich.com
Fri Feb 8 07:58:16 CST 2013
On 02/08/2013 02:48 PM, Angel Ezquerra wrote:
> # HG changeset patch
> # User Angel Ezquerra <angel.ezquerra at gmail.com>
> # Date 1360141605 -3600
> # Node ID 766ad3e48bdff8ee2b2a3a9276eff398dcaafa02
> # Parent 1516d5624a2911fcb90ee051c6dc0679b49aef55
> hgweb: teach archive how to handle file patterns
> The archive web command now takes into account the "file" request entry, if one
> is provided.
> The provided "file" is processed as a "path" pattern by default, which makes it
> easy to only archive a certain file or directory. However, it is possible to
> specify a different type of pattern, such as relglob by specifying it
> explicitly on the query URL.
> With this change hgweb can to process requests such as:
> 1. http://mercurial.selenic.com/hg/tip.zip/mercurial/templates
> This will download all files on the mercurial/templates directory as a zip
> 2. http://mercurial.selenic.com/hg/tip.tar.gz/relglob:*.py
I think this will be the first time we expose patterns - and thus
regexps - in hgweb. I'm not sure we want to do that before we have some
way of processing regexps 'safely'.
More information about the Mercurial-devel