2010-10-12 60 views

回答

1

我終於找到了一個solutionthe 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.