我设置了一个http善变的中央储存库以及试图发送电子邮件的每一个推动。我遵照指示从善变的网页,并从 http://morecode.wordpress.com/2007/08/03/setting-up-mercurial-to-e-mail-on-a-commit/.

推动的工作很好,但我看不到任何通知消息。请帮助我。

我的。hg/hgrc在我的储存库的文件夹的我的客户是这样的

[extensions]
hgext.notify= 

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

[email]
from = what@gmail.com

[smtp]
host = smtp.gmail.com
username = what@gmail.com
password = ohyea
port = 587
tls = true

[web]
baseurl = http://1.1.1.1/repo_name

[notify]
sources = serve push pull bundle

# set this to False when you're ready for mail to start sending
test = False

config = /home/myhome/something/subscription.conf

template = \ndetails:   {baseurl}{webroot}/rev/{node|short}\nchangeset:{rev}:node|short}\nuser:      {author}\ndate:      {date|date}\ndescription:\n{desc}\n

maxdiff = 300

我的/home/《我的家园》/东西/订阅。conf看起来像

[reposubs]
# key is glob pattern, value is comma-separated list of subscriber emails
* = sometestemail@gmail.com

我保存我的结果是看起来像下如果您注意到我看不到任何通知消息在所有的

pushing to http://1.1.1.1/repo_name
searching for changes
remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 2 changesets with 7376 changes to 7376 files

[更新:]

我认为没有hgext文件夹,在我的系统。所以我手下载源匹配我的汞版,并更新我的hgrc如下,并且仍然不起作用。任何帮助请。

[extensions]
notify= /path/to/notify.py

[更新2:]

谢谢Ry4an-我试过了,仍没有运气。

在我的网络服务器

在/var/www和/var/www/hg 我创造的。hgrc文件,只是不确定哪一个是我安装,所以我没有在这两个地方,与内容

[trusted]
users=user_name

这个用户名是在我的用户名客户从那里我试图推动的回购。

在我的客户

中。hg/hgrc我的回购,我加入信任的部分

[trusted]
users=user_name

上述程序没有帮助

第二种方法

在我的客户

在我的仓库。汞的,我没有

chown www-data:www-data hgrc

当我试图把我得到了一些信息,同时推动说

sending capabilities command
capabilities: changegroupsubset stream lookup pushkey unbundle=HG10GZ,HG10BZ,HG10UN branchmap
sending heads command
searching for changes
common changesets up to 6ef19c49143a
sending branchmap command
ignoring untrusted configuration option hooks.changegroup.notify = python:hgext.notify.hook

这个忽略令不会出现在第一种方法,只有在我改变所有权的hgrc,这种弹出。

有帮助吗?

解决方案

这是有可能的信任问题,但让我们打了几个其他的事情第一:

A)关于扩展的载荷:

[extensions]
notify=

该hgext部分不再是必要的,但不伤害。给予全路径的扩展是更脆弱的情况下未来的更新。原 notify= 语法是足够用于扩展来刺客,并通知总是这样。

B)开关的 test = falsetest = true 它将帮助你在调试这个-它发送电子邮件Stdout,这是很方便的。

好吧,那两个做了,让我们来看看的信任。善变的信任系统是建立在这个想法,不只是任何人都应该能够让你运行的代码。想象一下如果你的回购的 .hg/hgrc 文件有一部分在它如:

[hooks]
pre-push = rm -rf ~

当我推到它它将删除我的家目录。这将我的屁股出来。为了避免发生这种情况反复无常将只载运行hgrc文件,它相信,你告诉它该怎么信任 [trusted] 部分 你的 hgrc.当你推动通过ssh你有效地记录到的远程机器和它自己的 ~/.hgrc 这可能是国家有什么其他的hgrc文件,你愿意来执行。

HTTP是特殊的。虽然你可能会认证你可能不会运行善变的远程系统上为自己。它可能是某些非用户的用户喜欢的 www-数据, www, apache, 或 没有人 根据网络服务器构成的,所以...你需要做的是回购的 .hg/hgrc' owned (or group-owned) by an user (or group) that the webserver user trusts. To achieve that you can eitherchwownthe.hg/hgrcfile over to the web server user, or find the web server's home directory (often/var/www) and create a.hgrcfile in there with a[可信的]block saying that the web server user trusts whomever it is that owns the repo's.hg/hgrc`的文件。

如果我是对关于什么的故事告诉迹象将是在您的网络服务器是错误记录在那里你会见到的很多信息,如"不信任/path/to/回购/.hg/hgrc拥有的someuser".

TL博士: 请确保您的网络服务器的用户信托基金(在hgrc意义上)的所有者 .hg/hgrc 这是指定挂钩。

其他提示

这在与Exchange Server通信时对我有用: 通用标签

将以上内容放入存储库中的hgrc文件中。

例如C:\ repositories \ test.hg \ hgrc

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top