乌龟Hg: 如何在推送到中央仓库时得到通知

5
我正在使用Mercurial进行版本控制。团队共享一个中央仓库,我们任何人都可以推送/拉取它。
其他用户向中央仓库推送内容时,我该如何收到通知?
我已尝试根据https://www.mercurial-scm.org/wiki/NotifyExtension编辑我的hgrc文件,如下所示:
    [extensions]
hgext.notify =

[hooks]
# Enable either changegroup or incoming.
# changegroup will send one email for each push,
# whereas incoming sends one email per changeset.
changegroup.notify = python:hgext.notify.hook
#incoming.notify = python:hgext.notify.hook

[email]
from = **myemailaddresshere**

[smtp]
host = localhost

# presently it is necessary to specify the baseurl for the notify
# extension to work. It can be a dummy value if your repo isn't
# available via http
[web]
baseurl = **http://repoip:port/**

[notify]
# multiple sources can be specified as a whitespace separated list
sources = serve push pull bundle
# set this to False when you're ready for mail to start sending
test = True

[reposubs]
* = **toemailaddresshere**

#config = /path/to/subscription/file
# you can override the changeset template here, if you want.
# If it doesn't start with \n it may confuse the email parser.
# here's an example that makes the changeset template look more like hg log:
template = \ndetails: {baseurl}{webroot}/rev/{node|short}\nchangeset: {rev}:{node|short}\nuser: {author}\ndate: {date|date}\ndescription:\n{desc}\n
maxdiff = 300 # max lines of diffs to include (0=none, -1=all)

然后我尝试推送一些更改。但这没有触发任何电子邮件。 请您检查我的.hgrc文件中的错误。


1
嗯,你搜索了什么?你是在寻找http://mercurial.selenic.com/wiki/NotifyExtension吗? - Patrick
还有许多其他扩展可供选择,http://mercurial.selenic.com/wiki/UsingExtensions。虽然不是所有扩展都与通知相关,但这是一个很好的浏览列表。 - Patrick
谢谢你的评论。我在搜索中看到了这个页面,但不清楚应该做什么。我编辑了我的hgrc文件,但没有发送任何通知。 - png
这个链接虽然对我很有用,但是它还是不能解决我的问题http://morecode.wordpress.com/2007/08/03/setting-up-mercurial-to-e-mail-on-a-commit/。 - png
抱歉,我已经更新了我的问题。希望现在更清楚了。很抱歉之前没有表达清楚。感谢您的回复。 - png
显示剩余3条评论
2个回答

1
您的Notify扩展已配置为测试模式。也许设置test = False会有所帮助?

0

templatemaxdiff应该在[notify]部分中。在您的示例中,它们位于[reposubs]部分中。

您可以使用hg help检查是否启用了通知扩展。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接