[PATCH STABLE] hgweb: show "error" message when accessing a repository if the web.style is raw

Matt Mackall mpm at selenic.com
Fri Jul 27 17:09:36 CDT 2012


On Fri, 2012-07-27 at 23:38 +0200, Angel Ezquerra wrote:
> # HG changeset patch
> # User Angel Ezquerra <angel.ezquerra at gmail.com>
> # Date 1343424921 -7200
> # Branch stable
> # Node ID 76729d5029217e9187f8ecc39d1b8e26535fa6ba
> # Parent  a09cc6aeed4a6d54a3846b6653165fd3b328d1ef
> hgweb: show "error" message when accessing a repository if the web.style is raw

This isn't what I had in mind. Instead, simply set default to some
existing view that isn't used by raw and add a template page for the
message (probably inline in the map). Something like this:

diff -r a09cc6aeed4a mercurial/templates/raw/map
--- a/mercurial/templates/raw/map	Fri Jul 20 19:08:26 2012 -0400
+++ b/mercurial/templates/raw/map	Fri Jul 27 16:52:06 2012 -0500
@@ -1,3 +1,5 @@
+default = 'shortlog'
+shortlog = "'raw' is not a browsable style"
 mimetype = 'text/plain; charset={encoding}'
 header = ''
 footer = ''


I've gone ahead and queued this.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list