CommitDatabaseToDatabaseConverter¶
- class dsviper.CommitDatabaseToDatabaseConverter¶
Bases:
objectMaterializes one chosen commit as a flat, history-free Database.
The commit is explicit - there is no current one - and only the blobs it references are carried over.
The target is a database you have just created: these transfers write into an empty one, and nothing checks it for you.
A run that raises part-way does not undo what it has already written. The blobs and the documents share one exclusive transaction that spans the whole conversion, so neither lands however far it got; the definitions do. Discard the target and start again.
- convert(source: CommitDatabase, commit_id: ValueCommitId, target: Database, progress: StepperDelegate | None = None) DatabaseTransferInfo¶
Materialize the state of commit_id from source into target.
target is a Database. progress is an optional StepperDelegate. Return a DatabaseTransferInfo.
Requires that target have no transaction open, and raises when it has: the conversion opens an exclusive one of its own.