simple conflicts are now handled correctly

This commit is contained in:
Kevin Jahns
2015-07-06 16:47:49 +02:00
parent 9d0373b85b
commit bf4d5f24a8
9 changed files with 114 additions and 121 deletions

View File

@@ -84,6 +84,7 @@ Y.Memory = (function(){ //eslint-disable-line no-unused-vars
for (var clock = startPos; clock <= endPos; clock++) {
var op = yield* this.getOperation([user, clock]);
if (op != null) {
op = Struct[op.struct].encode(op);
ops.push(yield* this.makeOperationReady.call(this, startSS, op));
}
}
@@ -91,6 +92,7 @@ Y.Memory = (function(){ //eslint-disable-line no-unused-vars
return ops;
}
*makeOperationReady (ss, op) {
// instead of ss, you could use currSS (a ss that increments when you add an operation)
var clock;
var o = op;
while (true){