【问题标题】:Fix email subject on windows hosted Hg server notifications修复 Windows 托管 Hg 服务器通知上的电子邮件主题
【发布时间】:2013-01-18 06:51:26
【问题描述】:

我按照此处的说明获取托管在 IIS7 中的 Mercurial 服务器:

http://www.firegarden.com/software/hosting-mercurial-repo-iis7-windows-server-2008r2-x64-python-isapi-cgi

效果很好,发送干净的 url 和通知,并根据模板格式化:

 [notify]
 sources = serve push pull bundle
 template = 
    details:   {baseurl}/rev/{node|short}

最终看起来像这样:

 -----Original Message-----
 From: mercurial@mydomain.net
 Sent: Thursday, January 17, 2013 10:42 PM
 To: Me
 Subject: D:/hg/Repositories/test: Again

 details:   http://hg.mydomain.net/test/rev/561563d3847e

但请注意,主题中有 Windows 驱动器号,而不是 url http://hg.mydomain.net/test/

有没有办法修复它,使其显示 URL 而不是驱动器号?或者可能不是 url,而只是显示存储库?

【问题讨论】:

    标签: windows mercurial hgrc


    【解决方案1】:

    Notify extension 中名为 strip 的属性将帮助您做您想做的事。您可以在主题行中去掉存储库的前导根。

    【讨论】:

    • 这似乎是目前唯一的选择。希望有 URL 而不是仅仅剥离一定数量的根。
    【解决方案2】:

    也许您应该在模板配置中定义Subject 部分?更多信息请参考this chapter

    【讨论】:

    • 我遵循了那个例子,但它不起作用。添加“主题:...”文本只是将该文本放入电子邮件正文中,但不会调整电子邮件的主题。
    猜你喜欢
    • 1970-01-01
    • 2020-05-04
    • 1970-01-01
    • 1970-01-01
    • 2010-09-21
    • 1970-01-01
    • 2012-04-04
    • 1970-01-01
    • 2018-11-25
    相关资源
    最近更新 更多