私はhttp中央のMercurialリポジトリを設定し、プッシュするたびにメールを送信しようとしています。Mercurialページおよび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/myhome/something/subscription.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フォルダがないことがわかりました。そのため、hgバージョンに一致するソースを手動でダウンロードし、以下のようにhgrcを更新しましたが、それでも機能しません。助けてください。
[extensions]
notify= /path/to/notify.py
[更新2:]
ありがとうRy4an-私はそれを試しましたが、それでも運がありません。
私のウェブサーバーで
/ var/wwwと/var/ www / hgの下に.hgrcファイルを作成しましたが、どちらが自分のWebルートかわからないため、両方の場所でコンテンツを作成しました
[trusted]
users=user_name
このユーザー名は、リポジトリにプッシュしようとしているクライアントのユーザー名です。
私のクライアントで
リポジトリの.hg/hgrcに、信頼できるセクションを追加しました
[trusted]
users=user_name
上記の手順は役に立ちませんでした
2番目のアプローチ
私のクライアントでは、
私のレポの.hgの下で、私はしました
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の所有権を変更した後でのみ、これがポップアップ表示されます。