.. module:: mocha.project .. _UndoGroup: UndoGroup ********* .. inheritance-diagram:: UndoGroup :parts: 2 Synopsis -------- Functions ^^^^^^^^^ .. container:: function_list * def :meth:`__enter__` () * def :meth:`__exit__` (arg__1, arg__2, arg__3) * def :meth:`commit` () * def :meth:`redo` () * def :meth:`rollback` () * def :meth:`undo` () Detailed Description -------------------- The undo/redo handler class which allows to group changes to unified undoable blocks in scope of context managers. .. class:: UndoGroup(UndoGroup) :type UndoGroup: :class:`mocha.project.UndoGroup` :type UndoGroup: :class:`mocha.project.UndoGroup` .. method:: UndoGroup.__enter__() Starts an unified actions block. .. method:: UndoGroup.__exit__(arg__1, arg__2, arg__3) :type arg__1: :class:`PyObject` :type arg__2: :class:`PyObject` :type arg__3: :class:`PyObject` Commits an unified action block. Either rollbacks in case of an unhandled exception. .. method:: UndoGroup.commit() Commits an unified action block. .. method:: UndoGroup.redo() Redoes the latest command from the redo stack. .. method:: UndoGroup.rollback() Rollbacks an unified action block. .. method:: UndoGroup.undo() Undoes the latest command from the undo stack.