Commit b3980285 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent ceef9fba
......@@ -18,19 +18,24 @@
#
# See COPYING file for full licensing terms.
# See https://www.nexedi.com/licensing for rationale and options.
"""Program treedelta-genallstructs commits subset of all possible tree changes
in between two trees specified key->value sets.
"""Program treedelta-genallstructs generates subset of all possible tree changes
in between two trees that represent two specified key->value dicts.
It is used as helper for ΔBTree tests.
Usage: <prog> <n> <zurl> <kv1> <kv2>
Usage: treedelta-genallstructs <zurl> <n> <kv1> <kv2>
It generates ZODB commits with <tree1> -> <tree2> changes for subset of all
possible tree topologies tree1 and tree2 that can represent kv1 and kv2
correspondingly.
correspondingly:
For every made commit it prints to stdout:
For every kv the following tree topologies are used: 1) native (the one that
ZODB would usually create natively via regular usage), and 2) n random ones.
Then every pair of topology change in between tree1 and tree2 is considered and
corresponding commit is made with the tree undergoing kv1->kv2 change with
tree1->tree2 transition in the database.
For every commit the following is printed to stdout:
tid <tid> # <tree1> -> <tree2>
tree <oid>
......@@ -38,7 +43,6 @@ tree <oid>
<LF>
XXX
"""
from __future__ import print_function, absolute_import
......@@ -183,7 +187,7 @@ def test_bitravel2Way():
test_bitravel2Way()
# kvEncode encodes key->value maping into text.
# kvEncode encodes key->value mapping into text.
# e.g. {1:'a', 2:'b'} -> '1:a,2:b'
def kvEncode(kvDict, vencode): # -> kvText
retv = []
......
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