Mercurial不会发送电子邮件

时间:2011-01-28 23:57:12

标签: mercurial

当我提交代码时,我正试图让Windows上的Mercurial发送电子邮件。 Mercurial.ini文件包含

[ui]
username = PherricOxide

[tortoisehg]
ui.language = en
summarylen = 70
messagewrap = 80
closeci = False
engmsg = True
statustab = 0

[extensions]
hgext.notify =

[hooks]
changegroup.notify = python:hgext.notify.hook
incoming.notify = python:hgext.notify.hook

[email]
from = repository@company.com

[smtp]
host = inetmail.company.net

[web]
baseurl = http://dev/...

[notify]
sources = serve push pull bundle
test = True
config = \temp\subscription.conf
template = \ndetails:   {baseurl}{webroot}/rev/{node|short}\nchangeset: {rev}:{node|short}\nuser:      {author}\ndate:      {date|date}\ndescription:\n{desc}\n
maxdiff = 300

但是,它从不打印任何test = True或发送任何test = False。

推送显示,

C:\test>hg push -v \test2
pushing to \test2
searching for changes
1 changesets found
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files
calling hook changegroup.notify: hgext.notify.hook
calling hook incoming.notify: hgext.notify.hook

提交似乎根本没有触发钩子,

C:\test>hg -v commit -m "test"
test.txt
committed changeset 11:a4ed0680b183

有没有更多Mercurial技能的人对我为什么看起来破碎有任何想法?

1 个答案:

答案 0 :(得分:1)

提交不会触发挂钩,只会推送到存储库,这就是changegroupincoming所做的事情。你可能只想要其中一个。

\temp\subscription.conf档案中有什么内容?如果该文件中的[reposubs][usersubs]条目丢失/错误,您将不会收到任何电子邮件。