Bug 1051804 - Use |emailuser| rather than |user| for the annotate author
authorEd Morley <emorley@mozilla.com>
Tue, 12 Aug 2014 13:43:55 +0100
changeset 81 781a6d82af8c8439b07eaa83e4d84f355c8c95d9
parent 80 d11c2df08779a852e247c4a16d9c6ccc6c18e954
child 82 31fd65aa7c9915a62b1e7bc6206e729a6bc8f3fe
push id31
push useremorley@mozilla.com
push dateTue, 12 Aug 2014 17:26:29 +0000
bugs1051804
Bug 1051804 - Use |emailuser| rather than |user| for the annotate author For legacy reasons, the 'user' filter incorrectly turns email addresses of form 'a.b.surname@domain.org' into 'a'. Using 'emailuser' instead gives the entire part before the @, ie 'a.b.surname' - and so this patch means that on the hgweb annotate pages the author username shown for each line is less ambiguous. Requires Hg v2.2 or higher. See also: http://bz.selenic.com/show_bug.cgi?id=2276
gitweb_mozilla/map
gitweb_mozilla_pvt/map
--- a/gitweb_mozilla/map
+++ b/gitweb_mozilla/map
@@ -28,17 +28,17 @@ changeset = changeset.tmpl
 manifest = manifest.tmpl
 direntry = '<tr class="parity{parity}"><td style="font-family:monospace">drwxr-xr-x</td><td style="font-family:monospace"></td><td style="font-family:monospace"></td><td><a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">{basename|escape}</a></td><td class="link"><a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">files</a></td></tr>'
 fileentry = '<tr class="parity{parity}"><td style="font-family:monospace">{permissions|permissions}</td><td style="font-family:monospace" align=right>{date|isodate}</td><td style="font-family:monospace" align=right>{size}</td><td class="list"><a class="list" href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{basename|escape}</a></td><td class="link"><a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a> | <a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">revisions</a> | <a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a></td></tr>'
 filerevision = filerevision.tmpl
 fileannotate = fileannotate.tmpl
 filediff = filediff.tmpl
 filelog = filelog.tmpl
 fileline = '<div style="font-family:monospace" class="parity{parity}"><pre><a class="linenr" href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}</pre></div>'
-annotateline = '<div class="l{parity}"><div class="codeauthor"><a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}" title="{node|short}: {desc|escape|firstline}">{author|user|obfuscate}@{rev}</a></div><a class="codeline" href="#{lineid}" id="{lineid}">{linenumber}</a>{line|escape}</div>'
+annotateline = '<div class="l{parity}"><div class="codeauthor"><a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}" title="{node|short}: {desc|escape|firstline}">{author|emailuser|obfuscate}@{rev}</a></div><a class="codeline" href="#{lineid}" id="{lineid}">{linenumber}</a>{line|escape}</div>'
 difflineplus = '<span class="difflineplus"><a class="linenr" href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}</span>'
 difflineminus = '<span class="difflineminus"><a class="linenr" href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}</span>'
 difflineat = '<span class="difflineat"><a class="linenr" href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}</span>'
 diffline = '<a class="linenr" href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}'
 changelogparent = '<tr><th class="parent">parent {rev}:</th><td class="parent"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td></tr>'
 changesetbranch = '<tr><td>branch</td><td>{name}</td></tr>'
 changesetparent = '<tr><td>parent {rev}</td><td style="font-family:monospace"><a class="list" href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td></tr>'
 filerevbranch = '<tr><td>branch</td><td>{name}</td></tr>'
--- a/gitweb_mozilla_pvt/map
+++ b/gitweb_mozilla_pvt/map
@@ -22,17 +22,17 @@ changeset = changeset.tmpl
 manifest = manifest.tmpl
 direntry = '<tr class="parity{parity}"><td style="font-family:monospace">drwxr-xr-x</td><td style="font-family:monospace"></td><td style="font-family:monospace"></td><td><a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">{basename|escape}</a></td><td class="link"><a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">files</a></td></tr>'
 fileentry = '<tr class="parity{parity}"><td style="font-family:monospace">{permissions|permissions}</td><td style="font-family:monospace" align=right>{date|isodate}</td><td style="font-family:monospace" align=right>{size}</td><td class="list"><a class="list" href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{basename|escape}</a></td><td class="link"><a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a> | <a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">revisions</a> | <a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a></td></tr>'
 filerevision = filerevision.tmpl
 fileannotate = fileannotate.tmpl
 filediff = filediff.tmpl
 filelog = filelog.tmpl
 fileline = '<div style="font-family:monospace" class="parity{parity}"><pre><a class="linenr" href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}</pre></div>'
-annotateline = '<div class="l{parity}"><div class="codeauthor"><a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{author|user|obfuscate}@{rev}</a></div><a class="codeline" href="#{lineid}" id="{lineid}">{linenumber}</a>{line|escape}</div>'
+annotateline = '<div class="l{parity}"><div class="codeauthor"><a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{author|emailuser|obfuscate}@{rev}</a></div><a class="codeline" href="#{lineid}" id="{lineid}">{linenumber}</a>{line|escape}</div>'
 difflineplus = '<span class="difflineplus"><a class="linenr" href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}</span>'
 difflineminus = '<span class="difflineminus"><a class="linenr" href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}</span>'
 difflineat = '<span class="difflineat"><a class="linenr" href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}</span>'
 diffline = '<a class="linenr" href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}'
 changelogparent = '<tr><th class="parent">parent {rev}:</th><td class="parent"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td></tr>'
 changesetbranch = '<tr><td>branch</td><td>{name}</td></tr>'
 changesetparent = '<tr><td>parent {rev}</td><td style="font-family:monospace"><a class="list" href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td></tr>'
 filerevbranch = '<tr><td>branch</td><td>{name}</td></tr>'