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
cc4a3644
Commit
cc4a3644
authored
May 12, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
cdab1972
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
38 deletions
+33
-38
wcfs/internal/xbtree.py
wcfs/internal/xbtree.py
+33
-38
No files found.
wcfs/internal/xbtree.py
View file @
cc4a3644
...
@@ -368,10 +368,10 @@ def Restructure(ztree, newStructure):
...
@@ -368,10 +368,10 @@ def Restructure(ztree, newStructure):
for
rnodev
in
rlevelv
:
for
rnodev
in
rlevelv
:
for
rn
in
rnodev
:
for
rn
in
rnodev
:
node
=
rn
.
node
node
=
rn
.
node
assert
isinstance
(
node
,
Tree
),
node
# buckets were filtered out to rbucketv
assert
isinstance
(
node
,
(
Tree
,
Bucket
))
znode
=
node
.
Z
# https://github.com/zopefoundation/BTrees/blob/4.5.0-1-gc8bf24e/BTrees/BTreeTemplate.c#L1087
# https://github.com/zopefoundation/BTrees/blob/4.5.0-1-gc8bf24e/BTrees/BTreeTemplate.c#L1087
if
isinstance
(
node
,
Tree
):
zstate
=
unset
=
object
()
zstate
=
unset
=
object
()
if
len
(
node
.
keyv
)
==
0
:
if
len
(
node
.
keyv
)
==
0
:
child
=
node
.
children
[
0
]
child
=
node
.
children
[
0
]
...
@@ -396,13 +396,8 @@ def Restructure(ztree, newStructure):
...
@@ -396,13 +396,8 @@ def Restructure(ztree, newStructure):
# firstbucket
# firstbucket
zstate
+=
(
None
,)
# XXX
zstate
+=
(
None
,)
# XXX
znode
.
__setstate__
(
zstate
)
# ----//---- for buckets
for
rbucket
in
rbucketv
:
node
=
rbucket
.
node
# https://github.com/zopefoundation/BTrees/blob/4.5.0-1-gc8bf24e/BTrees/BucketTemplate.c#L1195
# https://github.com/zopefoundation/BTrees/blob/4.5.0-1-gc8bf24e/BTrees/BucketTemplate.c#L1195
if
isinstance
(
node
,
Bucket
):
zstate
=
()
zstate
=
()
for
k
in
node
.
keyv
:
for
k
in
node
.
keyv
:
zstate
+=
(
k
,
kv
.
pop
(
k
))
# (k1, v1, k2, v2, ..., kN, vN)
zstate
+=
(
k
,
kv
.
pop
(
k
))
# (k1, v1, k2, v2, ..., kN, vN)
...
...
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