commit: drop unused p1 and p2 args
authorMatt Mackall <mpm@selenic.com>
Thu, 14 May 2009 13:20:40 -0500
changeset 8403 553909cd1baa
parent 8402 0ad521500424
child 8404 a2bc39ade36b
commit: drop unused p1 and p2 args
hgext/keyword.py
mercurial/localrepo.py
--- a/hgext/keyword.py	Thu May 14 13:20:40 2009 -0500
+++ b/hgext/keyword.py	Thu May 14 13:20:40 2009 -0500
@@ -451,7 +451,7 @@
 
         def commit(self, files=None, text='', user=None, date=None,
                    match=None, force=False, force_editor=False,
-                   p1=None, p2=None, extra={}, empty_ok=False):
+                   extra={}, empty_ok=False):
             wlock = lock = None
             _p1 = _p2 = None
             try:
@@ -465,10 +465,7 @@
                         ui.setconfig('hooks', name, None)
                 if commithooks:
                     # store parents for commit hook environment
-                    if p1 is None:
-                        _p1, _p2 = repo.dirstate.parents()
-                    else:
-                        _p1, _p2 = p1, p2 or nullid
+                    _p1, _p2 = repo.dirstate.parents()
                     _p1 = hex(_p1)
                     if _p2 == nullid:
                         _p2 = ''
@@ -476,7 +473,7 @@
                         _p2 = hex(_p2)
 
                 n = super(kwrepo, self).commit(files, text, user, date, match,
-                                               force, force_editor, p1, p2,
+                                               force, force_editor,
                                                extra, empty_ok)
 
                 # restore commit hooks
--- a/mercurial/localrepo.py	Thu May 14 13:20:40 2009 -0500
+++ b/mercurial/localrepo.py	Thu May 14 13:20:40 2009 -0500
@@ -767,9 +767,8 @@
 
         return fparent1
 
-    def commit(self, files=None, text="", user=None, date=None,
-               match=None, force=False, force_editor=False,
-               p1=None, p2=None, extra={}, empty_ok=False):
+    def commit(self, files=None, text="", user=None, date=None, match=None,
+               force=False, force_editor=False, extra={}, empty_ok=False):
         wlock = lock = None
         if extra.get("close"):
             force = True