Commit 4271fed4 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 9931f97e
......@@ -256,7 +256,14 @@ class tDB:
# commit commits transaction and makes sure wcfs is synchronized to it.
#
# It updates .dFtail and returns committed transaction ID.
def commit(t):
#
# zf and changeDelta can be optionally provided, in which case .change(zf,
# changeDelta) call is made before actually committing.
def commit(t, zf=None, changeDelta=None):
if zf is not None:
assert changeDelta is not None
t.change(zf, changeDelta)
# perform modifications scheduled by change.
# use !wcfs mode so that we prepare data independently of wcfs code paths.
dF = DF()
......@@ -1338,7 +1345,7 @@ def test_wcfs_watch_setup():
defer(t.close)
f = t.open(zf)
t.change(zf, {2:'c1'}); at1 = t.commit()
at1 = t.commit(zf, {2:'c1'})
t.change(zf, {2:'c2', 3:'d2', 5:'f2'}); at2 = t.commit()
t.change(zf, {2:'c3', 5:'f3'}); at3 = t.commit()
......
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