2012-09-10 106 views
1

我试图使用通知中的一个项目扩展时,有人推或从仓库拉得到通知,但没有通知发送...水银通知扩展不起作用

我hgrc文件:

[paths] 
default = // repo URL 
[extensions] 
hgext.notify= 

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

[email] 
from = my email 

[smtp] 
host = smtp 

username = my username 
password = password 
port = 26 
tls = true 
local_hostname = example.com 

[web] 

    baseurl = http://hgserver/... 

[notify] 
sources = serve push pull bundle 

test = True 

config = ../../../Repos/subscription.conf 

template = 
    details: {baseurl}{webroot}/rev/{node|short} 
    branches: {branches} 
    changeset: {rev}:{node|short} 
    user:  {author} 
    date:  {date|date} 
    description: 
    {desc}\n 

maxdiff = 300 

subscription.conf文件:

[reposubs] 
* = [email protected] 

输出日志:

% hg commit --repository D:\Repos\Test Repo --verbose --user [email protected]_DSKTP1.mgc.mentorg.com --message=vhghg D:\Repos\Test Repo\src/test1.c 
src/test1.c 
calling hook commit.lfiles: <function checkrequireslfiles at 0x000000000845C2E8> 
committed changeset 34:cbecf228369e 
[command completed successfully Mon Sep 10 14:53:50 2012] 

    % hg --repository D:\Repos\Test Repo push http://svr-hub-rnd-02:8000/Hg/TestRepo1/ 
    pushing to http://svr-hub-rnd-02:8000/Hg/TestRepo1/ 

searching for changes 
searching for changes 
remote: adding changesets 
remote: adding manifests 
remote: adding file changes 
remote: added 1 changesets with 1 changes to 1 files 
[command completed successfully Mon Sep 10 14:54:02 2012] 
Test Repo% 

在此先感谢

回答

0

我认为你需要的test值设置为False为扩展实际发送通知了

+0

现在我只是在测试......我也尝试过将它的值设置为false但不工作 –

+0

尝试在你的下面的'hgrc'文件的'[ui]'部分下面添加'debug = True'源和目标存储库。这将使Mercurial打印出更多的信息,可以帮助您了解正在发生的事情。 –

+0

此外,我认为'host = smtp'只是一个混淆版本,'hgrc'文件中'host'的实际值是一个可用的可访问SMTP服务器的名称或IP地址 –

1

我已经看到了一些可能的问题。

(A) 您的配置文件路径看起来不对。

../../../Repos/subscription.conf

,如果你想使用绝对路径使用类似

//等/路径/到/file/subscription.conf

请记住,当你不指定双斜线,您引用的配置相对于你的库文件的位置。

(B) 此外 - 当所有的说法和完成设置测试为False。

(C) 您的smtp信息是错误的。设置为'本地主机'没有引号或正确的值。