2012-04-09 47 views
4

我使用Mercurial進行版本控制。團隊之間共享一箇中央回購,我們任何人都可以推/拉。烏龜hg:如何得到通知,當推到一箇中央回購

當任何其他用戶將某些內容推送到中央回購庫時,我如何得到通知。

我試圖編輯我的hgrc文件每https://www.mercurial-scm.org/wiki/NotifyExtension

如下

[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 2012-04-09 11:22:03

+0

還有許多其他擴展可供選擇,http://mercurial.selenic.com/wiki/UsingExtensions。不是每個人都與通知相關,但一個很好的名單瀏覽 – Patrick 2012-04-09 11:23:38

+0

謝謝你的評論。我在搜索中看過這個頁面,但我不清楚究竟要做什麼。我編輯了我的hgrc文件,但它沒有發送任何通知。 – png 2012-04-09 12:32:40

回答

1

您的通知擴展配置爲處於測試模式。也許設置test = False會有幫助嗎?

0

templatemaxdiff應該在[notify]部分。在您的示例中,它們位於[reposubs]部分。

您可以使用hg help來檢查通知擴展是否啓用。