changeset 8403:553909cd1baa

commit: drop unused p1 and p2 args
author Matt Mackall <mpm@selenic.com>
date Thu, 14 May 2009 13:20:40 -0500
parents 0ad521500424
children a2bc39ade36b
files hgext/keyword.py mercurial/localrepo.py
diffstat 2 files changed, 5 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- 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