我使用版本控制程序mercurial
发布了一个存储库。更具体地说,我安装了mercurial-server
程序并按照
和
http://dev.lshift.net/paul/mercurial-server/docbook.html
。存储库运行良好,但问题是在我们进行一些更改后执行hg push
时没有向用户发送电子邮件。
我在互联网上找到了几个描述如何解决这个问题的页面,但没有一个使用mercurial-server
来发布存储库,并且使用hg push
发送电子邮件的激活似乎因方法而异出版物。
如果hg push
包裹,我如何使用mercurial-server
激活电子邮件?我是否需要为mercurial
设置SMTP服务器?
我的存储库目录的hgrc
文件夹中的.hg
文件如下所示。
[paths]
default = ssh://hg@<ip_address>/jays/project
[extensions]
hgext.notify =
[hooks]
# Enable either changegroup or incoming.
# changegroup will send one email for each push,
# whereas incoming sends one email per changeset.
# Note: Configuring both is possible, but probably not
# what you want, you'll get one email for the group
# and one for each changeset in the group.
changegroup.notify = python:hgext.notify.hook
#commit.notify = python:hgext.notify.hook
#incoming.notify = python:hgext.notify.hook
[email]
from = <from@email.address>
[smtp]
host = <smtp.server.address>
# Optional options:
username = <smtp.server.username>
password = <smtp.server.password>
port = 465
tls = true
# local_hostname = me.example.com
# 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 = file:///
[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 = false
# While the subscription information can be included in this file,
# (in which case, set: config =)
# having it in a separate file allows for it to be version controlled
# and for the option of having subscribers maintain it themselves.
config =
# 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
template = \ndetails: "{baseurl}{webroot}"\nchangeset: {rev}:{node|short}\nuser: {author}\ndate: {date|date}\ndescription:\n{desc}\n
# max lines of diffs to include (0=none, -1=all)
maxdiff = 1000
[reposubs]
* = <first@recipient.address>