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
46b5d209
Commit
46b5d209
authored
May 22, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
fe5c609d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
wcfs/testprog/treedelta-genallstructs.py
wcfs/testprog/treedelta-genallstructs.py
+10
-5
No files found.
wcfs/testprog/treedelta-genallstructs.py
View file @
46b5d209
...
@@ -61,12 +61,17 @@ from zodbtools.util import storageFromURL, ashex
...
@@ -61,12 +61,17 @@ from zodbtools.util import storageFromURL, ashex
from
persistent
import
CHANGED
from
persistent
import
CHANGED
from
persistent.mapping
import
PersistentMapping
from
persistent.mapping
import
PersistentMapping
import
BTrees.LOBTree
#from BTrees import LOBTree
# XXX hack set LOBTree.LOBTree -> XLOTree so that
# XXX hack set XLOTree module/class -> BTree.LOBTree.LOBTree so that generated
# database looks as if regular LOBTree was used. However XLOTree has small max
# node sizes (which we cannot tune directly in LOBTree)
XLOTree
=
xbtree_test
.
XLOTree
# XXX
#
#
treedeltaGenAllStructs generates subset of all possible tree changes in between kv1 and kv2.
#
kv: k₁:v₁,k₂:v₂,..
.
#
See top-level documentation for details
.
@
func
@
func
def
treedeltaGenAllStructs
(
zstor
,
kv1txt
,
kv2txt
,
n
,
seed
=
None
):
def
treedeltaGenAllStructs
(
zstor
,
kv1txt
,
kv2txt
,
n
,
seed
=
None
):
db
=
DB
(
zstor
);
defer
(
db
.
close
)
db
=
DB
(
zstor
);
defer
(
db
.
close
)
...
@@ -112,7 +117,7 @@ def treedeltaGenAllStructs(zstor, kv1txt, kv2txt, n, seed=None):
...
@@ -112,7 +117,7 @@ def treedeltaGenAllStructs(zstor, kv1txt, kv2txt, n, seed=None):
t2AllStructs
=
list
(
xbtree
.
AllStructs
(
kv2
.
keys
(),
maxdepth
,
maxsplit
))
t2AllStructs
=
list
(
xbtree
.
AllStructs
(
kv2
.
keys
(),
maxdepth
,
maxsplit
))
# create the tree
# create the tree
ztree
=
root
[
'treedelta/tree'
]
=
xbtree_test
.
XLOTree
()
ztree
=
root
[
'treedelta/tree'
]
=
XLOTree
()
commit
(
'treedelta/tree'
)
commit
(
'treedelta/tree'
)
# XXX print something?
# XXX print something?
...
...
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