# HG changeset patch # User Christian Ebert # Date 1187698077 -7200 # Node ID 9fe9a98393876b28d67be5cf642cddc03a9fa225 # Parent 8e5ba738e36da4328fc7cecb083a0f21ae6552d6 Move backwards compatible commit fork into private kwrepo function diff -r 8e5ba738e36d -r 9fe9a9839387 hgkw/keyword.py --- a/hgkw/keyword.py Tue Aug 21 13:27:48 2007 +0200 +++ b/hgkw/keyword.py Tue Aug 21 14:07:57 2007 +0200 @@ -458,6 +458,23 @@ return kwfilelog(self.sopener, f, kwt, kwcnt) return filelog.filelog(self.sopener, f) + def _commit(self, files, text, user, date, match, force, lock, wlock, + force_editor, p1, p2, extra): + '''Private commit wrapper for backwards compatibility.''' + try: + return super(kwrepo, self).commit(files=files, text=text, + user=user, date=date, + match=match, force=force, + lock=lock, wlock=wlock, + force_editor=force_editor, + p1=p1, p2=p2, extra=extra) + except TypeError: + return super(kwrepo, self).commit(files=files, text=text, + user=user, date=date, + match=match, force=force, + force_editor=force_editor, + p1=p1, p2=p2, extra=extra) + def commit(self, files=None, text='', user=None, date=None, match=util.always, force=False, lock=None, wlock=None, force_editor=False, p1=None, p2=None, extra={}): @@ -472,21 +489,8 @@ _wlock = self.wlock() if not _lock: _lock = self.lock() - try: - node = super(kwrepo, - self).commit(files=files, text=text, - user=user, date=date, - match=match, force=force, - lock=_lock, wlock=_wlock, - force_editor=force_editor, - p1=p1, p2=p2, extra=extra) - except TypeError: - node = super(kwrepo, - self).commit(files=files, text=text, - user=user, date=date, - match=match, force=force, - force_editor=force_editor, - p1=p1, p2=p2, extra=extra) + node = self._commit(files, text, user, date, match, force, + _lock, _wlock, force_editor, p1, p2, extra) if node is not None: cl = self.changelog.read(node) mn = self.manifest.read(cl[0])