Commit 42780810 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent e8aeb5d2
......@@ -337,29 +337,6 @@ class tDB:
return open(path, mode, 0) # unbuffered
# XXX vvv misc -> tail?
# hat returns string for at.
# it gives both symbolic version and raw hex for at, for example:
# @at2 (03cf7850500b5f66)
def hat(t, at):
try:
i = t._headv.index(at)
except ValueError:
return "@" + h(at)
return "@at%d (%s)" % (i, h(at))
# zfiles returns ZBigFiles that were ever changed under t.
def zfiles(t):
zfs = set()
for dF in t.dFtail:
for zf in dF.byfile:
if zf not in zfs:
zfs.add(zf)
return zfs
# iter_revv iterates through all possible at_i -> at_j -> at_k ... sequences.
# at_i < at_j
# NOTE all sequences go till head.
......@@ -1316,9 +1293,34 @@ def test_tidtime_notrough():
assert tidtime(at) > tidtime(atprev)
# hat returns string for at.
# it gives both symbolic version and raw hex for at, for example:
# @at2 (03cf7850500b5f66)
@func(tDB)
def hat(t, at):
try:
i = t._headv.index(at)
except ValueError:
return "@" + h(at)
return "@at%d (%s)" % (i, h(at))
# zfiles returns ZBigFiles that were ever changed under t.
@func(tDB)
def zfiles(t):
zfs = set()
for dF in t.dFtail:
for zf in dF.byfile:
if zf not in zfs:
zfs.add(zf)
return zfs
# dump_history prints change history in tabular form.
# the output is useful to get overview of how file(s) are changed in tests.
#
# the output is useful while developing: to get overview of how file(s) are
# changed in tests.
@func(tDB)
def dump_history(t):
print('>>> Change history by file:\n')
......
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