Add revert_to_published method.

STUD-1860