Patchwork [3,of,4] hgweb: move author information from left-column to hover-box in annotate view

login
register
mail settings
Submitter Denis Laxalde
Date July 12, 2016, 3:34 p.m.
Message ID <a8d07ecd0c12b14d4aab.1468337675@sh77.tls.logilab.fr>
Download mbox | patch
Permalink /patch/15800/
State Accepted
Headers show

Comments

Denis Laxalde - July 12, 2016, 3:34 p.m.
# HG changeset patch
# User Denis Laxalde <denis.laxalde@logilab.fr>
# Date 1468328857 -7200
#      Tue Jul 12 15:07:37 2016 +0200
# Node ID a8d07ecd0c12b14d4aabca514c7dbc574b699d31
# Parent  21daf37cb66fef8469c4a313ffc03e93981d6c38
hgweb: move author information from left-column to hover-box in annotate view

And display the full author information since there is enough space there.

Patch

diff --git a/mercurial/templates/gitweb/map b/mercurial/templates/gitweb/map
--- a/mercurial/templates/gitweb/map
+++ b/mercurial/templates/gitweb/map
@@ -99,10 +99,11 @@  annotateline = '
     <td class="annotate linenr" style="text-align: right;">
       {if(blockhead,
           '<a href="{url|urlescape}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}#l{targetline}">
-             {author|user}@{rev}
+             {rev}
            </a>')}
       <div class="annotate-info">
         <div>{node|short}: {desc|escape|firstline}</div>
+        <div><em>{author|obfuscate}</em></div>
         <div>parents: {parents%annotateparent}</div>
         <a href="{url|urlescape}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a>
         <a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">changeset</a>
diff --git a/mercurial/templates/monoblue/map b/mercurial/templates/monoblue/map
--- a/mercurial/templates/monoblue/map
+++ b/mercurial/templates/monoblue/map
@@ -95,10 +95,11 @@  annotateline = '
     <td class="annotate linenr">
       {if(blockhead,
           '<a href="{url|urlescape}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}#l{targetline}">
-             {author|user}@{rev}
+             {rev}
            </a>')}
       <div class="annotate-info">
         <div>{node|short}: {desc|escape|firstline}</div>
+        <div><em>{author|obfuscate}</em></div>
         <div>parents: {parents%annotateparent}</div>
         <a href="{url|urlescape}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a>
         <a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">changeset</a>
diff --git a/mercurial/templates/paper/map b/mercurial/templates/paper/map
--- a/mercurial/templates/paper/map
+++ b/mercurial/templates/paper/map
@@ -80,10 +80,11 @@  annotateline = '
     <td class="annotate">
       {if(blockhead,
           '<a href="{url|urlescape}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}#l{targetline}">
-             {author|user}@{rev}
+             {rev}
            </a>')}
       <div class="annotate-info">
         <div>{node|short}: {desc|escape|firstline}</div>
+        <div><em>{author|obfuscate}</em></div>
         <div>parents: {parents%annotateparent}</div>
         <a href="{url|urlescape}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a>
         <a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">changeset</a>
diff --git a/mercurial/templates/spartan/map b/mercurial/templates/spartan/map
--- a/mercurial/templates/spartan/map
+++ b/mercurial/templates/spartan/map
@@ -58,10 +58,11 @@  annotateline = '
     <td class="annotate">
       {if(blockhead,
           '<a href="{url|urlescape}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}#l{targetline}">
-             {author|user}@{rev}
+             {rev}
            </a>')}
       <div class="annotate-info">
         <div>{node|short}: {desc|escape|firstline}</div>
+        <div><em>{author|obfuscate}</em></div>
         <div>parents: {parents%annotateparent}</div>
         <a href="{url|urlescape}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a>
         <a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">changeset</a>
diff --git a/tests/test-highlight.t b/tests/test-highlight.t
--- a/tests/test-highlight.t
+++ b/tests/test-highlight.t
@@ -291,10 +291,11 @@  hgweb fileannotate, html
   <tr id="l1" class="thisrev">
   <td class="annotate">
   <a href="/annotate/06824edf55d0/primes.py#l1">
-  test@0
+  0
   </a>
   <div class="annotate-info">
   <div>06824edf55d0: a</div>
+  <div><em>&#116;&#101;&#115;&#116;</em></div>
   <div>parents: </div>
   <a href="/diff/06824edf55d0/primes.py">diff</a>
   <a href="/rev/06824edf55d0">changeset</a>
@@ -307,6 +308,7 @@  hgweb fileannotate, html
   
   <div class="annotate-info">
   <div>06824edf55d0: a</div>
+  <div><em>&#116;&#101;&#115;&#116;</em></div>
   <div>parents: </div>
   <a href="/diff/06824edf55d0/primes.py">diff</a>
   <a href="/rev/06824edf55d0">changeset</a>
@@ -319,6 +321,7 @@  hgweb fileannotate, html
   
   <div class="annotate-info">
   <div>06824edf55d0: a</div>
+  <div><em>&#116;&#101;&#115;&#116;</em></div>
   <div>parents: </div>
   <a href="/diff/06824edf55d0/primes.py">diff</a>
   <a href="/rev/06824edf55d0">changeset</a>
@@ -331,6 +334,7 @@  hgweb fileannotate, html
   
   <div class="annotate-info">
   <div>06824edf55d0: a</div>
+  <div><em>&#116;&#101;&#115;&#116;</em></div>
   <div>parents: </div>
   <a href="/diff/06824edf55d0/primes.py">diff</a>
   <a href="/rev/06824edf55d0">changeset</a>
@@ -343,6 +347,7 @@  hgweb fileannotate, html
   
   <div class="annotate-info">
   <div>06824edf55d0: a</div>
+  <div><em>&#116;&#101;&#115;&#116;</em></div>
   <div>parents: </div>
   <a href="/diff/06824edf55d0/primes.py">diff</a>
   <a href="/rev/06824edf55d0">changeset</a>
@@ -355,6 +360,7 @@  hgweb fileannotate, html
   
   <div class="annotate-info">
   <div>06824edf55d0: a</div>
+  <div><em>&#116;&#101;&#115;&#116;</em></div>
   <div>parents: </div>
   <a href="/diff/06824edf55d0/primes.py">diff</a>
   <a href="/rev/06824edf55d0">changeset</a>
@@ -367,6 +373,7 @@  hgweb fileannotate, html
   
   <div class="annotate-info">
   <div>06824edf55d0: a</div>
+  <div><em>&#116;&#101;&#115;&#116;</em></div>
   <div>parents: </div>
   <a href="/diff/06824edf55d0/primes.py">diff</a>
   <a href="/rev/06824edf55d0">changeset</a>
@@ -379,6 +386,7 @@  hgweb fileannotate, html
   
   <div class="annotate-info">
   <div>06824edf55d0: a</div>
+  <div><em>&#116;&#101;&#115;&#116;</em></div>
   <div>parents: </div>
   <a href="/diff/06824edf55d0/primes.py">diff</a>
   <a href="/rev/06824edf55d0">changeset</a>
@@ -391,6 +399,7 @@  hgweb fileannotate, html
   
   <div class="annotate-info">
   <div>06824edf55d0: a</div>
+  <div><em>&#116;&#101;&#115;&#116;</em></div>
   <div>parents: </div>
   <a href="/diff/06824edf55d0/primes.py">diff</a>
   <a href="/rev/06824edf55d0">changeset</a>
@@ -403,6 +412,7 @@  hgweb fileannotate, html
   
   <div class="annotate-info">
   <div>06824edf55d0: a</div>
+  <div><em>&#116;&#101;&#115;&#116;</em></div>
   <div>parents: </div>
   <a href="/diff/06824edf55d0/primes.py">diff</a>
   <a href="/rev/06824edf55d0">changeset</a>
@@ -415,6 +425,7 @@  hgweb fileannotate, html
   
   <div class="annotate-info">
   <div>06824edf55d0: a</div>
+  <div><em>&#116;&#101;&#115;&#116;</em></div>
   <div>parents: </div>
   <a href="/diff/06824edf55d0/primes.py">diff</a>
   <a href="/rev/06824edf55d0">changeset</a>
@@ -427,6 +438,7 @@  hgweb fileannotate, html
   
   <div class="annotate-info">
   <div>06824edf55d0: a</div>
+  <div><em>&#116;&#101;&#115;&#116;</em></div>
   <div>parents: </div>
   <a href="/diff/06824edf55d0/primes.py">diff</a>
   <a href="/rev/06824edf55d0">changeset</a>
@@ -439,6 +451,7 @@  hgweb fileannotate, html
   
   <div class="annotate-info">
   <div>06824edf55d0: a</div>
+  <div><em>&#116;&#101;&#115;&#116;</em></div>
   <div>parents: </div>
   <a href="/diff/06824edf55d0/primes.py">diff</a>
   <a href="/rev/06824edf55d0">changeset</a>
@@ -451,6 +464,7 @@  hgweb fileannotate, html
   
   <div class="annotate-info">
   <div>06824edf55d0: a</div>
+  <div><em>&#116;&#101;&#115;&#116;</em></div>
   <div>parents: </div>
   <a href="/diff/06824edf55d0/primes.py">diff</a>
   <a href="/rev/06824edf55d0">changeset</a>
@@ -463,6 +477,7 @@  hgweb fileannotate, html
   
   <div class="annotate-info">
   <div>06824edf55d0: a</div>
+  <div><em>&#116;&#101;&#115;&#116;</em></div>
   <div>parents: </div>
   <a href="/diff/06824edf55d0/primes.py">diff</a>
   <a href="/rev/06824edf55d0">changeset</a>
@@ -475,6 +490,7 @@  hgweb fileannotate, html
   
   <div class="annotate-info">
   <div>06824edf55d0: a</div>
+  <div><em>&#116;&#101;&#115;&#116;</em></div>
   <div>parents: </div>
   <a href="/diff/06824edf55d0/primes.py">diff</a>
   <a href="/rev/06824edf55d0">changeset</a>
@@ -487,6 +503,7 @@  hgweb fileannotate, html
   
   <div class="annotate-info">
   <div>06824edf55d0: a</div>
+  <div><em>&#116;&#101;&#115;&#116;</em></div>
   <div>parents: </div>
   <a href="/diff/06824edf55d0/primes.py">diff</a>
   <a href="/rev/06824edf55d0">changeset</a>
@@ -499,6 +516,7 @@  hgweb fileannotate, html
   
   <div class="annotate-info">
   <div>06824edf55d0: a</div>
+  <div><em>&#116;&#101;&#115;&#116;</em></div>
   <div>parents: </div>
   <a href="/diff/06824edf55d0/primes.py">diff</a>
   <a href="/rev/06824edf55d0">changeset</a>
@@ -511,6 +529,7 @@  hgweb fileannotate, html
   
   <div class="annotate-info">
   <div>06824edf55d0: a</div>
+  <div><em>&#116;&#101;&#115;&#116;</em></div>
   <div>parents: </div>
   <a href="/diff/06824edf55d0/primes.py">diff</a>
   <a href="/rev/06824edf55d0">changeset</a>
@@ -523,6 +542,7 @@  hgweb fileannotate, html
   
   <div class="annotate-info">
   <div>06824edf55d0: a</div>
+  <div><em>&#116;&#101;&#115;&#116;</em></div>
   <div>parents: </div>
   <a href="/diff/06824edf55d0/primes.py">diff</a>
   <a href="/rev/06824edf55d0">changeset</a>
@@ -535,6 +555,7 @@  hgweb fileannotate, html
   
   <div class="annotate-info">
   <div>06824edf55d0: a</div>
+  <div><em>&#116;&#101;&#115;&#116;</em></div>
   <div>parents: </div>
   <a href="/diff/06824edf55d0/primes.py">diff</a>
   <a href="/rev/06824edf55d0">changeset</a>
@@ -547,6 +568,7 @@  hgweb fileannotate, html
   
   <div class="annotate-info">
   <div>06824edf55d0: a</div>
+  <div><em>&#116;&#101;&#115;&#116;</em></div>
   <div>parents: </div>
   <a href="/diff/06824edf55d0/primes.py">diff</a>
   <a href="/rev/06824edf55d0">changeset</a>
@@ -559,6 +581,7 @@  hgweb fileannotate, html
   
   <div class="annotate-info">
   <div>06824edf55d0: a</div>
+  <div><em>&#116;&#101;&#115;&#116;</em></div>
   <div>parents: </div>
   <a href="/diff/06824edf55d0/primes.py">diff</a>
   <a href="/rev/06824edf55d0">changeset</a>
@@ -571,6 +594,7 @@  hgweb fileannotate, html
   
   <div class="annotate-info">
   <div>06824edf55d0: a</div>
+  <div><em>&#116;&#101;&#115;&#116;</em></div>
   <div>parents: </div>
   <a href="/diff/06824edf55d0/primes.py">diff</a>
   <a href="/rev/06824edf55d0">changeset</a>
@@ -583,6 +607,7 @@  hgweb fileannotate, html
   
   <div class="annotate-info">
   <div>06824edf55d0: a</div>
+  <div><em>&#116;&#101;&#115;&#116;</em></div>
   <div>parents: </div>
   <a href="/diff/06824edf55d0/primes.py">diff</a>
   <a href="/rev/06824edf55d0">changeset</a>
@@ -595,6 +620,7 @@  hgweb fileannotate, html
   
   <div class="annotate-info">
   <div>06824edf55d0: a</div>
+  <div><em>&#116;&#101;&#115;&#116;</em></div>
   <div>parents: </div>
   <a href="/diff/06824edf55d0/primes.py">diff</a>
   <a href="/rev/06824edf55d0">changeset</a>
@@ -607,6 +633,7 @@  hgweb fileannotate, html
   
   <div class="annotate-info">
   <div>06824edf55d0: a</div>
+  <div><em>&#116;&#101;&#115;&#116;</em></div>
   <div>parents: </div>
   <a href="/diff/06824edf55d0/primes.py">diff</a>
   <a href="/rev/06824edf55d0">changeset</a>
@@ -619,6 +646,7 @@  hgweb fileannotate, html
   
   <div class="annotate-info">
   <div>06824edf55d0: a</div>
+  <div><em>&#116;&#101;&#115;&#116;</em></div>
   <div>parents: </div>
   <a href="/diff/06824edf55d0/primes.py">diff</a>
   <a href="/rev/06824edf55d0">changeset</a>
@@ -631,6 +659,7 @@  hgweb fileannotate, html
   
   <div class="annotate-info">
   <div>06824edf55d0: a</div>
+  <div><em>&#116;&#101;&#115;&#116;</em></div>
   <div>parents: </div>
   <a href="/diff/06824edf55d0/primes.py">diff</a>
   <a href="/rev/06824edf55d0">changeset</a>
@@ -643,6 +672,7 @@  hgweb fileannotate, html
   
   <div class="annotate-info">
   <div>06824edf55d0: a</div>
+  <div><em>&#116;&#101;&#115;&#116;</em></div>
   <div>parents: </div>
   <a href="/diff/06824edf55d0/primes.py">diff</a>
   <a href="/rev/06824edf55d0">changeset</a>
@@ -655,6 +685,7 @@  hgweb fileannotate, html
   
   <div class="annotate-info">
   <div>06824edf55d0: a</div>
+  <div><em>&#116;&#101;&#115;&#116;</em></div>
   <div>parents: </div>
   <a href="/diff/06824edf55d0/primes.py">diff</a>
   <a href="/rev/06824edf55d0">changeset</a>
@@ -667,6 +698,7 @@  hgweb fileannotate, html
   
   <div class="annotate-info">
   <div>06824edf55d0: a</div>
+  <div><em>&#116;&#101;&#115;&#116;</em></div>
   <div>parents: </div>
   <a href="/diff/06824edf55d0/primes.py">diff</a>
   <a href="/rev/06824edf55d0">changeset</a>
@@ -679,6 +711,7 @@  hgweb fileannotate, html
   
   <div class="annotate-info">
   <div>06824edf55d0: a</div>
+  <div><em>&#116;&#101;&#115;&#116;</em></div>
   <div>parents: </div>
   <a href="/diff/06824edf55d0/primes.py">diff</a>
   <a href="/rev/06824edf55d0">changeset</a>