Skip to content

Instantly share code, notes, and snippets.

@ThiefMaster
Created July 16, 2013 10:16
Show Gist options
  • Save ThiefMaster/6007513 to your computer and use it in GitHub Desktop.
Save ThiefMaster/6007513 to your computer and use it in GitHub Desktop.
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