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 文件中有什么错误吗

4

2 回答 2

1

您的通知扩展程序配置为处于测试模式。也许设置test = False会有所帮助?

于 2012-07-27T16:50:40.763 回答
0

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

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

于 2013-06-13T09:42:07.007 回答