Skip to content

Instantly share code, notes, and snippets.

@ThiefMaster
Created July 16, 2013 10:16
Show Gist options
  • Select an option

  • Save ThiefMaster/6007513 to your computer and use it in GitHub Desktop.

Select an option

Save ThiefMaster/6007513 to your computer and use it in GitHub Desktop.

Revisions

  1. ThiefMaster created this gist Jul 16, 2013.
    7 changes: 7 additions & 0 deletions indico-undo-commits.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    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()