# HG changeset patch # User Gregory Szorc # Date 1497041953 25200 # Node ID cba4461aa0a0f238401b8062867dff7b5a6ecf45 # Parent d2acd99bbab34d88b0088e04aae784d170ce4703 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. diff -r d2acd99bbab3 -r cba4461aa0a0 mercurial/templates/paper/bookmarks.tmpl --- 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 @@

bookmarks

- +{searchform} diff -r d2acd99bbab3 -r cba4461aa0a0 mercurial/templates/paper/branches.tmpl --- 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 @@

branches

- -{sessionvars%hiddenformentry} -

-
{searchhint}
- +{searchform}
diff -r d2acd99bbab3 -r cba4461aa0a0 mercurial/templates/paper/changeset.tmpl --- 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} - -{sessionvars%hiddenformentry} -

-
{searchhint}
- +{searchform}
{desc|strip|escape|websub|nonempty}
diff -r d2acd99bbab3 -r cba4461aa0a0 mercurial/templates/paper/error.tmpl --- 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 @@

error

- -{sessionvars%hiddenformentry} -

-
{searchhint}
- +{searchform}

diff -r d2acd99bbab3 -r cba4461aa0a0 mercurial/templates/paper/fileannotate.tmpl --- 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} - -{sessionvars%hiddenformentry} -

-
{searchhint}
- +{searchform}
{desc|strip|escape|websub|nonempty}
diff -r d2acd99bbab3 -r cba4461aa0a0 mercurial/templates/paper/filecomparison.tmpl --- 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} - -

{sessionvars%hiddenformentry}

-

-
{searchhint}
- +{searchform}
{desc|strip|escape|websub|nonempty}
diff -r d2acd99bbab3 -r cba4461aa0a0 mercurial/templates/paper/filediff.tmpl --- 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} - -

{sessionvars%hiddenformentry}

-

-
{searchhint}
- +{searchform}
{desc|strip|escape|websub|nonempty}
diff -r d2acd99bbab3 -r cba4461aa0a0 mercurial/templates/paper/filelog.tmpl --- 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')} back to filelog)')} - -{sessionvars%hiddenformentry} -

-
{searchhint}
- +{searchform}
{topics % helpentry} diff -r d2acd99bbab3 -r cba4461aa0a0 mercurial/templates/paper/manifest.tmpl --- 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} - -{sessionvars%hiddenformentry} -

-
{searchhint}
- +{searchform}

Topics

diff -r d2acd99bbab3 -r cba4461aa0a0 mercurial/templates/paper/map --- 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 = '' breadcrumb = '> {name|escape} ' +searchform = ' + + {sessionvars%hiddenformentry} +

+
{searchhint}
+ ' searchhint = 'Find changesets by keywords (author, files, the commit message), revision number or hash, or revset expression.' diff -r d2acd99bbab3 -r cba4461aa0a0 mercurial/templates/paper/search.tmpl --- 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} instead.')}

- -{sessionvars%hiddenformentry} -

-
{searchhint}
- +{searchform}
diff -r d2acd99bbab3 -r cba4461aa0a0 tests/test-help.t --- 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 @@
+ -

+

Find changesets by keywords (author, files, the commit message), revision number or hash, or revset expression.
@@ -2509,7 +2510,7 @@ -

+

Find changesets by keywords (author, files, the commit message), revision number or hash, or revset expression.
@@ -2689,7 +2690,7 @@ -

+

Find changesets by keywords (author, files, the commit message), revision number or hash, or revset expression.
@@ -2890,7 +2891,7 @@ -

+

Find changesets by keywords (author, files, the commit message), revision number or hash, or revset expression.
@@ -2993,9 +2994,10 @@
+ -

+

Find changesets by keywords (author, files, the commit message), revision number or hash, or revset expression.
@@ -3100,7 +3102,7 @@ -

+

Find changesets by keywords (author, files, the commit message), revision number or hash, or revset expression.
diff -r d2acd99bbab3 -r cba4461aa0a0 tests/test-hgweb-commands.t --- 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 @@

log

+

@@ -882,9 +883,10 @@ 1.0 anotherthing + -

+

Find changesets by keywords (author, files, the commit message), revision number or hash, or revset expression.
@@ -1025,9 +1027,10 @@

+ -

+

Find changesets by keywords (author, files, the commit message), revision number or hash, or revset expression.
@@ -1312,9 +1315,10 @@ + -

+

Find changesets by keywords (author, files, the commit message), revision number or hash, or revset expression.
@@ -1440,9 +1444,10 @@ stable + -

+

Find changesets by keywords (author, files, the commit message), revision number or hash, or revset expression.
diff -r d2acd99bbab3 -r cba4461aa0a0 tests/test-hgweb-descend-empties.t --- 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 @@ tip + -

+

Find changesets by keywords (author, files, the commit message), revision number or hash, or revset expression.
@@ -195,9 +196,10 @@ tip + -

+

Find changesets by keywords (author, files, the commit message), revision number or hash, or revset expression.
diff -r d2acd99bbab3 -r cba4461aa0a0 tests/test-hgweb-diffs.t --- 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 @@ + -

+

Find changesets by keywords (author, files, the commit message), revision number or hash, or revset expression.
@@ -256,9 +257,10 @@ tip + -

-

+ +

Find changesets by keywords (author, files, the commit message), revision number or hash, or revset expression.
@@ -360,9 +362,10 @@ + -

+

Find changesets by keywords (author, files, the commit message), revision number or hash, or revset expression.
@@ -536,9 +539,10 @@ tip + -

-

+ +

Find changesets by keywords (author, files, the commit message), revision number or hash, or revset expression.
@@ -641,9 +645,10 @@ + -

-

+ +

Find changesets by keywords (author, files, the commit message), revision number or hash, or revset expression.
@@ -770,9 +775,10 @@ tip + -

-

+ +

Find changesets by keywords (author, files, the commit message), revision number or hash, or revset expression.
@@ -901,9 +907,10 @@ tip + -

-

+ +

Find changesets by keywords (author, files, the commit message), revision number or hash, or revset expression.
@@ -1038,9 +1045,10 @@ tip + -

-

+ +

Find changesets by keywords (author, files, the commit message), revision number or hash, or revset expression.
diff -r d2acd99bbab3 -r cba4461aa0a0 tests/test-hgweb-empty.t --- 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 @@

log

+

@@ -169,6 +170,7 @@

log

+

@@ -275,9 +277,10 @@

graph

+ -

+

Find changesets by keywords (author, files, the commit message), revision number or hash, or revset expression.
@@ -424,9 +427,10 @@ tip + -

+

Find changesets by keywords (author, files, the commit message), revision number or hash, or revset expression.
diff -r d2acd99bbab3 -r cba4461aa0a0 tests/test-hgweb-filelog.t --- 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 @@ + -

+

Find changesets by keywords (author, files, the commit message), revision number or hash, or revset expression.
@@ -315,9 +316,10 @@ + -

+

Find changesets by keywords (author, files, the commit message), revision number or hash, or revset expression.
@@ -437,9 +439,10 @@ + -

+

Find changesets by keywords (author, files, the commit message), revision number or hash, or revset expression.
@@ -550,9 +553,10 @@ + -

+

Find changesets by keywords (author, files, the commit message), revision number or hash, or revset expression.
@@ -639,9 +643,10 @@

error

+ -

+

Find changesets by keywords (author, files, the commit message), revision number or hash, or revset expression.
@@ -739,9 +744,10 @@ (following lines 1:2 back to filelog) + -

+

Find changesets by keywords (author, files, the commit message), revision number or hash, or revset expression.
@@ -858,9 +864,10 @@ (following lines 1:2 back to filelog) + -

+

Find changesets by keywords (author, files, the commit message), revision number or hash, or revset expression.
@@ -1094,9 +1101,10 @@ + -

+

Find changesets by keywords (author, files, the commit message), revision number or hash, or revset expression.
@@ -1375,9 +1383,10 @@ (following lines 3:4 back to filelog) + -

+

Find changesets by keywords (author, files, the commit message), revision number or hash, or revset expression.
@@ -1631,9 +1640,10 @@ (following lines 3:4, descending back to filelog) + -

+

Find changesets by keywords (author, files, the commit message), revision number or hash, or revset expression.
diff -r d2acd99bbab3 -r cba4461aa0a0 tests/test-hgweb-removed.t --- 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 @@ tip + -

+

Find changesets by keywords (author, files, the commit message), revision number or hash, or revset expression.
@@ -192,9 +193,10 @@ tip + -

-

+ +

Find changesets by keywords (author, files, the commit message), revision number or hash, or revset expression.
diff -r d2acd99bbab3 -r cba4461aa0a0 tests/test-hgweb.t --- 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 @@

error

+ -

+

Find changesets by keywords (author, files, the commit message), revision number or hash, or revset expression.
@@ -188,9 +189,10 @@

error

+ -

+

Find changesets by keywords (author, files, the commit message), revision number or hash, or revset expression.
@@ -268,9 +270,10 @@ tip @ a b c d/e/f + -

+

Find changesets by keywords (author, files, the commit message), revision number or hash, or revset expression.
diff -r d2acd99bbab3 -r cba4461aa0a0 tests/test-highlight.t --- 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 @@ tip + -

+

Find changesets by keywords (author, files, the commit message), revision number or hash, or revset expression.
@@ -253,9 +254,10 @@ tip + -

+

Find changesets by keywords (author, files, the commit message), revision number or hash, or revset expression.