hgkw/keyword.py
changeset 611 c50f56b5f4b8
parent 609 fefdf82b2320
child 614 6bbf554beea2
--- a/hgkw/keyword.py	Tue Jul 07 23:30:53 2009 +0200
+++ b/hgkw/keyword.py	Thu Jul 09 11:59:12 2009 +0200
@@ -456,13 +456,14 @@
             data = super(kwrepo, self).wread(filename)
             return kwt.wread(filename, data)
 
-        def commit(self, text='', user=None, date=None, match=None,
-                   force=False, editor=None, extra={}):
+        def commit(self, *args, **opts):
             # use custom commitctx for user commands
             # other extensions can still wrap repo.commitctx directly
-            repo.commitctx = self.kwcommitctx
-            return super(kwrepo, self).commit(text, user, date, match, force,
-                         editor, extra)
+            self.commitctx = self.kwcommitctx
+            try:
+                return super(kwrepo, self).commit(*args, **opts)
+            finally:
+                del self.commitctx
 
         def kwcommitctx(self, ctx, error=False):
             wlock = lock = None
@@ -486,7 +487,7 @@
                 if commithooks:
                     for name, cmd in commithooks.iteritems():
                         ui.setconfig('hooks', name, cmd)
-                    repo.hook('commit', node=n, parent1=xp1, parent2=xp2)
+                    self.hook('commit', node=n, parent1=xp1, parent2=xp2)
                 return n
             finally:
                 release(lock, wlock)