Bug/fix revert revision

A bugfix for the revert-revision functionality, where the revision you're reverting to is the live one. Written a test covering the new functionality. This is ready to merge.