[PATCH 1 of 8 stable] hgweb: add missing bookmarks templates to atom/rss styles

Yuya Nishihara yuya at tcha.org
Sun Apr 3 10:34:14 CDT 2011


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1301838799 -32400
# Branch stable
# Node ID 1046cb663776dae47104ef5907e3eee0dc0e4459
# Parent  f911b1de5fa0145b2413b39a96635b6167b7161c
hgweb: add missing bookmarks templates to atom/rss styles

It's already referenced from paper style.

diff --git a/mercurial/templates/atom/bookmarkentry.tmpl b/mercurial/templates/atom/bookmarkentry.tmpl
new file mode 100644
--- /dev/null
+++ b/mercurial/templates/atom/bookmarkentry.tmpl
@@ -0,0 +1,8 @@
+ <entry>
+  <title>{bookmark|escape}</title>
+  <link rel="alternate" href="{urlbase}{url}rev/{node|short}"/>
+  <id>{urlbase}{url}#bookmark-{node}</id>
+  <updated>{date|rfc3339date}</updated>
+  <published>{date|rfc3339date}</published>
+  <content type="text">{bookmark|strip|escape}</content>
+ </entry>
diff --git a/mercurial/templates/atom/bookmarks.tmpl b/mercurial/templates/atom/bookmarks.tmpl
new file mode 100644
--- /dev/null
+++ b/mercurial/templates/atom/bookmarks.tmpl
@@ -0,0 +1,11 @@
+{header}
+ <id>{urlbase}{url}</id>
+ <link rel="self" href="{urlbase}{url}atom-bookmarks"/>
+ <link rel="alternate" href="{urlbase}{url}bookmarks"/>
+ <title>{repo|escape}: bookmarks</title>
+ <summary>{repo|escape} bookmark history</summary>
+ <author><name>Mercurial SCM</name></author>
+ {latestentry%feedupdated}
+
+{entries%bookmarkentry}
+</feed>
diff --git a/mercurial/templates/atom/map b/mercurial/templates/atom/map
--- a/mercurial/templates/atom/map
+++ b/mercurial/templates/atom/map
@@ -8,4 +8,6 @@ filelog = filelog.tmpl
 filelogentry = filelogentry.tmpl
 tags = tags.tmpl
 tagentry = tagentry.tmpl
+bookmarks = bookmarks.tmpl
+bookmarkentry = bookmarkentry.tmpl
 error = error.tmpl
diff --git a/mercurial/templates/rss/bookmarkentry.tmpl b/mercurial/templates/rss/bookmarkentry.tmpl
new file mode 100644
--- /dev/null
+++ b/mercurial/templates/rss/bookmarkentry.tmpl
@@ -0,0 +1,6 @@
+<item>
+    <title>{bookmark|escape}</title>
+    <link>{urlbase}{url}rev/{node|short}</link>
+    <description><![CDATA[{bookmark|strip|escape|addbreaks}]]></description>
+    <pubDate>{date|rfc822date}</pubDate>
+</item>
diff --git a/mercurial/templates/rss/bookmarks.tmpl b/mercurial/templates/rss/bookmarks.tmpl
new file mode 100644
--- /dev/null
+++ b/mercurial/templates/rss/bookmarks.tmpl
@@ -0,0 +1,6 @@
+{header}
+    <title>{repo|escape}: bookmarks </title>
+    <description>{repo|escape} bookmark history</description>
+    {entries%bookmarkentry}
+  </channel>
+</rss>
diff --git a/mercurial/templates/rss/map b/mercurial/templates/rss/map
--- a/mercurial/templates/rss/map
+++ b/mercurial/templates/rss/map
@@ -7,4 +7,6 @@ filelog = filelog.tmpl
 filelogentry = filelogentry.tmpl
 tags = tags.tmpl
 tagentry = tagentry.tmpl
+bookmarks = bookmarks.tmpl
+bookmarkentry = bookmarkentry.tmpl
 error = error.tmpl


More information about the Mercurial-devel mailing list