Commit a0a3d2ad authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 12a9ca81
......@@ -598,13 +598,15 @@ class tSrvReq:
# XXX or adjusts
@func(tWatch)
def watch(w, zf, at): # XXX -> ?
t = w.tdb
at_prev = w._watching.get(zf) # we were previously watching zf @at_prev
at_from = ''
if at_prev is not None:
assert False # TODO
at_from = '(%s ->) ' % t.hat(at_prev)
print('\nC: setup watch f<%s> %s%s' % (h(zf._p_oid), at_from, t.hat(at)))
t = w.tdb
print('\nC: setup watch f<%s> %s' % (h(zf._p_oid), t.hat(at)))
if at_prev is not None:
assert False # TODO
# all changes to zf
vdf = [_.byfile[zf] for _ in t.dFtail if zf in _.byfile]
......@@ -645,6 +647,7 @@ def watch(w, zf, at): # XXX -> ?
wg.go(_)
wg.wait()
w._watching[zf] = at
# _expectPin asserts that wcfs sends expected pin messages.
#
......@@ -755,9 +758,17 @@ def test_wcfs():
print('\n\n inv. protocol \n\n')
for zf in t.zfiles():
# watch from scratch
for dF in t.dFtail:
w = t.openwatch()
w.watch(zf, dF.rev)
w.close()
print('\n--------')
# watch going at1 -> at2 -> at3
w = t.openwatch()
for dF in t.dFtail:
w.watch(zf, dF.rev)
print()
......
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