Commit 8403564c authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent ec7b9c09
...@@ -366,7 +366,7 @@ func (δBtail *ΔBtail) treediff(ctx context.Context, root zodb.Oid, δZT SetOid ...@@ -366,7 +366,7 @@ func (δBtail *ΔBtail) treediff(ctx context.Context, root zodb.Oid, δZT SetOid
// //
// δZTC is connected set of objects covering δZT (objects changed in this tree in old..new). // δZTC is connected set of objects covering δZT (objects changed in this tree in old..new).
// //
// a/b can be = nil; a=nil means addition, b=nil means deletion. // a/b can be nil; a=nil means addition, b=nil means deletion.
func diffX(ctx context.Context, a, b Node, δZTC SetOid) (δ map[Key]Value, err error) { func diffX(ctx context.Context, a, b Node, δZTC SetOid) (δ map[Key]Value, err error) {
if a==nil && b==nil { if a==nil && b==nil {
panic("BUG: both a & b == nil") panic("BUG: both a & b == nil")
...@@ -379,14 +379,14 @@ func diffX(ctx context.Context, a, b Node, δZTC SetOid) (δ map[Key]Value, err ...@@ -379,14 +379,14 @@ func diffX(ctx context.Context, a, b Node, δZTC SetOid) (δ map[Key]Value, err
if a != nil { if a != nil {
aT, isT = a.(*Tree) aT, isT = a.(*Tree)
aB, _ = a.(*Bucket) aB, _ = a.(*Bucket)
if (aT == nil && aB == nil) { if aT == nil && aB == nil {
panicf("a: bad type %T", a) panicf("a: bad type %T", a)
} }
} }
if b != nil { if b != nil {
bT, isT = b.(*Tree) bT, isT = b.(*Tree)
bB, _ = b.(*Bucket) bB, _ = b.(*Bucket)
if (bT == nil && bB == nil) { if bT == nil && bB == nil {
panicf("b: bad type %T", b) panicf("b: bad type %T", b)
} }
} }
...@@ -553,7 +553,7 @@ func diffB(ctx context.Context, a, b *Bucket) (δ map[Key]Value, err error) { ...@@ -553,7 +553,7 @@ func diffB(ctx context.Context, a, b *Bucket) (δ map[Key]Value, err error) {
return δ, nil return δ, nil
} }
// zgetNode returns btree node corresponding to zconn.Get(oid) // zgetNode returns btree node corresponding to zconn.Get(oid) .
func zgetNode(ctx context.Context, zconn *zodb.Connection, oid zodb.Oid) (_ Node, err error) { func zgetNode(ctx context.Context, zconn *zodb.Connection, oid zodb.Oid) (_ Node, err error) {
defer xerr.Contextf(&err, "getnode %s@%s", oid, zconn.At()) defer xerr.Contextf(&err, "getnode %s@%s", oid, zconn.At())
xnode, err := zconn.Get(ctx, oid) xnode, err := zconn.Get(ctx, oid)
......
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