[PATCH 2 of 2] templates: use filter 'stripquote' to display author's person

Yann E. MORIN yann.morin.1998 at free.fr
Wed Feb 29 23:39:28 UTC 2012


# HG changeset patch
# User "Yann E. MORIN" <yann.morin.1998 at free.fr>
# Date 1330377832 -3600
# Node ID 57ea1e5d0b6680ff088889344d25de0180ab2024
# Parent  03bbe66e40ad60efb9e9042cdd4d471d296941ff
templates: use filter 'stripquote' to display author's person

Use the 'stripquote' filter wherever a template references 'author|person'.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998 at free.fr>

diff --git a/contrib/perf.py b/contrib/perf.py
--- a/contrib/perf.py
+++ b/contrib/perf.py
@@ -114,7 +114,8 @@
     ui.pushbuffer()
     timer(lambda: commands.log(ui, repo, rev=[], date='', user='',
                                template='{date|shortdate} [{rev}:{node|short}]'
-                               ' {author|person}: {desc|firstline}\n'))
+                               ' {author|person|stripquote}:'
+                               ' {desc|firstline}\n'))
     ui.popbuffer()
 
 def perfdiffwd(ui, repo):
diff --git a/mercurial/templates/atom/changelogentry.tmpl b/mercurial/templates/atom/changelogentry.tmpl
--- a/mercurial/templates/atom/changelogentry.tmpl
+++ b/mercurial/templates/atom/changelogentry.tmpl
@@ -3,7 +3,7 @@
   <id>{urlbase}{url}#changeset-{node}</id>
   <link href="{urlbase}{url}rev/{node|short}"/>
   <author>
-   <name>{author|person|escape}</name>
+   <name>{author|person|stripquote|escape}</name>
    <email>{author|email|obfuscate}</email>
   </author>
   <updated>{date|rfc3339date}</updated>
diff --git a/mercurial/templates/gitweb/map b/mercurial/templates/gitweb/map
--- a/mercurial/templates/gitweb/map
+++ b/mercurial/templates/gitweb/map
@@ -229,7 +229,7 @@
 shortlogentry = '
   <tr class="parity{parity}">
     <td class="age"><i class="age">{date|rfc822date}</i></td>
-    <td><i>{author|person}</i></td>
+    <td><i>{author|person|stripquote}</i></td>
     <td>
       <a class="list" href="{url}rev/{node|short}{sessionvars%urlparameter}">
         <b>{desc|strip|firstline|escape|nonempty}</b>
diff --git a/mercurial/templates/map-cmdline.xml b/mercurial/templates/map-cmdline.xml
--- a/mercurial/templates/map-cmdline.xml
+++ b/mercurial/templates/map-cmdline.xml
@@ -1,9 +1,9 @@
 header = '<?xml version="1.0"?>\n<log>\n'
 footer = '</log>\n'
 
-changeset = '<logentry revision="{rev}" node="{node}">\n{branches}{bookmarks}{tags}{parents}<author email="{author|email|xmlescape}">{author|person|xmlescape}</author>\n<date>{date|rfc3339date}</date>\n<msg xml:space="preserve">{desc|xmlescape}</msg>\n</logentry>\n'
-changeset_verbose = '<logentry revision="{rev}" node="{node}">\n{branches}{bookmarks}{tags}{parents}<author email="{author|email|xmlescape}">{author|person|xmlescape}</author>\n<date>{date|rfc3339date}</date>\n<msg xml:space="preserve">{desc|xmlescape}</msg>\n<paths>\n{file_adds}{file_dels}{file_mods}</paths>\n{file_copies}</logentry>\n'
-changeset_debug = '<logentry revision="{rev}" node="{node}">\n{branches}{bookmarks}{tags}{parents}<author email="{author|email|xmlescape}">{author|person|xmlescape}</author>\n<date>{date|rfc3339date}</date>\n<msg xml:space="preserve">{desc|xmlescape}</msg>\n<paths>\n{file_adds}{file_dels}{file_mods}</paths>\n{file_copies}{extras}</logentry>\n'
+changeset = '<logentry revision="{rev}" node="{node}">\n{branches}{bookmarks}{tags}{parents}<author email="{author|email|xmlescape}">{author|person|stripquote|xmlescape}</author>\n<date>{date|rfc3339date}</date>\n<msg xml:space="preserve">{desc|xmlescape}</msg>\n</logentry>\n'
+changeset_verbose = '<logentry revision="{rev}" node="{node}">\n{branches}{bookmarks}{tags}{parents}<author email="{author|email|xmlescape}">{author|person|stripquote|xmlescape}</author>\n<date>{date|rfc3339date}</date>\n<msg xml:space="preserve">{desc|xmlescape}</msg>\n<paths>\n{file_adds}{file_dels}{file_mods}</paths>\n{file_copies}</logentry>\n'
+changeset_debug = '<logentry revision="{rev}" node="{node}">\n{branches}{bookmarks}{tags}{parents}<author email="{author|email|xmlescape}">{author|person|stripquote|xmlescape}</author>\n<date>{date|rfc3339date}</date>\n<msg xml:space="preserve">{desc|xmlescape}</msg>\n<paths>\n{file_adds}{file_dels}{file_mods}</paths>\n{file_copies}{extras}</logentry>\n'
 
 file_add  = '<path action="A">{file_add|xmlescape}</path>\n'
 file_mod  = '<path action="M">{file_mod|xmlescape}</path>\n'
diff --git a/mercurial/templates/monoblue/map b/mercurial/templates/monoblue/map
--- a/mercurial/templates/monoblue/map
+++ b/mercurial/templates/monoblue/map
@@ -197,7 +197,7 @@
 shortlogentry = '
   <tr class="parity{parity}">
     <td class="nowrap age">{date|rfc822date}</td>
-    <td>{author|person}</td>
+    <td>{author|person|stripquote}</td>
     <td>
       <a href="{url}rev/{node|short}{sessionvars%urlparameter}">
         {desc|strip|firstline|escape|nonempty}
diff --git a/mercurial/templates/paper/filelogentry.tmpl b/mercurial/templates/paper/filelogentry.tmpl
--- a/mercurial/templates/paper/filelogentry.tmpl
+++ b/mercurial/templates/paper/filelogentry.tmpl
@@ -1,5 +1,5 @@
  <tr class="parity{parity}">
   <td class="age">{date|rfc822date}</td>
-  <td class="author">{author|person}</td>
+  <td class="author">{author|person|stripquote}</td>
   <td class="description"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{desc|strip|firstline|escape|nonempty}</a>{inbranch%changelogbranchname}{branches%changelogbranchhead}{tags%changelogtag}{rename%filelogrename}</td>
  </tr>
diff --git a/mercurial/templates/paper/shortlogentry.tmpl b/mercurial/templates/paper/shortlogentry.tmpl
--- a/mercurial/templates/paper/shortlogentry.tmpl
+++ b/mercurial/templates/paper/shortlogentry.tmpl
@@ -1,5 +1,5 @@
  <tr class="parity{parity}">
   <td class="age">{date|rfc822date}</td>
-  <td class="author">{author|person}</td>
+  <td class="author">{author|person|stripquote}</td>
   <td class="description"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{desc|strip|firstline|escape|nonempty}</a>{inbranch%changelogbranchname}{branches%changelogbranchhead}{tags % '<span class="tag">{name|escape}</span> '}{bookmarks % '<span class="tag">{name|escape}</span> '}</td>
  </tr>
diff --git a/mercurial/templates/spartan/shortlogentry.tmpl b/mercurial/templates/spartan/shortlogentry.tmpl
--- a/mercurial/templates/spartan/shortlogentry.tmpl
+++ b/mercurial/templates/spartan/shortlogentry.tmpl
@@ -1,7 +1,7 @@
 <table class="slogEntry parity{parity}">
  <tr>
   <td class="age">{date|rfc822date}</td>
-  <td class="author">{author|person}</td>
+  <td class="author">{author|person|stripquote}</td>
   <td class="node"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{desc|strip|firstline|escape|nonempty}</a></td>
  </tr>
 </table>



More information about the Mercurial-devel mailing list