(module era mzscheme
(require (lib "contract.ss"))
(require (file "base.ss")
(file "era-private.ss")
(file "transaction.ss"))
(define (set-revision! struct revision)
(if (and (in-transaction?)
(roll-back-persistent-structs?))
(let ([old-revision (get-revision struct)])
(begin0 (set-revision!/internal struct revision)
(record-delta! struct 'revision old-revision)))
(set-revision!/internal struct revision)))
(provide (all-from-except (file "era-private.ss") set-revision!/internal)
roll-back-persistent-structs?)
(provide/contract
[set-revision! (-> persistent-struct? (or/c integer? false/c) void?)])
)