makeBodyActive moves a previously non-winning revision body from the rev tree to the document body
(ctx context.Context, revid string, loader RevLoaderFunc)
| 818 | |
| 819 | // makeBodyActive moves a previously non-winning revision body from the rev tree to the document body |
| 820 | func (doc *Document) promoteNonWinningRevisionBody(ctx context.Context, revid string, loader RevLoaderFunc) { |
| 821 | // If the new revision is not current, transfer the current revision's |
| 822 | // body to the top level doc._body: |
| 823 | doc.UpdateBody(doc.getNonWinningRevisionBody(ctx, revid, loader)) |
| 824 | doc.removeRevisionBody(ctx, revid) |
| 825 | } |
| 826 | |
| 827 | func (doc *Document) pruneRevisions(ctx context.Context, maxDepth uint32, keepRev string) int { |
| 828 | numPruned, prunedTombstoneBodyKeys := doc.History.pruneRevisions(ctx, maxDepth, keepRev) |
no test coverage detected