[PATCH] hgweb: clearly outline <tr> block in gitweb and spartan styles

Anton Shestakov engored at ya.ru
Sun May 10 09:22:35 CDT 2015


# HG changeset patch
# User Anton Shestakov <engored at ya.ru>
# Date 1431255734 -28800
#      Sun May 10 19:02:14 2015 +0800
# Node ID ac1e59d1911b5344dcd29efd8783f35daf38c0dd
# Parent  17ba4ccd20b48511b3d06ab47fb1b2faf31410d7
hgweb: clearly outline <tr> block in gitweb and spartan styles

It's easy to miss the closing </tr> tag when it's not on its own line. Some
neighboring blocks also already use this clearer style.

(In 03f692eee31d I didn't even think grepping for this, but this patch should
now cover every occurrence).

diff --git a/mercurial/templates/gitweb/fileannotate.tmpl b/mercurial/templates/gitweb/fileannotate.tmpl
--- a/mercurial/templates/gitweb/fileannotate.tmpl
+++ b/mercurial/templates/gitweb/fileannotate.tmpl
@@ -39,19 +39,23 @@ annotate |
 <table cellspacing="0">
 <tr>
  <td>author</td>
- <td>{author|obfuscate}</td></tr>
+ <td>{author|obfuscate}</td>
+</tr>
 <tr>
  <td></td>
- <td class="date age">{date|rfc822date}</td></tr>
+ <td class="date age">{date|rfc822date}</td>
+</tr>
 {branch%filerevbranch}
 <tr>
  <td>changeset {rev}</td>
- <td style="font-family:monospace"><a class="list" href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td></tr>
+ <td style="font-family:monospace"><a class="list" href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td>
+</tr>
 {parent%fileannotateparent}
 {child%fileannotatechild}
 <tr>
  <td>permissions</td>
- <td style="font-family:monospace">{permissions|permissions}</td></tr>
+ <td style="font-family:monospace">{permissions|permissions}</td>
+</tr>
 </table>
 </div>
 
diff --git a/mercurial/templates/gitweb/filecomparison.tmpl b/mercurial/templates/gitweb/filecomparison.tmpl
--- a/mercurial/templates/gitweb/filecomparison.tmpl
+++ b/mercurial/templates/gitweb/filecomparison.tmpl
@@ -39,7 +39,8 @@ comparison |
 {branch%filerevbranch}
 <tr>
  <td>changeset {rev}</td>
- <td style="font-family:monospace"><a class="list" href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td></tr>
+ <td style="font-family:monospace"><a class="list" href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td>
+</tr>
 {parent%filecompparent}
 {child%filecompchild}
 </table>
diff --git a/mercurial/templates/gitweb/filediff.tmpl b/mercurial/templates/gitweb/filediff.tmpl
--- a/mercurial/templates/gitweb/filediff.tmpl
+++ b/mercurial/templates/gitweb/filediff.tmpl
@@ -39,7 +39,8 @@ diff |
 {branch%filerevbranch}
 <tr>
  <td>changeset {rev}</td>
- <td style="font-family:monospace"><a class="list" href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td></tr>
+ <td style="font-family:monospace"><a class="list" href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td>
+</tr>
 {parent%filediffparent}
 {child%filediffchild}
 </table>
diff --git a/mercurial/templates/gitweb/filerevision.tmpl b/mercurial/templates/gitweb/filerevision.tmpl
--- a/mercurial/templates/gitweb/filerevision.tmpl
+++ b/mercurial/templates/gitweb/filerevision.tmpl
@@ -39,19 +39,23 @@ file |
 <table cellspacing="0">
 <tr>
  <td>author</td>
- <td>{author|obfuscate}</td></tr>
+ <td>{author|obfuscate}</td>
+</tr>
 <tr>
  <td></td>
- <td class="date age">{date|rfc822date}</td></tr>
+ <td class="date age">{date|rfc822date}</td>
+</tr>
 {branch%filerevbranch}
 <tr>
  <td>changeset {rev}</td>
- <td style="font-family:monospace"><a class="list" href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td></tr>
+ <td style="font-family:monospace"><a class="list" href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td>
+</tr>
 {parent%filerevparent}
 {child%filerevchild}
 <tr>
  <td>permissions</td>
- <td style="font-family:monospace">{permissions|permissions}</td></tr>
+ <td style="font-family:monospace">{permissions|permissions}</td>
+</tr>
 </table>
 </div>
 
diff --git a/mercurial/templates/spartan/fileannotate.tmpl b/mercurial/templates/spartan/fileannotate.tmpl
--- a/mercurial/templates/spartan/fileannotate.tmpl
+++ b/mercurial/templates/spartan/fileannotate.tmpl
@@ -22,12 +22,14 @@
 <table>
 <tr>
  <td class="metatag">changeset {rev}:</td>
- <td><a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td></tr>
+ <td><a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td>
+</tr>
 {parent%fileannotateparent}
 {child%fileannotatechild}
 <tr>
  <td class="metatag">author:</td>
- <td>{author|obfuscate}</td></tr>
+ <td>{author|obfuscate}</td>
+</tr>
 <tr>
  <td class="metatag">date:</td>
  <td class="date age">{date|rfc822date}</td>
diff --git a/mercurial/templates/spartan/filerevision.tmpl b/mercurial/templates/spartan/filerevision.tmpl
--- a/mercurial/templates/spartan/filerevision.tmpl
+++ b/mercurial/templates/spartan/filerevision.tmpl
@@ -22,18 +22,22 @@
 <table>
 <tr>
  <td class="metatag">changeset {rev}:</td>
- <td><a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td></tr>
+ <td><a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td>
+</tr>
 {parent%filerevparent}
 {child%filerevchild}
 <tr>
  <td class="metatag">author:</td>
- <td>{author|obfuscate}</td></tr>
+ <td>{author|obfuscate}</td>
+</tr>
 <tr>
  <td class="metatag">date:</td>
- <td class="date age">{date|rfc822date}</td></tr>
+ <td class="date age">{date|rfc822date}</td>
+</tr>
 <tr>
  <td class="metatag">permissions:</td>
- <td>{permissions|permissions}</td></tr>
+ <td>{permissions|permissions}</td>
+</tr>
 <tr>
   <td class="metatag">description:</td>
   <td>{desc|strip|escape|websub|addbreaks|nonempty}</td>


More information about the Mercurial-devel mailing list