We need to specify and implement logic for reverting and and undoing edits.
There are three cases to consider:
- rollback (reset): reset the content to some earlier version. Traditionally, this is done by simply editing the older version, and saving it (typically without changing enything). For Wikibase, the rollback itself should be an edit, so subsequent edits are again atomic. However, to maintain the status quo of this being a two-click operation, there should be a confirmation page/dialog shown.
- undo: undo the effect of some earlier edit, without undoing later edits (reverse patch). The workflow for this is simple enough, but ItemHandler::merge3() needs to be implemented for this to work.
- revert (admin only): rollback all revisions by the same user, starting at the current position. This is probably trivial, since it should work exactly like it works for text. Needs testing though.