Commit 58933311 authored by Kirill Smelkov's avatar Kirill Smelkov

.

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