Patchwork [4,of,4] hgweb: fix diffstat links in paper/changeset.tmpl

login
register
mail settings
Submitter Anton Shestakov
Date Jan. 10, 2015, 1:41 p.m.
Message ID <3139b1029888d7b3fe8a.1420897305@neuro>
Download mbox | patch
Permalink /patch/7417/
State Accepted
Commit 0ab23a48b9a7b7622389d8393db3a68e4426d363
Headers show

Comments

Anton Shestakov - Jan. 10, 2015, 1:41 p.m.
# HG changeset patch
# User Anton Shestakov <engored@ya.ru>
# Date 1420884057 -28800
#      Sat Jan 10 18:00:57 2015 +0800
# Node ID 3139b1029888d7b3fe8acbd1d75c037799c97b81
# Parent  3d27e1c45903a509e450347cb716397261ede78b
hgweb: fix diffstat links in paper/changeset.tmpl

'<a .../>foo</a>' syntax is incorrect, since the first tag just "tries" to
close itself and then the actual content follows. It doesn't work, either
because web browsers know better than this or because there should be a
whitespace before /: '<a />'. So for the hgweb users the links looked
normal anyway, but now they are correct in code as well.
Matt Mackall - Jan. 13, 2015, 11:46 p.m.
On Sat, 2015-01-10 at 21:41 +0800, Anton Shestakov wrote:
> # HG changeset patch
> # User Anton Shestakov <engored@ya.ru>
> # Date 1420884057 -28800
> #      Sat Jan 10 18:00:57 2015 +0800
> # Node ID 3139b1029888d7b3fe8acbd1d75c037799c97b81
> # Parent  3d27e1c45903a509e450347cb716397261ede78b
> hgweb: fix diffstat links in paper/changeset.tmpl

These are queued for default, thanks.

Patch

diff --git a/mercurial/templates/paper/changeset.tmpl b/mercurial/templates/paper/changeset.tmpl
--- a/mercurial/templates/paper/changeset.tmpl
+++ b/mercurial/templates/paper/changeset.tmpl
@@ -65,9 +65,9 @@ 
   <th class="diffstat">diffstat</th>
   <td class="diffstat">
     {diffsummary}
-    <a id="diffstatexpand" href="javascript:toggleDiffstat()"/>[<tt>+</tt>]</a>
+    <a id="diffstatexpand" href="javascript:toggleDiffstat()">[<tt>+</tt>]</a>
     <div id="diffstatdetails" style="display:none;">
-      <a href="javascript:toggleDiffstat()"/>[<tt>-</tt>]</a>
+      <a href="javascript:toggleDiffstat()">[<tt>-</tt>]</a>
       <p></p>
       <table class="stripes2">{diffstat}</table>
     </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
@@ -891,9 +891,9 @@  Logs and changes
     <td class="diffstat">
        2 files changed, 2 insertions(+), 0 deletions(-)
   
-      <a id="diffstatexpand" href="javascript:toggleDiffstat()"/>[<tt>+</tt>]</a>
+      <a id="diffstatexpand" href="javascript:toggleDiffstat()">[<tt>+</tt>]</a>
       <div id="diffstatdetails" style="display:none;">
-        <a href="javascript:toggleDiffstat()"/>[<tt>-</tt>]</a>
+        <a href="javascript:toggleDiffstat()">[<tt>-</tt>]</a>
         <p></p>
         <table class="stripes2">  <tr>
       <td class="diffstat-file"><a href="#l1.1">da/foo</a></td>
diff --git a/tests/test-hgweb-diffs.t b/tests/test-hgweb-diffs.t
--- a/tests/test-hgweb-diffs.t
+++ b/tests/test-hgweb-diffs.t
@@ -115,9 +115,9 @@  revision
     <td class="diffstat">
        2 files changed, 2 insertions(+), 0 deletions(-)
   
-      <a id="diffstatexpand" href="javascript:toggleDiffstat()"/>[<tt>+</tt>]</a>
+      <a id="diffstatexpand" href="javascript:toggleDiffstat()">[<tt>+</tt>]</a>
       <div id="diffstatdetails" style="display:none;">
-        <a href="javascript:toggleDiffstat()"/>[<tt>-</tt>]</a>
+        <a href="javascript:toggleDiffstat()">[<tt>-</tt>]</a>
         <p></p>
         <table class="stripes2">  <tr>
       <td class="diffstat-file"><a href="#l1.1">a</a></td>
@@ -387,9 +387,9 @@  revision
     <td class="diffstat">
        2 files changed, 2 insertions(+), 0 deletions(-)
   
-      <a id="diffstatexpand" href="javascript:toggleDiffstat()"/>[<tt>+</tt>]</a>
+      <a id="diffstatexpand" href="javascript:toggleDiffstat()">[<tt>+</tt>]</a>
       <div id="diffstatdetails" style="display:none;">
-        <a href="javascript:toggleDiffstat()"/>[<tt>-</tt>]</a>
+        <a href="javascript:toggleDiffstat()">[<tt>-</tt>]</a>
         <p></p>
         <table class="stripes2">  <tr>
       <td class="diffstat-file"><a href="#l1.1">a</a></td>
diff --git a/tests/test-hgweb-removed.t b/tests/test-hgweb-removed.t
--- a/tests/test-hgweb-removed.t
+++ b/tests/test-hgweb-removed.t
@@ -96,9 +96,9 @@  revision
     <td class="diffstat">
        1 files changed, 0 insertions(+), 1 deletions(-)
   
-      <a id="diffstatexpand" href="javascript:toggleDiffstat()"/>[<tt>+</tt>]</a>
+      <a id="diffstatexpand" href="javascript:toggleDiffstat()">[<tt>+</tt>]</a>
       <div id="diffstatdetails" style="display:none;">
-        <a href="javascript:toggleDiffstat()"/>[<tt>-</tt>]</a>
+        <a href="javascript:toggleDiffstat()">[<tt>-</tt>]</a>
         <p></p>
         <table class="stripes2">  <tr>
       <td class="diffstat-file"><a href="#l1.1">a</a></td>