Fix the signature of the hg_hook function.
authorGeorg Brandl <georg@python.org>
Wed, 3 Oct 2012 05:58:20 +0000 (07:58 +0200)
committerGeorg Brandl <georg@python.org>
Wed, 3 Oct 2012 05:58:20 +0000 (07:58 +0200)
irkerhook.py

index 244b65c68727428341e27941ae18cc0dcf6944da..6b3aacc26682e09b305f006a6c60742ae0d06b3b 100755 (executable)
@@ -343,13 +343,13 @@ class HgExtractor(GenericExtractor):
         commit.files = ' '.join(st[0] + st[1] + st[2])
         return commit
 
-def hg_hook(ui, repo, _hooktype, node=None, _url=None, **_kwds):
+def hg_hook(ui, repo, **kwds):
     # To be called from a Mercurial "commit" or "incoming" hook.  Example
     # configuration:
     # [hooks]
     # incoming.irker = python:/path/to/irkerhook.py:hg_hook
     extractor = HgExtractor([(ui, repo)])
-    ship(extractor, node, False)
+    ship(extractor, kwds['node'], False)
 
 extractors = [GitExtractor, SvnExtractor, HgExtractor]