Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
wendelin.core
Commits
b3980285
Commit
b3980285
authored
May 22, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
ceef9fba
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
wcfs/testprog/treedelta-genallstructs.py
wcfs/testprog/treedelta-genallstructs.py
+11
-7
No files found.
wcfs/testprog/treedelta-genallstructs.py
View file @
b3980285
...
...
@@ -18,19 +18,24 @@
#
# See COPYING file for full licensing terms.
# See https://www.nexedi.com/licensing for rationale and options.
"""Program treedelta-genallstructs
commit
s subset of all possible tree changes
in between two trees
specified key->value se
ts.
"""Program treedelta-genallstructs
generate
s subset of all possible tree changes
in between two trees
that represent two specified key->value dic
ts.
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 map
p
ing into text.
# e.g. {1:'a', 2:'b'} -> '1:a,2:b'
def
kvEncode
(
kvDict
,
vencode
):
# -> kvText
retv
=
[]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment