Commit fac2b31d authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent b81173f3
...@@ -420,7 +420,7 @@ def diff(d1, d2): # -> [] of (k,v) to change; DEL means del[k] ...@@ -420,7 +420,7 @@ def diff(d1, d2): # -> [] of (k,v) to change; DEL means del[k]
# diff = [] of (k,v) to change; DEL means del[k] # diff = [] of (k,v) to change; DEL means del[k]
def patch(d, diff, verify): def patch(d, diff, verify):
for (k,v) in diff: for (k,v) in diff:
if v is DEL: if v == DEL:
del d[k] del d[k]
else: else:
d[k] = v d[k] = v
......
...@@ -133,6 +133,8 @@ func testΔFtail(t_ *testing.T, testq chan ΔFTestEntry) { ...@@ -133,6 +133,8 @@ func testΔFtail(t_ *testing.T, testq chan ΔFTestEntry) {
Zinblk[zblk] = inblk Zinblk[zblk] = inblk
} }
inblk.Add(blk) inblk.Add(blk)
} else {
delete(blkTab, blk)
} }
// update δblk due to change in blkTab // update δblk due to change in blkTab
...@@ -251,6 +253,9 @@ func TestΔFtail(t *testing.T) { ...@@ -251,6 +253,9 @@ func TestΔFtail(t *testing.T) {
{δT{}, δD(c)}, {δT{}, δD(c)},
{δT{2:c}, δD(a,b)}, {δT{2:c}, δD(a,b)},
// clear the tree
{δT{1:ø,2:ø}, δD()},
// i is first associated with file, but later unlinked from it // i is first associated with file, but later unlinked from it
// then i is changed -> the file should no be in δF // then i is changed -> the file should no be in δF
{δT{5:i}, δD()}, {δT{5:i}, δD()},
......
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