Commit 46b5d209 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent fe5c609d
...@@ -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?
......
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