[PATCH STABLE] templates: fix broken "less" & "more" links in paper style (issue4460)

Anton Shestakov engored at ya.ru
Fri Nov 21 05:02:23 UTC 2014


# HG changeset patch
# User Anton Shestakov <engored at ya.ru>
# Date 1416549529 -28800
#      Fri Nov 21 13:58:49 2014 +0800
# Branch stable
# Node ID e776c7176726c10e0ef3adbdfd9fa1107eb304f0
# Parent  5ccced6eab0be9e3479e7981687c6a0ab937fa15
templates: fix broken "less" & "more" links in paper style (issue4460)

"/search", which is an invalid command in hgweb, was mistakenly used for
"[show] more [revsets]" and "[show] less [revsets]" links on search page in
templates "paper" (and those which inherit paper, such as coal) before and
worked fine until 6e1fbcb18a75, which made hgweb more strict about invalid
commands.

diff --git a/mercurial/templates/paper/search.tmpl b/mercurial/templates/paper/search.tmpl
--- a/mercurial/templates/paper/search.tmpl
+++ b/mercurial/templates/paper/search.tmpl
@@ -38,8 +38,8 @@ Use {showunforcekw}</a> instead.')}
 </form>
 
 <div class="navigate">
-<a href="{url|urlescape}search/{lessvars%urlparameter}">less</a>
-<a href="{url|urlescape}search/{morevars%urlparameter}">more</a>
+<a href="{url|urlescape}log{lessvars%urlparameter}">less</a>
+<a href="{url|urlescape}log{morevars%urlparameter}">more</a>
 </div>
 
 <table class="bigtable">
@@ -54,8 +54,8 @@ Use {showunforcekw}</a> instead.')}
 </table>
 
 <div class="navigate">
-<a href="{url|urlescape}search/{lessvars%urlparameter}">less</a>
-<a href="{url|urlescape}search/{morevars%urlparameter}">more</a>
+<a href="{url|urlescape}log{lessvars%urlparameter}">less</a>
+<a href="{url|urlescape}log{morevars%urlparameter}">more</a>
 </div>
 
 </div>
diff --git a/tests/test-hgweb-commands.t b/tests/test-hgweb-commands.t
--- a/tests/test-hgweb-commands.t
+++ b/tests/test-hgweb-commands.t
@@ -1007,8 +1007,8 @@ Logs and changes
   </form>
   
   <div class="navigate">
-  <a href="/search/?rev=base&revcount=5">less</a>
-  <a href="/search/?rev=base&revcount=20">more</a>
+  <a href="/log?rev=base&revcount=5">less</a>
+  <a href="/log?rev=base&revcount=20">more</a>
   </div>
   
   <table class="bigtable">
@@ -1028,8 +1028,8 @@ Logs and changes
   </table>
   
   <div class="navigate">
-  <a href="/search/?rev=base&revcount=5">less</a>
-  <a href="/search/?rev=base&revcount=20">more</a>
+  <a href="/log?rev=base&revcount=5">less</a>
+  <a href="/log?rev=base&revcount=20">more</a>
   </div>
   
   </div>


More information about the Mercurial-devel mailing list