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

login
register
mail settings
Submitter Anton Shestakov
Date Nov. 21, 2014, 5:02 a.m.
Message ID <e776c7176726c10e0ef3.1416549743@neuro>
Download mbox | patch
Permalink /patch/6819/
State Accepted
Commit c00b156d6e76d92d4488e638e9245e881f749370
Headers show

Comments

Anton Shestakov - Nov. 21, 2014, 5:02 a.m.
# HG changeset patch
# User Anton Shestakov <engored@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.
Matt Mackall - Nov. 22, 2014, 1:12 a.m.
On Fri, 2014-11-21 at 14:02 +0900, Anton Shestakov wrote:
> # HG changeset patch
> # User Anton Shestakov <engored@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)

Excellent, queued for stable.

Patch

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>