'Sets the properties of a revision and ensures its the current
revision.'

def add_revision(self, new_revision, save=True):

    assert (self.id or save), u'RevisionPluginRevision.add_revision:    Sorry,    you    cannot    add    arevision    to    a    plugin    that    has    not    been    saved    without    using    save=True'
    if (not self.id):
        self.save()
    revisions = self.revision_set.all()
    try:
        new_revision.revision_number = (revisions.latest().revision_number + 1)
    except RevisionPluginRevision.DoesNotExist:
        new_revision.revision_number = 0
    new_revision.plugin = self
    new_revision.previous_revision = self.current_revision
    if save:
        new_revision.save()
    self.current_revision = new_revision
    if save:
        self.save()
