rope.base.history

Classes

History

A class that holds project history

Module Contents

class rope.base.history.History(project, maxundos=None)

A class that holds project history

project
current_change = None
do(changes, task_handle=taskhandle.DEFAULT_TASK_HANDLE)

Perform the change and add it to the self.undo_list

Note that uninteresting changes (changes to ignored files) will not be appended to self.undo_list.

undo(change=None, drop=False, task_handle=taskhandle.DEFAULT_TASK_HANDLE)

Redo done changes from the history

When change is None, the last done change will be undone. If change is not None it should be an item from self.undo_list; this change and all changes that depend on it will be undone. In both cases the list of undone changes will be returned.

If drop is True, the undone change will not be appended to the redo list.

redo(change=None, task_handle=taskhandle.DEFAULT_TASK_HANDLE)

Redo undone changes from the history

When change is None, the last undone change will be redone. If change is not None it should be an item from self.redo_list; this change and all changes that depend on it will be redone. In both cases the list of redone changes will be returned.

contents_before_current_change(file)
write()
get_file_undo_list(resource)
undo_list
redo_list
property tobe_undone

The last done change if available, None otherwise

property tobe_redone

The last undone change if available, None otherwise

property max_undos
property save
property compress
clear()

Forget all undo and redo information