Commit 92ffc6ef authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 5d032fcc
...@@ -674,7 +674,7 @@ func (δBtail *ΔBtail) rebuild() (err error) { ...@@ -674,7 +674,7 @@ func (δBtail *ΔBtail) rebuild() (err error) {
// open ZODB connection corresponding to "current" and "prev" states // open ZODB connection corresponding to "current" and "prev" states
txn, ctx := transaction.New(context.TODO()) txn, ctx := transaction.New(context.TODO()) // XXX
defer txn.Abort() // XXX -> into func() or don't use defer defer txn.Abort() // XXX -> into func() or don't use defer
zconnPrev, err := δBtail.db.Open(ctx, &zodb.ConnOptions{At: atPrev}) zconnPrev, err := δBtail.db.Open(ctx, &zodb.ConnOptions{At: atPrev})
...@@ -738,6 +738,8 @@ func (δBtail *ΔBtail) rebuild() (err error) { ...@@ -738,6 +738,8 @@ func (δBtail *ΔBtail) rebuild() (err error) {
} }
// merge trackNew into .trackIdx // merge trackNew into .trackIdx
// FIXME here trackNew was adjusted to correspond to @tail
// FIXME -> we have to map it back to correspond to @head before merge
δBtail.trackIdx.Update(trackNew) δBtail.trackIdx.Update(trackNew)
return nil return nil
...@@ -1185,9 +1187,6 @@ func diffX(ctx context.Context, a, b Node, δZTC SetOid, trackIdx trackIndex, ho ...@@ -1185,9 +1187,6 @@ func diffX(ctx context.Context, a, b Node, δZTC SetOid, trackIdx trackIndex, ho
// //
// a, b point to top of subtrees @old and @new revisions. // a, b point to top of subtrees @old and @new revisions.
// δ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).
//
// XXX trackIdx -> just pass δBtail?
// XXX ----//---- holeIdx
func diffT(ctx context.Context, A, B *Tree, δZTC SetOid, trackIdx trackIndex, holeIdx treeSetKey) (δ map[Key]ΔValue, δtrack *δtrackIndex, err error) { func diffT(ctx context.Context, A, B *Tree, δZTC SetOid, trackIdx trackIndex, holeIdx treeSetKey) (δ map[Key]ΔValue, δtrack *δtrackIndex, err error) {
tracef(" diffT %s %s\n", xidOf(A), xidOf(B)) tracef(" diffT %s %s\n", xidOf(A), xidOf(B))
defer xerr.Contextf(&err, "diffT %s %s", xidOf(A), xidOf(B)) defer xerr.Contextf(&err, "diffT %s %s", xidOf(A), xidOf(B))
......
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