MCPcopy
hub / github.com/apache/pouchdb / collectConflicts

Function collectConflicts

lib/index.js:876–887  ·  view source on GitHub ↗
(metadata)

Source from the content-addressed store, hash-verified

874// 1. are not deleted and
875// 2. are different than winning revision
876function collectConflicts(metadata) {
877 var win = winningRev(metadata);
878 var leaves = collectLeaves(metadata.rev_tree);
879 var conflicts = [];
880 for (var i = 0, len = leaves.length; i < len; i++) {
881 var leaf = leaves[i];
882 if (leaf.rev !== win && !leaf.opts.deleted) {
883 conflicts.push(leaf.rev);
884 }
885 }
886 return conflicts;
887}
888
889// compact a tree by marking its non-leafs as missing,
890// and return a list of revs to delete

Callers 3

processChangeFunction · 0.70
_setupMethod · 0.70
allDocsInnerFunction · 0.70

Calls 2

winningRevFunction · 0.70
collectLeavesFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…