[PATCH 1 of 3] hgweb: add searchhint to templates/coal/map

Anton Shestakov engored at ya.ru
Fri Jan 9 17:20:26 UTC 2015


# HG changeset patch
# User Anton Shestakov <engored at ya.ru>
# Date 1420788295 -28800
#      Fri Jan 09 15:24:55 2015 +0800
# Node ID 7123a7138ec3aeb3e3d2643a510e7a806025f888
# Parent  bb3ee61cfaa1d3f085c7577f48f566a0f31a6985
hgweb: add searchhint to templates/coal/map

coal style uses every template (except header.tmpl) directly from paper style,
but doesn't use paper/map file. Elements defined in such map files are used in
templates as you would expect. For example, paper/search.tmpl contains
'{searchhint}' and template engine replaces that with the actual hint. But when
coal style reuses paper/search.tmpl, it needs to define searchhint in its map
file as well, or template engine will not find it. So let's copy it from
paper/map to coal/map.

Before this change, if the coal style was selected, the hint for the search
field in page header was present, but it was completely empty. Although the
absence of searchhint in coal/map produced no error.

diff --git a/mercurial/templates/coal/map b/mercurial/templates/coal/map
--- a/mercurial/templates/coal/map
+++ b/mercurial/templates/coal/map
@@ -237,3 +237,6 @@ error = ../paper/error.tmpl
 urlparameter = '{separator}{name}={value|urlescape}'
 hiddenformentry = '<input type="hidden" name="{name}" value="{value|escape}" />'
 breadcrumb = '> <a href="{url|urlescape}">{name|escape}</a> '
+
+searchhint = 'Find changesets by keywords (author, files, the commit message), revision
+  number or hash, or <a href="{url|urlescape}help/revsets">revset expression</a>.'


More information about the Mercurial-devel mailing list