Commit 5506fc47 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent fc4e27a4
...@@ -471,10 +471,14 @@ func (δFtail *ΔFtail) Update(δZ *zodb.EventCommit) (_ ΔF, err error) { ...@@ -471,10 +471,14 @@ func (δFtail *ΔFtail) Update(δZ *zodb.EventCommit) (_ ΔF, err error) {
//fmt.Printf("δB.ByRoot: %v\n", δB.ByRoot) //fmt.Printf("δB.ByRoot: %v\n", δB.ByRoot)
for root, δt := range δB.ByRoot { for root, δt := range δB.ByRoot {
//fmt.Printf("root: %v δt: %v\n", root, δt) //fmt.Printf("root: %v δt: %v\n", root, δt)
rt := δFtail.byRoot[root] // XXX root must be tracked, right? rt, ok := δFtail.byRoot[root]
// NOTE files might be empty e.g. if a zfile was tracked, then // NOTE rt might be nil e.g. if a zfile was tracked, then
// deleted, but the tree referenced by zfile.blktab is still // deleted, but the tree referenced by zfile.blktab is still
// not-deleted, remains tracked and is changed. // not-deleted, remains tracked and is changed.
if !ok {
continue
}
for file := range rt.files { for file := range rt.files {
δfile, ok := δF.ByFile[file] δfile, ok := δF.ByFile[file]
if !ok { if !ok {
...@@ -555,7 +559,7 @@ func (δFtail *ΔFtail) Update(δZ *zodb.EventCommit) (_ ΔF, err error) { ...@@ -555,7 +559,7 @@ func (δFtail *ΔFtail) Update(δZ *zodb.EventCommit) (_ ΔF, err error) {
//fmt.Printf("δZBigFile: %v\n", δ) //fmt.Printf("δZBigFile: %v\n", δ)
// update .filesByRoot // update .byRoot
if δ.blktabOld != xbtree.VDEL { if δ.blktabOld != xbtree.VDEL {
rt, ok := δFtail.byRoot[δ.blktabOld] rt, ok := δFtail.byRoot[δ.blktabOld]
if ok { if ok {
......
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