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
c6785679
Commit
c6785679
authored
May 14, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
3e55a643
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
wcfs/internal/xbtree.py
wcfs/internal/xbtree.py
+9
-0
No files found.
wcfs/internal/xbtree.py
View file @
c6785679
...
...
@@ -371,6 +371,15 @@ def Restructure(ztree, newStructure):
zrbucketv
.
sort
(
key
=
lambda
rn
:
rn
.
range
.
klo
)
rbucketv
.
sort
(
key
=
lambda
rn
:
rn
.
range
.
klo
)
# verify that old keys == new keys
zkeys
=
set
()
keys
=
set
()
for
_
in
zrbucketv
:
zkeys
.
update
(
_
.
node
.
keys
())
for
_
in
rbucketv
:
keys
.
update
(
_
.
node
.
keyv
)
assert
set
(
kv
.
keys
())
==
zkeys
if
zkeys
!=
keys
:
raise
ValueError
(
"new keys != old keys
\
n
diff: %s"
%
zkeys
.
symmetric_difference
(
keys
))
# chain buckets via .next_bucket
assert
len
(
rbucketv
)
>
0
for
i
in
range
(
len
(
rbucketv
)
-
1
):
...
...
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