Commit 011fafc5 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 63daf19e
......@@ -415,8 +415,8 @@ func diffX(ctx context.Context, a, b Node, δZTC SetOid) (δ map[Key]Value, err
// 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).
func diffT(ctx context.Context, a, b *Tree, δZTC SetOid) (δ map[Key]Value, err error) {
fmt.Printf(" T%s\n", a.POid())
defer xerr.Contextf(&err, "diffT %s", a.POid())
fmt.Printf(" T %s %s\n", xidOf(a), xidOf(b))
defer xerr.Contextf(&err, "diffT %s %s", xidOf(a), xidOf(b))
if a.POid() != b.POid() {
panic("different trees")
}
......@@ -491,8 +491,8 @@ func diffT(ctx context.Context, a, b *Tree, δZTC SetOid) (δ map[Key]Value, err
// diffB computes difference in between two revisions of a bucket.
// see diffX for details.
func diffB(ctx context.Context, a, b *Bucket) (δ map[Key]Value, err error) {
fmt.Printf(" B%s\n", a.POid())
defer xerr.Contextf(&err, "diffB %s", a.POid())
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.POid() != b.POid() {
panic("different buckets")
......@@ -587,6 +587,15 @@ func vOid(xvalue interface{}) (zodb.Oid, error) {
return value.POid(), nil
}
// xidOf return string representation of object xid.
func xidOf(obj zodb.IPersistent) string {
if obj == nil {
return "ø"
}
xid := zodb.Xid{At: obj.PJar().At(), Oid: obj.POid()}
return xid.String()
}
func (δBtail *ΔBtail) ForgetPast(revCut zodb.Tid) {
......
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