(ctx context.Context)
| 2198 | } |
| 2199 | |
| 2200 | func (doc *Document) updateWinningRevAndSetDocFlags(ctx context.Context) { |
| 2201 | revtreeID, branched, inConflict := doc.History.winningRevision(ctx) |
| 2202 | doc.SetRevTreeID(revtreeID) |
| 2203 | doc.setFlag(channels.Deleted, doc.History[revtreeID].Deleted) |
| 2204 | doc.setFlag(channels.Conflict, inConflict) |
| 2205 | doc.setFlag(channels.Branched, branched) |
| 2206 | doc.setFlag(channels.UnchangedCV, doc.localWinsConflict) |
| 2207 | if doc.hasFlag(channels.Deleted) { |
| 2208 | doc.SyncData.TombstonedAt = time.Now().Unix() |
| 2209 | } else { |
| 2210 | doc.SyncData.TombstonedAt = 0 |
| 2211 | } |
| 2212 | } |
| 2213 | |
| 2214 | func (db *DatabaseCollectionWithUser) storeOldBodyInRevTreeAndUpdateCurrent(ctx context.Context, doc *Document, prevCurrentRev string, newRevID string, newDoc *Document, newDocHasAttachments bool) { |
| 2215 | if doc.HasBody() && doc.GetRevTreeID() != prevCurrentRev && prevCurrentRev != "" { |
no test coverage detected