Commit 9694761d authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent ece1c216
......@@ -913,7 +913,7 @@ func diffT(ctx context.Context, a, b *Tree, δZTC SetOid, trackIdx map[zodb.Oid]
bnode.done = true
}
// add k as hole if k is not there
// k is not there -> +[k]ø
if !Bdone.Has(k) {
δB := map[Key]ΔValue{k: {VDEL, VDEL}} // hole
err = δMerge(δ, δB); if err != nil { return nil, err }
......@@ -927,8 +927,7 @@ func diffT(ctx context.Context, a, b *Tree, δZTC SetOid, trackIdx map[zodb.Oid]
Bqueue = SetKey{}
for k := range Aqueue {
fmt.Printf(" A [%v]\n", k)
Adone.Add(k)
abucket, ok, err := av.GetToLeaf(ctx, k)
anode, ok, err := av.GetToLeaf(ctx, k)
if err != nil {
return nil, err
}
......@@ -939,13 +938,13 @@ func diffT(ctx context.Context, a, b *Tree, δZTC SetOid, trackIdx map[zodb.Oid]
// XXX check for anode.node.(*Tree) (ø tree case)
// - bucket if not already done
// XXX also extract holes
if !abucket.done {
δA, err := diffB(ctx, abucket.node.(*Bucket), nil)
// - bucket if that bucket is reached for the first time
if !anode.done {
δA, err := diffB(ctx, anode.node.(*Bucket), nil)
if err != nil {
return nil, err
}
// XXX also extract holes
// δ <- δA
err = δMerge(δ, δA)
......@@ -953,14 +952,21 @@ func diffT(ctx context.Context, a, b *Tree, δZTC SetOid, trackIdx map[zodb.Oid]
return nil, err
}
// Adone <- δA
// Bqueue <- δA
for k := range δA {
if !Bdone.Has(k) {
Bqueue.Add(k)
for k_ := range δA {
Adone.Add(k_)
if !Bdone.Has(k_) {
Bqueue.Add(k_)
}
}
abucket.done = true
anode.done = true
}
// k is not there -> -[k]ø
if !Adone.Has(k) {
// XXX
}
fmt.Printf(" av: %s\n", av)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment