我想配置我們的Mercurial服務器安裝,以便rss/atom feed將發佈變更集的分支名稱以及標準字段(標題,指導,描述,作者,pubDate)。如何使Mercurial(hgwebdir)rss/atom feed顯示分支名稱
3
A
回答
1
我終於找到了一個solution上the Mercurial mailing lists。
我不得不編輯模板\ 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>
我不得不添加下面一行到模板\ RSS,日誌\圖:
branchname = '{name}'
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. 使用sub-repo與hgwebdir困難在mercurial
- 2. Mercurial:權限被拒絕hgwebdir
- 3. 如何在IIS上設置Mercurial和hgwebdir?
- 4. 如何在`git log`中顯示分支的名稱?
- 5. 如何使用新分支名稱創建分支副本cvsd
- 6. 如何在我的PowerShell提示符中顯示當前的git分支名稱?
- 7. 標籤名稱的CVS分支名稱
- 8. 在終端中顯示分支名稱 - 意外輸出
- 9. 在新聞Feed中的圖標旁顯示應用名稱
- 10. 顯示的Git分支名稱不以屏幕
- 11. 顯示分支關鍵字/名稱RecyclerView + Firebase
- 12. Pycharm顯示當前分支名
- 13. Mercurial分支分支不顯示正確的hg服務或hg視圖
- 14. 如何配置Jenkins以顯示合併分支的名稱和提交
- 15. 如何獲取Jenkins多分支管道作業的顯示名稱
- 16. 如何在jenkinsfile中指定分支NOT(分支名稱)?
- 17. 顯示名稱未顯示
- 18. Mercurial關閉分支
- 19. Capistrano,Mercurial和分支
- 20. 瞭解Mercurial分支
- 21. Mercurial:分支版本?
- 22. mercurial如何確定分支不活動?
- 23. 如何找到命名的mercurial分支的父級?
- 24. git和分支名稱
- 25. 我如何更新與其他分支的mercurial分支
- 26. 在Mercurial中使用不同的「路徑」 - 也稱爲分支
- 27. 如何使用分支名稱知道分支是否已關閉?
- 28. Mercurial:列出所有未分支分支
- 29. 在ColdFusion中顯示XML Feed的部分
- 30. 從逗號分隔值顯示名稱