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
73f2165f
Commit
73f2165f
authored
May 12, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
24d61b19
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
wcfs/internal/xbtree.py
wcfs/internal/xbtree.py
+6
-9
No files found.
wcfs/internal/xbtree.py
View file @
73f2165f
...
...
@@ -165,13 +165,6 @@ class Bucket(object):
# The structure is represented as Tree and Bucket nodes.
def
StructureOf
(
znode
):
ztype
=
_zclassify
(
znode
)
"""
typ = type(znode)
is_tree = ("Tree" in typ.__name__)
is_set = ("Set" in typ.__name__)
is_bucket = (("Bucket" in typ.__name__) or re.match("..Set", typ.__name__))
is_map = (not is_set)
"""
if
ztype
.
is_zbucket
:
keys
,
_
=
zbcheck
.
crack_bucket
(
znode
,
ztype
.
is_map
)
...
...
@@ -198,9 +191,13 @@ def StructureOf(znode):
# Restructure reorganizes ZODB BTree instance (not Tree) according to specified
# structure.
def
Restructure
(
ztree
,
newStructure
):
#assert isztree(ztree) # XXX reenable, -> use zbcheck.classify
_
=
_zclassify
(
ztree
)
assert
_
.
is_ztree
assert
isinstance
(
newStructure
,
Tree
)
ztreeType
=
type
(
ztree
)
zbucketType
=
ztreeType
.
_bucket_type
_bcheck
(
ztree
)
# verify ztree before our tweaks
# dict with all k->v from ztree
...
...
@@ -434,7 +431,7 @@ def _zwalkBFS(ztree): # i[] of [](of nodes on each level)
assert
_
.
is_ztree
ztreeType
=
type
(
ztree
)
zbucketType
=
ztree
.
_bucket_type
zbucketType
=
ztree
Type
.
_bucket_type
currentq
=
[]
nextq
=
[
ztree
]
...
...
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