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

login
register
mail settings
Submitter Anton Shestakov
Date Jan. 9, 2015, 5:20 p.m.
Message ID <7123a7138ec3aeb3e3d2.1420824026@neuro>
Download mbox | patch
Permalink /patch/7404/
State Accepted
Commit ee1bf2b5a78096cb6a6964446e1914aeb94b9ae9
Headers show

Comments

Anton Shestakov - Jan. 9, 2015, 5:20 p.m.
# HG changeset patch
# User Anton Shestakov <engored@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.

Patch

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 = '&gt; <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>.'