[PATCH 1 of 2] keyword: pass arguments as arbitrary lists to kwrepo.commit

Christian Ebert blacktrash at gmx.net
Sun Jul 5 05:40:28 CDT 2009


# HG changeset patch
# User Christian Ebert <blacktrash at gmx.net>
# Date 1246789789 -7200
# Node ID fbe2c25a36131fac923b25334a4e576991e64557
# Parent  a232b90ffb5110aeae75ff7ebf1a530ce8999bfd
keyword: pass arguments as arbitrary lists to kwrepo.commit

kwrepo.commit by now has become a dumb wrapper around commitctx
wherein the actual keyword tweaking happens, so we can safely
simplify the argument passing.

diff --git a/hgext/keyword.py b/hgext/keyword.py
--- a/hgext/keyword.py
+++ b/hgext/keyword.py
@@ -459,13 +459,11 @@
             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)
+            return super(kwrepo, self).commit(*args, **opts)
 
         def kwcommitctx(self, ctx, error=False):
             wlock = lock = None


More information about the Mercurial-devel mailing list