Patchwork [5,of,5] spartan: skip empty table cells in annotate view, use rowspan on block heads

login
register
mail settings
Submitter Anton Shestakov
Date July 14, 2016, 7:31 a.m.
Message ID <8a0f3344abaec09b4d4a.1468481490@neuro>
Download mbox | patch
Permalink /patch/15843/
State Accepted
Headers show

Comments

Anton Shestakov - July 14, 2016, 7:31 a.m.
# HG changeset patch
# User Anton Shestakov <av6@dwimlabs.net>
# Date 1468478472 -28800
#      Thu Jul 14 14:41:12 2016 +0800
# Node ID 8a0f3344abaec09b4d4a742718a358571f8e3126
# Parent  c48435e7d668adc05c4f2fd3ae4d8b8575639c54
spartan: skip empty table cells in annotate view, use rowspan on block heads
Pierre-Yves David - July 15, 2016, 9:40 a.m.
These are pushed, thanks.

On 07/14/2016 09:31 AM, Anton Shestakov wrote:
> # HG changeset patch
> # User Anton Shestakov <av6@dwimlabs.net>
> # Date 1468478472 -28800
> #      Thu Jul 14 14:41:12 2016 +0800
> # Node ID 8a0f3344abaec09b4d4a742718a358571f8e3126
> # Parent  c48435e7d668adc05c4f2fd3ae4d8b8575639c54
> spartan: skip empty table cells in annotate view, use rowspan on block heads

Patch

diff --git a/mercurial/templates/spartan/map b/mercurial/templates/spartan/map
--- a/mercurial/templates/spartan/map
+++ b/mercurial/templates/spartan/map
@@ -55,11 +55,11 @@  filelogentry = filelogentry.tmpl
 # all table rows have equal height.
 annotateline = '
   <tr class="parity{parity}{ifeq(node, originalnode, ' thisrev')}">
-    <td class="annotate">
-      {if(blockhead,
-          '<a href="{url|urlescape}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}#l{targetline}">
-             {rev}
-           </a>')}
+    {if(blockhead, '
+    <td class="annotate parity{blockparity}" rowspan="{rowspan}">
+      <a href="{url|urlescape}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}#l{targetline}">
+        {rev}
+      </a>
       <div class="annotate-info">
         <div>
           <a href="{url|urlescape}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}#l{targetline}">
@@ -72,6 +72,7 @@  annotateline = '
         <a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">changeset</a>
       </div>
     </td>
+    ')}
     <td>
       <a class="lineno" href="#{lineid}" id="{lineid}">{linenumber}</a>
     </td>