Patchwork hgweb: adding branch, tags, bookmarks, and file list to atom feed entries

login
register
mail settings
Submitter Jensen, Aaron
Date April 16, 2014, 4:32 p.m.
Message ID <19C008641EA0254BA2D9501B558E4A583B577FBB@EXMBX01L-CRP-04.webmdhealth.net>
Download mbox | patch
Permalink /patch/4386/
State Deferred
Headers show

Comments

Jensen, Aaron - April 16, 2014, 4:32 p.m.
# HG changeset patch
# User Aaron Jensen <ajensen@webmd.net>
# Date 1397665897 25200
# Node ID 7407758ed13254b6488aee0050285e9eb8d6b9f9
# Parent  d0cc92ba0406cb2b766165d7d82909287564f9ce
hgweb: adding branch, tags, bookmarks, user, and file list to atom feed entries.

Patch

diff -r d0cc92ba0406 -r 7407758ed132 mercurial/templates/atom/changelogentry.tmpl
--- a/mercurial/templates/atom/changelogentry.tmpl	Tue Apr 15 17:51:27 2014 -0400
+++ b/mercurial/templates/atom/changelogentry.tmpl	Wed Apr 16 09:31:37 2014 -0700
@@ -1,5 +1,5 @@ 
  <entry>
-  <title>{desc|strip|firstline|strip|escape|nonempty}</title>
+  <title>{branches%"{if(name, '[{name|escape}] ')}"}{desc|strip|firstline|strip|escape|nonempty}</title>
   <id>{urlbase}{url|urlescape}#changeset-{node}</id>
   <link href="{urlbase}{url|urlescape}rev/{node|short}"/>
   <author>
@@ -9,8 +9,35 @@ 
   <updated>{date|rfc3339date}</updated>
   <published>{date|rfc3339date}</published>
   <content type="xhtml">
-   <div xmlns="http://www.w3.org/1999/xhtml">
-    <pre xml:space="preserve">{desc|escape|nonempty}</pre>
-   </div>
+	<table xmlns="http://www.w3.org/1999/xhtml">
+	<tr>
+		<th style="text-align:left;">changeset</th>
+		<td>{node|short}</td>
+	</tr>
+	<tr>
+		<th style="text-align:left;">branch</th>
+		<td>{branches%"{name|escape}"}</td>
+	</tr>
+	<tr>
+		<th style="text-align:left;">bookmark</th>
+		<td>{bookmarks%"{name|escape}"}</td>
+	</tr>
+	<tr>
+		<th style="text-align:left;">tag</th>
+		<td>{tags%"{name|escape}"}</td>
+	</tr>
+	<tr>
+		<th style="text-align:left;">user</th>
+		<td>{author|obfuscate}</td>
+	</tr>
+	<tr>
+		<th style="text-align:left;vertical-align:top;">description</th>
+		<td>{desc|strip|escape|addbreaks|nonempty}</td>
+	</tr>
+	<tr>
+		<th style="text-align:left;vertical-align:top;">files</th>
+		<td>{files}</td>
+	</tr>
+	</table>
   </content>
  </entry>
diff -r d0cc92ba0406 -r 7407758ed132 mercurial/templates/atom/map
--- a/mercurial/templates/atom/map	Tue Apr 15 17:51:27 2014 -0400
+++ b/mercurial/templates/atom/map	Wed Apr 16 09:31:37 2014 -0700
@@ -13,3 +13,7 @@ 
 branches = branches.tmpl
 branchentry = branchentry.tmpl
 error = error.tmpl
+filedifflink = '{file|escape}<br />'
+fileellipses = '{file|escape}<br />'
+filenodelink = '{file|escape}<br />'
+filenolink = '{file|escape}<br />'