Commit 177ba4e8 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent bc8389ed
......@@ -380,10 +380,11 @@ func (δBtail *ΔBtail) Update(δZ *zodb.EventCommit) (_ ΔB, err error) {
δB.ByRoot[root] = δT
}
}
return δB, nil
// XXX .δBtail <- (δZ.rev, [](root, []key))
// XXX rebuilf lastRevOf
return δB, nil
}
// δZConnectTracked computes connected closure of δZ/T.
......@@ -396,14 +397,10 @@ func (δBtail *ΔBtail) Update(δZ *zodb.EventCommit) (_ ΔB, err error) {
//
// δtopsByRoot = {} root -> {top changed nodes in that tree}
func (δBtail *ΔBtail) δZConnectTracked(δZv *zodb.EventCommit) (δZTC SetOid, δtopsByRoot map[zodb.Oid]SetOid) {
δZ := SetOid{}
δZ := SetOid{}; for _, δ := range δZv.Changev { δZ.Add(δ) }
δZTC = SetOid{}
δtopsByRoot = map[zodb.Oid]SetOid{}
for _, δ := range δZv.Changev {
δZ.Add(δ)
}
for δ := range δZ {
track, ok := δBtail.trackIdx[δ]
if !ok {
......@@ -541,7 +538,7 @@ func diffX(ctx context.Context, a, b Node, δZTC SetOid, trackIdx map[zodb.Oid]n
}
}
// diffT computes difference in between two revisions of a tree's subtree.
// diffT computes difference in between two subtrees.
//
// a, b point to top of the subtree @old and @new revisions.
// δZTC is connected set of objects covering δZT (objects changed in this tree in old..new).
......@@ -551,12 +548,6 @@ func diffT(ctx context.Context, a, b *Tree, δZTC SetOid, trackIdx map[zodb.Oid]
fmt.Printf(" T %s %s\n", xidOf(a), xidOf(b))
defer xerr.Contextf(&err, "diffT %s %s", xidOf(a), xidOf(b))
/*
if (a != nil && b != nil) && (a.POid() != b.POid()) {
panic("different trees") // XXX wrong - tree object can be changed completely ?
}
*/
var av []TreeEntry
var bv []TreeEntry
if a != nil {
......@@ -782,18 +773,12 @@ func diffT(ctx context.Context, a, b *Tree, δZTC SetOid, trackIdx map[zodb.Oid]
return δ, nil
}
// diffB computes difference in between two revisions of a bucket.
// diffB computes difference in between two buckets.
// see diffX for details.
func diffB(ctx context.Context, a, b *Bucket) (δ map[Key]ΔValue, err error) {
fmt.Printf(" B %s %s\n", xidOf(a), xidOf(b))
defer xerr.Contextf(&err, "diffB %s %s", xidOf(a), xidOf(b))
// XXX oid can be InvalidOid for T/B... (i.e. B is part of T and is not yet committed separately)
/*
if (a != nil && b != nil) && (a.POid() != b.POid()) {
panic("different buckets") // XXX wrong - bucket object can be changed completely ?
}
*/
var av []BucketEntry
var bv []BucketEntry
......
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