Commit 34369a7b authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent a0faad7d
......@@ -640,13 +640,15 @@ def watch(w, zf, at): # XXX -> ?
pin = w._pinAt(zf, at)
print('\n%s\n%s' % (pin_prev, pin))
for blk in set(pin_prev.keys()).union(pin.keys()):
# blk ∉ pin_prev, blk ∉ pin -> cannot happen
assert (blk in pin_prev) or (blk in pin)
# blk ∉ pin_prev, blk ∈ pin -> cannot happen
if at_prev is not None:
if blk not in pin_prev and blk in pin:
if blk not in pin_prev and blk in pin:
if at_prev is not None:
assert False, '#%d pinned %s; not pinned %s' % (t.hat(at_prev), t.hat(at))
# blk ∈ pin_prev, blk ∉ pin -> unpin to head
......@@ -659,6 +661,7 @@ def watch(w, zf, at): # XXX -> ?
if pin_prev[blk] == pin[blk]:
del pin[blk] # would need to pin to what it is already pinned
print('-> %s' % pin)
# {} blk -> at that have to be pinned
# XXX also check that head/file[blk] is in cache - else no need to pin
......
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