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
c3efda8d
Commit
c3efda8d
authored
May 21, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
4dbec911
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
wcfs/testprog/treedelta-genallstructs.py
wcfs/testprog/treedelta-genallstructs.py
+4
-2
No files found.
wcfs/testprog/treedelta-genallstructs.py
View file @
c3efda8d
...
@@ -44,7 +44,7 @@ XXX
...
@@ -44,7 +44,7 @@ XXX
from
__future__
import
print_function
,
absolute_import
from
__future__
import
print_function
,
absolute_import
import
sys
import
sys
from
golang
import
func
,
defer
from
golang
import
func
,
defer
,
panic
from
golang
import
time
from
golang
import
time
from
ZODB
import
DB
from
ZODB
import
DB
import
transaction
import
transaction
...
@@ -54,6 +54,8 @@ from wendelin.wcfs.internal import xbtree
...
@@ -54,6 +54,8 @@ from wendelin.wcfs.internal import xbtree
from
wendelin.bigfile.file_zodb
import
ZBlk
from
wendelin.bigfile.file_zodb
import
ZBlk
from
zodbtools.util
import
storageFromURL
from
zodbtools.util
import
storageFromURL
import
BTrees.LOBTree
# kvEncode encodes key->value maping into text.
# kvEncode encodes key->value maping into text.
# e.g. {1:'a', 2:'b'} -> '1:a,2:b'
# e.g. {1:'a', 2:'b'} -> '1:a,2:b'
...
@@ -156,7 +158,7 @@ def treedeltaGenAllStructs(zstor, kv1txt, kv2txt, n):
...
@@ -156,7 +158,7 @@ def treedeltaGenAllStructs(zstor, kv1txt, kv2txt, n):
t2AllStructs
=
list
(
xbtree
.
AllStructs
(
kv2
.
keys
(),
maxdepth
,
maxsplit
))
t2AllStructs
=
list
(
xbtree
.
AllStructs
(
kv2
.
keys
(),
maxdepth
,
maxsplit
))
# emit initial kv1 state prepared as ZODB would natively
# emit initial kv1 state prepared as ZODB would natively
ztree
=
valdict
[
'treedelta/tree'
]
=
XLOTree
(
)
ztree
=
valdict
[
'treedelta/tree'
]
=
BTrees
.
LOBTree
.
LOBTree
()
# XXX -> XLOTree (small nodes
)
for
k
in
sorted
(
kv1
):
for
k
in
sorted
(
kv1
):
ztree
[
k
]
=
kv1
[
k
]
ztree
[
k
]
=
kv1
[
k
]
transaction
.
commit
()
transaction
.
commit
()
...
...
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