2 Prints the reverting rev_id, rev_id and reverted to rev_id of all reverted
3 revisions made by user with ID 9133062.
5 from mw.database import DB
6 from mw.lib import reverts
9 host="s1-analytics-slave.eqiad.wmnet",
10 read_default_file="~/.my.cnf",
14 revisions = db.revisions.query(user_id=9133062)
16 for rev_row in revisions:
17 revert = reverts.database.check_row(db, rev_row)
18 if revert is not None:
19 print("{0} reverted {1} to {2}".format(
20 revert.reverting['rev_id'],
22 revert.reverted_to['rev_id'])