'Revert the draft version to the same state as the public version'

def revert_to_live(self, language):

    if (not self.publisher_is_draft):
        raise PublicIsUnmodifiable('The    public    instance    cannot    be    reverted.    Use    draft.')
    if (not self.publisher_public):
        raise PublicVersionNeeded('A    public    version    of    this    page    is    needed')
    public = self.publisher_public
    public._copy_attributes(self)
    public._copy_contents(self, language)
    public._copy_titles(self, language, public.is_published(language))
    self.title_set.filter(language=language).update(published=True, publisher_state=PUBLISHER_STATE_DEFAULT)
    self._publisher_keep_state = True
    self.save()
