Commit 58933311 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 8110ab56
...@@ -235,9 +235,9 @@ func (tidx trackIndex) gc1(oid zodb.Oid) { ...@@ -235,9 +235,9 @@ func (tidx trackIndex) gc1(oid zodb.Oid) {
// ApplyΔ applies δ to trackIdx. XXX // ApplyΔ applies δ to trackIdx. XXX
func (tidx trackIndex) ApplyΔ(δ *δtrackIndex) { func (tidx trackIndex) ApplyΔ(δ *δtrackIndex) {
fmt.Printf("\n\nApplyΔ\n") //fmt.Printf("\n\nApplyΔ\n")
fmt.Printf("\tDelLeaf: %v\n", δ.DelLeaf) //fmt.Printf("\tDelLeaf: %v\n", δ.DelLeaf)
fmt.Printf("\tAdd: %v\n", δ.Add) //fmt.Printf("\tAdd: %v\n", δ.Add)
// remove leafs and thier parents // remove leafs and thier parents
for leaf := range δ.DelLeaf { for leaf := range δ.DelLeaf {
...@@ -1060,8 +1060,11 @@ func diffT(ctx context.Context, A, B *Tree, δZTC SetOid, trackIdx trackIndex, h ...@@ -1060,8 +1060,11 @@ func diffT(ctx context.Context, A, B *Tree, δZTC SetOid, trackIdx trackIndex, h
oid := acOid oid := acOid
for oid != zodb.InvalidOid { for oid != zodb.InvalidOid {
told := trackIdx[oid] told := trackIdx[oid]
tnew := BtrackIdx[oid] tnew, ok := BtrackIdx[oid]
if told.parent != tnew.parent { if !ok {
break
}
if told == nil || (told.parent != tnew.parent) {
δtrack.Add[oid] = &tnew // XXX adjust nchildren δtrack.Add[oid] = &tnew // XXX adjust nchildren
} }
......
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