我想配置我们的Mercurial服务器安装,这样rss / atom feed将发布变更集的分支名称,以及标准字段(title,guid,description,author,pubDate)。
答案 0 :(得分:1)
安装位置不同,但在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>
您可以添加hg help templates
中找到的任何内容,包括:
branches String. The name of the branch on which the changeset was committed. Will be
empty if the branch name was default.
答案 1 :(得分:1)
我终于在solution上找到了the Mercurial mailing lists。
我必须像这样编辑 templates \ 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>
我必须将以下行添加到 templates \ rss-log \ map :
branchname = '{name}'