[issue429] notify hook fails after upgrade
Armando Singer
mercurial-bugs at selenic.com
Thu Nov 23 00:36:06 UTC 2006
New submission from Armando Singer <armando.singer at gmail.com>:
After upgrading hg (e674cae8efee date: Tue Nov 21), the notify hook
now fails. The hook is setup to run on each incoming changeset (on our
central remote server).
Below I pull on the server to show a trace (this usually runs during a
push).
$ hg pull -v --debug --traceback -u http://asinger:8000/
pulling from http://asinger:8000/
sending heads command
searching for changes
sending branches command
examining 559ac44f9b91:0a04b987be5a
found incomplete branch 559ac44f9b91:0a04b987be5a
sending between command
narrowing 1:8 bb7e92d514f0
found new branch changeset 559ac44f9b91
found new changesets starting at 559ac44f9b91
1 total queries
sending changegroup command
adding changesets
add changeset 559ac44f9b91
adding manifests
adding file changes
adding test.txt revisions
added 1 changesets with 1 changes to 1 files
calling hook incoming.notify: hgext.notify.hook
error: incoming.notify hook raised an exception: __init__() takes exactly 7
arguments (5 given)
Traceback (most recent call last):
File "/home/hg/lib64/python/mercurial/localrepo.py", line 133, in callhook
r = obj(ui=self.ui, repo=self, hooktype=name, **args)
File "/home/hg/lib64/python/hgext/notify.py", line 260, in hook
n = notifier(ui, repo, hooktype)
File "/home/hg/lib64/python/hgext/notify.py", line 117, in __init__
self.sio)
TypeError: __init__() takes exactly 7 arguments (5 given)
resolving manifests
overwrite False partial False
ancestor bb7e92d514f0 local bb7e92d514f0+ remote 559ac44f9b91
test.txt: remote is newer -> g
getting test.txt
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
The the relevant parts of the hgrc are below. It was not changed when
hg was upgraded.
[extensions]
hgext.notify =
[hooks]
# one email for each incoming changeset
incoming.notify = python:hgext.notify.hook
[notify]
# really send email
test = False
# subscriber data lives in the notify repo
config = /home/hg/notify.conf
# repos root is listed as /data/home/hg/repositories/ on server, so strip 5 "/"
chars
strip = 5
sources = serve push pull bundle
changegroup = \n{baseurl}{webroot}?cmd=changeset;node={node|short}\nchangeset:
{node|short} in {root|basename}\nuser: {author}\ndate:
{date|date}\nsummary: {desc|firstline}\n
incoming = Subject: [{webroot} commit] {desc|firstline|strip}\nFrom:
{author}\n\n{baseurl}{webroot}?cmd=changeset;node={node|short}\nchangeset:
{node|short} in {root|basename}\nuser: {author}\ndate:
{date|date}\nsummary: {desc|firstline}\n
[email]
from = Mercurial Commits <dev-all at ...>
to = Product Development <dev-all at ...>
[smtp]
host = localhost
The notify config file just has:
[reposubs]
# key is glob pattern against path to repo root, value is comma-separated list
of subscriber emails
* = Product Development <dev-all at ...>
$ hg version
Mercurial Distributed SCM (version e674cae8efee)
...
----------
messages: 2411
nosy: asinger
priority: bug
status: unread
title: notify hook fails after upgrade
____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://www.selenic.com/mercurial/bts/issue429>
____________________________________________________
More information about the Mercurial-devel
mailing list