Mercurial通知扩展不起作用

时间:2012-09-10 13:39:02

标签: mercurial mercurial-extension

我正在尝试在项目中使用notify扩展,以便在有人推送或从存储库中提取但未发送通知时收到通知...

我的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]
* = someone@abc.com

输出日志:

 % hg commit --repository D:\Repos\Test Repo --verbose --user mabdelkh@TATTIA_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% 

提前致谢

2 个答案:

答案 0 :(得分:1)

我见过很多可能的问题。

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

  

../../../回购/ subscription.conf

如果你想使用绝对路径,请使用

之类的东西
  

//等/路径/到/文件/ subscription.conf

请记住,当您不指定双正斜杠时,您将引用相对于存储库的配置文件的位置。

(B) 另外 - 完成所有操作后,将测试设置为False。

(C) 您的smtp信息有误。设置为'localhost',不带引号或正确的值。

答案 1 :(得分:0)

我认为您需要将test的值设置为False,以便扩展实际发送通知

相关问题