Already partially done - the main bit remaining now is passing a project value to lookup_revision_id() where necessary.
Already partially done - the main bit remaining now is passing a project value to lookup_ revision_ id() where necessary.