Created
July 16, 2013 10:16
-
-
Save ThiefMaster/6007513 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def undo_changes(after): | |
root = dbi.getInstance().getDBConnection().root() | |
db = root._p_jar.db() | |
undo_data = [obj for obj in db.undoInfo(last=-1000) if obj['time'] >= after] | |
for entry in undo_data: | |
db.undo(entry['id']) | |
dbi.commit() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment