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
151a018d
Commit
151a018d
authored
May 18, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
4d2e469c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
10 deletions
+5
-10
wcfs/internal/xbtree.py
wcfs/internal/xbtree.py
+5
-10
No files found.
wcfs/internal/xbtree.py
View file @
151a018d
...
...
@@ -226,7 +226,7 @@ def Restructure(ztree, newStructure):
ztreeType
=
type
(
ztree
)
zbucketType
=
ztreeType
.
_bucket_type
_
bcheck
(
ztree
)
# verify ztree before our tweaks
_
zbcheck
(
ztree
)
# verify ztree before our tweaks
print
()
# dict with all k->v from ztree
...
...
@@ -471,7 +471,7 @@ def Restructure(ztree, newStructure):
print
(
'new struct:'
)
print
(
StructureOf
(
ztree
))
print
()
_
bcheck
(
ztree
)
# verify ztree after our tweaks
_
zbcheck
(
ztree
)
# verify ztree after our tweaks
tstruct
=
StructureOf
(
ztree
)
if
tstruct
!=
newStructure
:
panic
(
"BUG: Restructure: result structure is not what was"
...
...
@@ -559,12 +559,8 @@ def _keyvSliceBy(keyv, klo, khi):
return
list
([
k
for
k
in
keyv
if
(
klo
<=
k
<
khi
)])
# _iterSplitByN iterates through all nsplit splitting of [lo, hi) range.
# hi > lo
# XXX nsplit > ...
# lo < si < hi
# si < s_{i+1}
#
#
XXX remove lo and hi from the output?
#
lo < si < s_{i+1} < hi
def
_iterSplitByN
(
lo
,
hi
,
nsplit
):
# -> i[] of [lo, s1, s2, ..., sn, hi)
assert
lo
<=
hi
assert
nsplit
>=
0
...
...
@@ -578,7 +574,6 @@ def _iterSplitByN(lo, hi, nsplit): # -> i[] of [lo, s1, s2, ..., sn, hi)
yield
[
lo
]
+
tail
# ---- topology encoding ----
# TopoEncode returns topology encoding for internal structure of the tree.
...
...
@@ -833,10 +828,10 @@ def _zclassify(znode): # -> _ZNodeType
return
_
# _bcheck performs full consistency checks on ztree provided by ZODB.
# _
z
bcheck performs full consistency checks on ztree provided by ZODB.
#
# The checks are what is provided by BTree.check and node._check().
def
_bcheck
(
ztree
):
def
_
z
bcheck
(
ztree
):
# verify internal C-level pointers consistency.
#
# Only valid to be called on root node and verifies whole tree.
...
...
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