如何使Mercurial(hgwebdir)rss/atom提要显示分支名称

如何使Mercurial(hgwebdir)rss/atom提要显示分支名称,mercurial,rss,atom-feed,Mercurial,Rss,Atom Feed,我想配置Mercurial server安装,以便rss/atom提要除了标准字段(标题、guid、说明、作者、发布日期)外,还将发布变更集的分支名称。安装位置不同,但在ubuntu上,您可以找到相关文件/usr/share/mercurial/templates/atom/changelogentry.tmpl 一开始看起来像: <entry> <title>{desc|strip|firstline|strip|escape|nonempty}</titl

我想配置Mercurial server安装,以便rss/atom提要除了标准字段(标题、guid、说明、作者、发布日期)外,还将发布变更集的分支名称。

安装位置不同,但在ubuntu上,您可以找到相关文件
/usr/share/mercurial/templates/atom/changelogentry.tmpl

一开始看起来像:

 <entry>
  <title>{desc|strip|firstline|strip|escape|nonempty}</title>
  <id>{urlbase}{url}#changeset-{node}</id>
  <link href="{urlbase}{url}rev/{node|short}"/>
  <author>
   <name>{author|person|escape}</name>
   <email>{author|email|obfuscate}</email>
      </author>
  <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>
  </content>
 </entry>
我终于找到了一条新路

我必须像这样编辑模板\rss log\changelogentry.tmpl

<item>
  <title>{desc|strip|firstline|strip|escape}</title>
  <guid isPermaLink="true">{urlbase}{url}rev/{node|short}</guid>
  <description>
    <![CDATA[<i>{inbranch%branchname}{branches%branchname}</i>
    <p>{desc|strip|escape|addbreaks|nonempty}]]>
  </description>
  <files>{file_mods}</files>
  <author>{author|obfuscate}</author>
  <pubDate>{date|rfc822date}</pubDate>
</item>
<item>
  <title>{desc|strip|firstline|strip|escape}</title>
  <guid isPermaLink="true">{urlbase}{url}rev/{node|short}</guid>
  <description>
    <![CDATA[<i>{inbranch%branchname}{branches%branchname}</i>
    <p>{desc|strip|escape|addbreaks|nonempty}]]>
  </description>
  <files>{file_mods}</files>
  <author>{author|obfuscate}</author>
  <pubDate>{date|rfc822date}</pubDate>
</item>
branchname = '{name}'