hgweb: consolidate search form for paper
authorGregory Szorc <gregory.szorc@gmail.com>
Fri, 09 Jun 2017 13:59:13 -0700
changeset 32758 cba4461aa0a0
parent 32757 d2acd99bbab3
child 32759 265196cd7d7f
hgweb: consolidate search form for paper AFAICT this was mostly a bunch of copy pasta. The only variation is some pages defined a "value" attribute. The "query" variable will just be empty on pages that don't accept it. So let's consolidate the template and remove the redundancy.
mercurial/templates/paper/bookmarks.tmpl
mercurial/templates/paper/branches.tmpl
mercurial/templates/paper/changeset.tmpl
mercurial/templates/paper/error.tmpl
mercurial/templates/paper/fileannotate.tmpl
mercurial/templates/paper/filecomparison.tmpl
mercurial/templates/paper/filediff.tmpl
mercurial/templates/paper/filelog.tmpl
mercurial/templates/paper/filerevision.tmpl
mercurial/templates/paper/graph.tmpl
mercurial/templates/paper/help.tmpl
mercurial/templates/paper/helptopics.tmpl
mercurial/templates/paper/manifest.tmpl
mercurial/templates/paper/map
mercurial/templates/paper/search.tmpl
mercurial/templates/paper/shortlog.tmpl
mercurial/templates/paper/tags.tmpl
tests/test-help.t
tests/test-hgweb-commands.t
tests/test-hgweb-descend-empties.t
tests/test-hgweb-diffs.t
tests/test-hgweb-empty.t
tests/test-hgweb-filelog.t
tests/test-hgweb-removed.t
tests/test-hgweb.t
tests/test-highlight.t
--- a/mercurial/templates/paper/bookmarks.tmpl	Fri Jun 09 23:56:50 2017 -0400
+++ b/mercurial/templates/paper/bookmarks.tmpl	Fri Jun 09 13:59:13 2017 -0700
@@ -34,11 +34,7 @@
 <h2 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb}</h2>
 <h3>bookmarks</h3>
 
-<form class="search" action="{url|urlescape}log">
-{sessionvars%hiddenformentry}
-<p><input name="rev" id="search1" type="text" size="30" /></p>
-<div id="hint">{searchhint}</div>
-</form>
+{searchform}
 
 <table class="bigtable">
 <thead>
--- a/mercurial/templates/paper/branches.tmpl	Fri Jun 09 23:56:50 2017 -0400
+++ b/mercurial/templates/paper/branches.tmpl	Fri Jun 09 13:59:13 2017 -0700
@@ -34,11 +34,7 @@
 <h2 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb}</h2>
 <h3>branches</h3>
 
-<form class="search" action="{url|urlescape}log">
-{sessionvars%hiddenformentry}
-<p><input name="rev" id="search1" type="text" size="30" /></p>
-<div id="hint">{searchhint}</div>
-</form>
+{searchform}
 
 <table class="bigtable">
 <thead>
--- a/mercurial/templates/paper/changeset.tmpl	Fri Jun 09 23:56:50 2017 -0400
+++ b/mercurial/templates/paper/changeset.tmpl	Fri Jun 09 13:59:13 2017 -0700
@@ -36,11 +36,7 @@
  {changesetbranch%changelogbranchname}{changesettag}{changesetbookmark}
 </h3>
 
-<form class="search" action="{url|urlescape}log">
-{sessionvars%hiddenformentry}
-<p><input name="rev" id="search1" type="text" size="30" /></p>
-<div id="hint">{searchhint}</div>
-</form>
+{searchform}
 
 <div class="description">{desc|strip|escape|websub|nonempty}</div>
 
--- a/mercurial/templates/paper/error.tmpl	Fri Jun 09 23:56:50 2017 -0400
+++ b/mercurial/templates/paper/error.tmpl	Fri Jun 09 13:59:13 2017 -0700
@@ -26,11 +26,7 @@
 <h2 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb}</h2>
 <h3>error</h3>
 
-<form class="search" action="{url|urlescape}log">
-{sessionvars%hiddenformentry}
-<p><input name="rev" id="search1" type="text" size="30"></p>
-<div id="hint">{searchhint}</div>
-</form>
+{searchform}
 
 <div class="description">
 <p>
--- a/mercurial/templates/paper/fileannotate.tmpl	Fri Jun 09 23:56:50 2017 -0400
+++ b/mercurial/templates/paper/fileannotate.tmpl	Fri Jun 09 13:59:13 2017 -0700
@@ -42,11 +42,7 @@
  {branch%changelogbranchname}{tags%changelogtag}{bookmarks%changelogtag}
 </h3>
 
-<form class="search" action="{url|urlescape}log">
-{sessionvars%hiddenformentry}
-<p><input name="rev" id="search1" type="text" size="30" /></p>
-<div id="hint">{searchhint}</div>
-</form>
+{searchform}
 
 <div class="description">{desc|strip|escape|websub|nonempty}</div>
 
--- a/mercurial/templates/paper/filecomparison.tmpl	Fri Jun 09 23:56:50 2017 -0400
+++ b/mercurial/templates/paper/filecomparison.tmpl	Fri Jun 09 13:59:13 2017 -0700
@@ -41,11 +41,7 @@
  {branch%changelogbranchname}{tags%changelogtag}{bookmarks%changelogtag}
 </h3>
 
-<form class="search" action="{url|urlescape}log">
-<p>{sessionvars%hiddenformentry}</p>
-<p><input name="rev" id="search1" type="text" size="30" /></p>
-<div id="hint">{searchhint}</div>
-</form>
+{searchform}
 
 <div class="description">{desc|strip|escape|websub|nonempty}</div>
 
--- a/mercurial/templates/paper/filediff.tmpl	Fri Jun 09 23:56:50 2017 -0400
+++ b/mercurial/templates/paper/filediff.tmpl	Fri Jun 09 13:59:13 2017 -0700
@@ -41,11 +41,7 @@
  {branch%changelogbranchname}{tags%changelogtag}{bookmarks%changelogtag}
 </h3>
 
-<form class="search" action="{url|urlescape}log">
-<p>{sessionvars%hiddenformentry}</p>
-<p><input name="rev" id="search1" type="text" size="30" /></p>
-<div id="hint">{searchhint}</div>
-</form>
+{searchform}
 
 <div class="description">{desc|strip|escape|websub|nonempty}</div>
 
--- a/mercurial/templates/paper/filelog.tmpl	Fri Jun 09 23:56:50 2017 -0400
+++ b/mercurial/templates/paper/filelog.tmpl	Fri Jun 09 13:59:13 2017 -0700
@@ -51,11 +51,7 @@
 ' (following lines {linerange}{if(descend, ', descending')} <a href="{url|urlescape}log/{symrev}/{file|urlescape}{sessionvars%urlparameter}">back to filelog</a>)')}
 </h3>
 
-<form class="search" action="{url|urlescape}log">
-{sessionvars%hiddenformentry}
-<p><input name="rev" id="search1" type="text" size="30" /></p>
-<div id="hint">{searchhint}</div>
-</form>
+{searchform}
 
 <div class="navigate">
 <a href="{url|urlescape}log/{symrev}/{file|urlescape}{lessvars%urlparameter}">less</a>
--- a/mercurial/templates/paper/filerevision.tmpl	Fri Jun 09 23:56:50 2017 -0400
+++ b/mercurial/templates/paper/filerevision.tmpl	Fri Jun 09 13:59:13 2017 -0700
@@ -41,11 +41,7 @@
  {branch%changelogbranchname}{tags%changelogtag}{bookmarks%changelogtag}
 </h3>
 
-<form class="search" action="{url|urlescape}log">
-{sessionvars%hiddenformentry}
-<p><input name="rev" id="search1" type="text" size="30" /></p>
-<div id="hint">{searchhint}</div>
-</form>
+{searchform}
 
 <div class="description">{desc|strip|escape|websub|nonempty}</div>
 
--- a/mercurial/templates/paper/graph.tmpl	Fri Jun 09 23:56:50 2017 -0400
+++ b/mercurial/templates/paper/graph.tmpl	Fri Jun 09 13:59:13 2017 -0700
@@ -39,11 +39,7 @@
 <h2 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb}</h2>
 <h3>graph</h3>
 
-<form class="search" action="{url|urlescape}log">
-{sessionvars%hiddenformentry}
-<p><input name="rev" id="search1" type="text" size="30" /></p>
-<div id="hint">{searchhint}</div>
-</form>
+{searchform}
 
 <div class="navigate">
 <a href="{url|urlescape}graph/{symrev}{lessvars%urlparameter}">less</a>
--- a/mercurial/templates/paper/help.tmpl	Fri Jun 09 23:56:50 2017 -0400
+++ b/mercurial/templates/paper/help.tmpl	Fri Jun 09 13:59:13 2017 -0700
@@ -24,12 +24,7 @@
 <div class="main">
 <h2 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb}</h2>
 <h3>Help: {topic}</h3>
-
-<form class="search" action="{url|urlescape}log">
-{sessionvars%hiddenformentry}
-<p><input name="rev" id="search1" type="text" size="30" /></p>
-<div id="hint">{searchhint}</div>
-</form>
+{searchform}
 <div id="doc">
 {rstdoc(doc, "html")}
 </div>
--- a/mercurial/templates/paper/helptopics.tmpl	Fri Jun 09 23:56:50 2017 -0400
+++ b/mercurial/templates/paper/helptopics.tmpl	Fri Jun 09 13:59:13 2017 -0700
@@ -26,11 +26,7 @@
 
 <div class="main">
 <h2 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb}</h2>
-<form class="search" action="{url|urlescape}log">
-{sessionvars%hiddenformentry}
-<p><input name="rev" id="search1" type="text" size="30" /></p>
-<div id="hint">{searchhint}</div>
-</form>
+{searchform}
 <table class="bigtable">
 <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr>
 {topics % helpentry}
--- a/mercurial/templates/paper/manifest.tmpl	Fri Jun 09 23:56:50 2017 -0400
+++ b/mercurial/templates/paper/manifest.tmpl	Fri Jun 09 13:59:13 2017 -0700
@@ -35,11 +35,7 @@
  {branch%changelogbranchname}{tags%changelogtag}{bookmarks%changelogtag}
 </h3>
 
-<form class="search" action="{url|urlescape}log">
-{sessionvars%hiddenformentry}
-<p><input name="rev" id="search1" type="text" size="30" /></p>
-<div id="hint">{searchhint}</div>
-</form>
+{searchform}
 
 <table class="bigtable">
 <thead>
--- a/mercurial/templates/paper/map	Fri Jun 09 23:56:50 2017 -0400
+++ b/mercurial/templates/paper/map	Fri Jun 09 13:59:13 2017 -0700
@@ -243,5 +243,11 @@
 hiddenformentry = '<input type="hidden" name="{name}" value="{value|escape}" />'
 breadcrumb = '&gt; <a href="{url|urlescape}">{name|escape}</a> '
 
+searchform = '
+  <form class="search" action="{url|urlescape}log">
+    {sessionvars%hiddenformentry}
+    <p><input name="rev" id="search1" type="text" size="30" value="{query|escape}" /></p>
+    <div id="hint">{searchhint}</div>
+  </form>'
 searchhint = 'Find changesets by keywords (author, files, the commit message), revision
   number or hash, or <a href="{url|urlescape}help/revsets">revset expression</a>.'
--- a/mercurial/templates/paper/search.tmpl	Fri Jun 09 23:56:50 2017 -0400
+++ b/mercurial/templates/paper/search.tmpl	Fri Jun 09 13:59:13 2017 -0700
@@ -33,11 +33,7 @@
 Use {showunforcekw}</a> instead.')}
 </p>
 
-<form class="search" action="{url|urlescape}log">
-{sessionvars%hiddenformentry}
-<p><input name="rev" id="search1" type="text" size="30" value="{query|escape}"></p>
-<div id="hint">{searchhint}</div>
-</form>
+{searchform}
 
 <div class="navigate">
 <a href="{url|urlescape}log{lessvars%urlparameter}">less</a>
--- a/mercurial/templates/paper/shortlog.tmpl	Fri Jun 09 23:56:50 2017 -0400
+++ b/mercurial/templates/paper/shortlog.tmpl	Fri Jun 09 13:59:13 2017 -0700
@@ -41,11 +41,7 @@
 <h2 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb}</h2>
 <h3>log</h3>
 
-<form class="search" action="{url|urlescape}log">
-{sessionvars%hiddenformentry}
-<p><input name="rev" id="search1" type="text" size="30" value="{query|escape}" /></p>
-<div id="hint">{searchhint}</div>
-</form>
+{searchform}
 
 <div class="navigate">
 <a href="{url|urlescape}shortlog/{symrev}{lessvars%urlparameter}">less</a>
--- a/mercurial/templates/paper/tags.tmpl	Fri Jun 09 23:56:50 2017 -0400
+++ b/mercurial/templates/paper/tags.tmpl	Fri Jun 09 13:59:13 2017 -0700
@@ -34,11 +34,7 @@
 <h2 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb}</h2>
 <h3>tags</h3>
 
-<form class="search" action="{url|urlescape}log">
-{sessionvars%hiddenformentry}
-<p><input name="rev" id="search1" type="text" size="30" /></p>
-<div id="hint">{searchhint}</div>
-</form>
+{searchform}
 
 <table class="bigtable">
 <thead>
--- a/tests/test-help.t	Fri Jun 09 23:56:50 2017 -0400
+++ b/tests/test-help.t	Fri Jun 09 13:59:13 2017 -0700
@@ -1915,9 +1915,10 @@
   
   <div class="main">
   <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
+  
   <form class="search" action="/log">
   
-  <p><input name="rev" id="search1" type="text" size="30" /></p>
+  <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
   <div id="hint">Find changesets by keywords (author, files, the commit message), revision
   number or hash, or <a href="/help/revsets">revset expression</a>.</div>
   </form>
@@ -2509,7 +2510,7 @@
   
   <form class="search" action="/log">
   
-  <p><input name="rev" id="search1" type="text" size="30" /></p>
+  <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
   <div id="hint">Find changesets by keywords (author, files, the commit message), revision
   number or hash, or <a href="/help/revsets">revset expression</a>.</div>
   </form>
@@ -2689,7 +2690,7 @@
   
   <form class="search" action="/log">
   
-  <p><input name="rev" id="search1" type="text" size="30" /></p>
+  <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
   <div id="hint">Find changesets by keywords (author, files, the commit message), revision
   number or hash, or <a href="/help/revsets">revset expression</a>.</div>
   </form>
@@ -2890,7 +2891,7 @@
   
   <form class="search" action="/log">
   
-  <p><input name="rev" id="search1" type="text" size="30" /></p>
+  <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
   <div id="hint">Find changesets by keywords (author, files, the commit message), revision
   number or hash, or <a href="/help/revsets">revset expression</a>.</div>
   </form>
@@ -2993,9 +2994,10 @@
   
   <div class="main">
   <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
+  
   <form class="search" action="/log">
   
-  <p><input name="rev" id="search1" type="text" size="30" /></p>
+  <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
   <div id="hint">Find changesets by keywords (author, files, the commit message), revision
   number or hash, or <a href="/help/revsets">revset expression</a>.</div>
   </form>
@@ -3100,7 +3102,7 @@
   
   <form class="search" action="/log">
   
-  <p><input name="rev" id="search1" type="text" size="30" /></p>
+  <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
   <div id="hint">Find changesets by keywords (author, files, the commit message), revision
   number or hash, or <a href="/help/revsets">revset expression</a>.</div>
   </form>
--- a/tests/test-hgweb-commands.t	Fri Jun 09 23:56:50 2017 -0400
+++ b/tests/test-hgweb-commands.t	Fri Jun 09 13:59:13 2017 -0700
@@ -747,6 +747,7 @@
   <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
   <h3>log</h3>
   
+  
   <form class="search" action="/log">
   
   <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
@@ -882,9 +883,10 @@
    <span class="tag">1.0</span> <span class="tag">anotherthing</span> 
   </h3>
   
+  
   <form class="search" action="/log">
   
-  <p><input name="rev" id="search1" type="text" size="30" /></p>
+  <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
   <div id="hint">Find changesets by keywords (author, files, the commit message), revision
   number or hash, or <a href="/help/revsets">revset expression</a>.</div>
   </form>
@@ -1025,9 +1027,10 @@
   
   </p>
   
+  
   <form class="search" action="/log">
   
-  <p><input name="rev" id="search1" type="text" size="30" value="base"></p>
+  <p><input name="rev" id="search1" type="text" size="30" value="base" /></p>
   <div id="hint">Find changesets by keywords (author, files, the commit message), revision
   number or hash, or <a href="/help/revsets">revset expression</a>.</div>
   </form>
@@ -1312,9 +1315,10 @@
    
   </h3>
   
+  
   <form class="search" action="/log">
   
-  <p><input name="rev" id="search1" type="text" size="30" /></p>
+  <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
   <div id="hint">Find changesets by keywords (author, files, the commit message), revision
   number or hash, or <a href="/help/revsets">revset expression</a>.</div>
   </form>
@@ -1440,9 +1444,10 @@
    <span class="branchname">stable</span> 
   </h3>
   
+  
   <form class="search" action="/log">
   
-  <p><input name="rev" id="search1" type="text" size="30" /></p>
+  <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
   <div id="hint">Find changesets by keywords (author, files, the commit message), revision
   number or hash, or <a href="/help/revsets">revset expression</a>.</div>
   </form>
--- a/tests/test-hgweb-descend-empties.t	Fri Jun 09 23:56:50 2017 -0400
+++ b/tests/test-hgweb-descend-empties.t	Fri Jun 09 13:59:13 2017 -0700
@@ -76,9 +76,10 @@
    <span class="tag">tip</span> 
   </h3>
   
+  
   <form class="search" action="/log">
   
-  <p><input name="rev" id="search1" type="text" size="30" /></p>
+  <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
   <div id="hint">Find changesets by keywords (author, files, the commit message), revision
   number or hash, or <a href="/help/revsets">revset expression</a>.</div>
   </form>
@@ -195,9 +196,10 @@
    <span class="tag">tip</span> 
   </h3>
   
+  
   <form class="search" action="/log">
   <input type="hidden" name="style" value="coal" />
-  <p><input name="rev" id="search1" type="text" size="30" /></p>
+  <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
   <div id="hint">Find changesets by keywords (author, files, the commit message), revision
   number or hash, or <a href="/help/revsets">revset expression</a>.</div>
   </form>
--- a/tests/test-hgweb-diffs.t	Fri Jun 09 23:56:50 2017 -0400
+++ b/tests/test-hgweb-diffs.t	Fri Jun 09 13:59:13 2017 -0700
@@ -84,9 +84,10 @@
    
   </h3>
   
+  
   <form class="search" action="/log">
   
-  <p><input name="rev" id="search1" type="text" size="30" /></p>
+  <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
   <div id="hint">Find changesets by keywords (author, files, the commit message), revision
   number or hash, or <a href="/help/revsets">revset expression</a>.</div>
   </form>
@@ -256,9 +257,10 @@
    <span class="tag">tip</span> 
   </h3>
   
+  
   <form class="search" action="/log">
-  <p></p>
-  <p><input name="rev" id="search1" type="text" size="30" /></p>
+  
+  <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
   <div id="hint">Find changesets by keywords (author, files, the commit message), revision
   number or hash, or <a href="/help/revsets">revset expression</a>.</div>
   </form>
@@ -360,9 +362,10 @@
    
   </h3>
   
+  
   <form class="search" action="/log">
   
-  <p><input name="rev" id="search1" type="text" size="30" /></p>
+  <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
   <div id="hint">Find changesets by keywords (author, files, the commit message), revision
   number or hash, or <a href="/help/revsets">revset expression</a>.</div>
   </form>
@@ -536,9 +539,10 @@
    <span class="tag">tip</span> 
   </h3>
   
+  
   <form class="search" action="/log">
-  <p></p>
-  <p><input name="rev" id="search1" type="text" size="30" /></p>
+  
+  <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
   <div id="hint">Find changesets by keywords (author, files, the commit message), revision
   number or hash, or <a href="/help/revsets">revset expression</a>.</div>
   </form>
@@ -641,9 +645,10 @@
    
   </h3>
   
+  
   <form class="search" action="/log">
-  <p></p>
-  <p><input name="rev" id="search1" type="text" size="30" /></p>
+  
+  <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
   <div id="hint">Find changesets by keywords (author, files, the commit message), revision
   number or hash, or <a href="/help/revsets">revset expression</a>.</div>
   </form>
@@ -770,9 +775,10 @@
    <span class="tag">tip</span> 
   </h3>
   
+  
   <form class="search" action="/log">
-  <p></p>
-  <p><input name="rev" id="search1" type="text" size="30" /></p>
+  
+  <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
   <div id="hint">Find changesets by keywords (author, files, the commit message), revision
   number or hash, or <a href="/help/revsets">revset expression</a>.</div>
   </form>
@@ -901,9 +907,10 @@
    <span class="tag">tip</span> 
   </h3>
   
+  
   <form class="search" action="/log">
-  <p></p>
-  <p><input name="rev" id="search1" type="text" size="30" /></p>
+  
+  <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
   <div id="hint">Find changesets by keywords (author, files, the commit message), revision
   number or hash, or <a href="/help/revsets">revset expression</a>.</div>
   </form>
@@ -1038,9 +1045,10 @@
    <span class="tag">tip</span> 
   </h3>
   
+  
   <form class="search" action="/log">
-  <p></p>
-  <p><input name="rev" id="search1" type="text" size="30" /></p>
+  
+  <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
   <div id="hint">Find changesets by keywords (author, files, the commit message), revision
   number or hash, or <a href="/help/revsets">revset expression</a>.</div>
   </form>
--- a/tests/test-hgweb-empty.t	Fri Jun 09 23:56:50 2017 -0400
+++ b/tests/test-hgweb-empty.t	Fri Jun 09 13:59:13 2017 -0700
@@ -59,6 +59,7 @@
   <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
   <h3>log</h3>
   
+  
   <form class="search" action="/log">
   
   <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
@@ -169,6 +170,7 @@
   <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
   <h3>log</h3>
   
+  
   <form class="search" action="/log">
   
   <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
@@ -275,9 +277,10 @@
   <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
   <h3>graph</h3>
   
+  
   <form class="search" action="/log">
   
-  <p><input name="rev" id="search1" type="text" size="30" /></p>
+  <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
   <div id="hint">Find changesets by keywords (author, files, the commit message), revision
   number or hash, or <a href="/help/revsets">revset expression</a>.</div>
   </form>
@@ -424,9 +427,10 @@
    <span class="tag">tip</span> 
   </h3>
   
+  
   <form class="search" action="/log">
   
-  <p><input name="rev" id="search1" type="text" size="30" /></p>
+  <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
   <div id="hint">Find changesets by keywords (author, files, the commit message), revision
   number or hash, or <a href="/help/revsets">revset expression</a>.</div>
   </form>
--- a/tests/test-hgweb-filelog.t	Fri Jun 09 23:56:50 2017 -0400
+++ b/tests/test-hgweb-filelog.t	Fri Jun 09 13:59:13 2017 -0700
@@ -193,9 +193,10 @@
    
   </h3>
   
+  
   <form class="search" action="/log">
   
-  <p><input name="rev" id="search1" type="text" size="30" /></p>
+  <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
   <div id="hint">Find changesets by keywords (author, files, the commit message), revision
   number or hash, or <a href="/help/revsets">revset expression</a>.</div>
   </form>
@@ -315,9 +316,10 @@
    
   </h3>
   
+  
   <form class="search" action="/log">
   
-  <p><input name="rev" id="search1" type="text" size="30" /></p>
+  <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
   <div id="hint">Find changesets by keywords (author, files, the commit message), revision
   number or hash, or <a href="/help/revsets">revset expression</a>.</div>
   </form>
@@ -437,9 +439,10 @@
    
   </h3>
   
+  
   <form class="search" action="/log">
   
-  <p><input name="rev" id="search1" type="text" size="30" /></p>
+  <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
   <div id="hint">Find changesets by keywords (author, files, the commit message), revision
   number or hash, or <a href="/help/revsets">revset expression</a>.</div>
   </form>
@@ -550,9 +553,10 @@
    
   </h3>
   
+  
   <form class="search" action="/log">
   
-  <p><input name="rev" id="search1" type="text" size="30" /></p>
+  <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
   <div id="hint">Find changesets by keywords (author, files, the commit message), revision
   number or hash, or <a href="/help/revsets">revset expression</a>.</div>
   </form>
@@ -639,9 +643,10 @@
   <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
   <h3>error</h3>
   
+  
   <form class="search" action="/log">
   
-  <p><input name="rev" id="search1" type="text" size="30"></p>
+  <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
   <div id="hint">Find changesets by keywords (author, files, the commit message), revision
   number or hash, or <a href="/help/revsets">revset expression</a>.</div>
   </form>
@@ -739,9 +744,10 @@
     (following lines 1:2 <a href="/log/tip/c">back to filelog</a>)
   </h3>
   
+  
   <form class="search" action="/log">
   
-  <p><input name="rev" id="search1" type="text" size="30" /></p>
+  <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
   <div id="hint">Find changesets by keywords (author, files, the commit message), revision
   number or hash, or <a href="/help/revsets">revset expression</a>.</div>
   </form>
@@ -858,9 +864,10 @@
     (following lines 1:2 <a href="/log/tip/c?revcount=1">back to filelog</a>)
   </h3>
   
+  
   <form class="search" action="/log">
   <input type="hidden" name="revcount" value="1" />
-  <p><input name="rev" id="search1" type="text" size="30" /></p>
+  <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
   <div id="hint">Find changesets by keywords (author, files, the commit message), revision
   number or hash, or <a href="/help/revsets">revset expression</a>.</div>
   </form>
@@ -1094,9 +1101,10 @@
    
   </h3>
   
+  
   <form class="search" action="/log">
   
-  <p><input name="rev" id="search1" type="text" size="30" /></p>
+  <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
   <div id="hint">Find changesets by keywords (author, files, the commit message), revision
   number or hash, or <a href="/help/revsets">revset expression</a>.</div>
   </form>
@@ -1375,9 +1383,10 @@
     (following lines 3:4 <a href="/log/tip/c">back to filelog</a>)
   </h3>
   
+  
   <form class="search" action="/log">
   
-  <p><input name="rev" id="search1" type="text" size="30" /></p>
+  <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
   <div id="hint">Find changesets by keywords (author, files, the commit message), revision
   number or hash, or <a href="/help/revsets">revset expression</a>.</div>
   </form>
@@ -1631,9 +1640,10 @@
     (following lines 3:4, descending <a href="/log/8/c">back to filelog</a>)
   </h3>
   
+  
   <form class="search" action="/log">
   
-  <p><input name="rev" id="search1" type="text" size="30" /></p>
+  <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
   <div id="hint">Find changesets by keywords (author, files, the commit message), revision
   number or hash, or <a href="/help/revsets">revset expression</a>.</div>
   </form>
--- a/tests/test-hgweb-removed.t	Fri Jun 09 23:56:50 2017 -0400
+++ b/tests/test-hgweb-removed.t	Fri Jun 09 13:59:13 2017 -0700
@@ -65,9 +65,10 @@
    <span class="tag">tip</span> 
   </h3>
   
+  
   <form class="search" action="/log">
   
-  <p><input name="rev" id="search1" type="text" size="30" /></p>
+  <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
   <div id="hint">Find changesets by keywords (author, files, the commit message), revision
   number or hash, or <a href="/help/revsets">revset expression</a>.</div>
   </form>
@@ -192,9 +193,10 @@
    <span class="tag">tip</span> 
   </h3>
   
+  
   <form class="search" action="/log">
-  <p></p>
-  <p><input name="rev" id="search1" type="text" size="30" /></p>
+  
+  <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
   <div id="hint">Find changesets by keywords (author, files, the commit message), revision
   number or hash, or <a href="/help/revsets">revset expression</a>.</div>
   </form>
--- a/tests/test-hgweb.t	Fri Jun 09 23:56:50 2017 -0400
+++ b/tests/test-hgweb.t	Fri Jun 09 13:59:13 2017 -0700
@@ -81,9 +81,10 @@
   <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
   <h3>error</h3>
   
+  
   <form class="search" action="/log">
   
-  <p><input name="rev" id="search1" type="text" size="30"></p>
+  <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
   <div id="hint">Find changesets by keywords (author, files, the commit message), revision
   number or hash, or <a href="/help/revsets">revset expression</a>.</div>
   </form>
@@ -188,9 +189,10 @@
   <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
   <h3>error</h3>
   
+  
   <form class="search" action="/log">
   
-  <p><input name="rev" id="search1" type="text" size="30"></p>
+  <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
   <div id="hint">Find changesets by keywords (author, files, the commit message), revision
   number or hash, or <a href="/help/revsets">revset expression</a>.</div>
   </form>
@@ -268,9 +270,10 @@
    <span class="tag">tip</span> <span class="tag">@</span> <span class="tag">a b c</span> <span class="tag">d/e/f</span> 
   </h3>
   
+  
   <form class="search" action="/log">
   
-  <p><input name="rev" id="search1" type="text" size="30" /></p>
+  <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
   <div id="hint">Find changesets by keywords (author, files, the commit message), revision
   number or hash, or <a href="/help/revsets">revset expression</a>.</div>
   </form>
--- a/tests/test-highlight.t	Fri Jun 09 23:56:50 2017 -0400
+++ b/tests/test-highlight.t	Fri Jun 09 13:59:13 2017 -0700
@@ -118,9 +118,10 @@
    <span class="tag">tip</span> 
   </h3>
   
+  
   <form class="search" action="/log">
   
-  <p><input name="rev" id="search1" type="text" size="30" /></p>
+  <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
   <div id="hint">Find changesets by keywords (author, files, the commit message), revision
   number or hash, or <a href="/help/revsets">revset expression</a>.</div>
   </form>
@@ -253,9 +254,10 @@
    <span class="tag">tip</span> 
   </h3>
   
+  
   <form class="search" action="/log">
   
-  <p><input name="rev" id="search1" type="text" size="30" /></p>
+  <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
   <div id="hint">Find changesets by keywords (author, files, the commit message), revision
   number or hash, or <a href="/help/revsets">revset expression</a>.</div>
   </form>