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
c5552417
Commit
c5552417
authored
Jul 08, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
578232ad
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
2 deletions
+20
-2
wcfs/internal/xbtree/xbtreetest/treegen.py
wcfs/internal/xbtree/xbtreetest/treegen.py
+20
-2
No files found.
wcfs/internal/xbtree/xbtreetest/treegen.py
View file @
c5552417
...
@@ -221,9 +221,27 @@ def TreesSrv(zstor, r):
...
@@ -221,9 +221,27 @@ def TreesSrv(zstor, r):
assert
D
.
startswith
(
'D'
)
assert
D
.
startswith
(
'D'
)
kv
=
kvDecode
(
t
[
1
:],
zctx
.
vdecode
)
kv
=
kvDecode
(
t
[
1
:],
zctx
.
vdecode
)
zv
=
_kvDecode
(
D
[
1
:],
kdecode
=
lambda
ktxt
:
ktxt
,
vdecode
=
lambda
vtxt
:
vtxt
)
zv
=
_kvDecode
(
D
[
1
:],
kdecode
=
lambda
ktxt
:
ktxt
,
vdecode
=
lambda
vtxt
:
vtxt
)
zdataTab
=
zctx
.
root
[
'treegen/values'
]
patch
(
ztree
,
diff
(
ztree
,
kv
),
kv
)
patch
(
ztree
,
diff
(
ztree
,
kv
),
kv
)
patch
(
zdataTab
,
diff
(
zdataTab
,
zv
),
zv
)
# XXX v->ZBlk(v)
# ~ patch(valdict, diff(valdict,zv)) but sets zblk.value on change
valdict
=
zctx
.
root
[
'treegen/values'
]
vkeys
=
set
(
valdict
.
keys
())
vkeys
.
update
(
zv
.
keys
())
for
k
in
vkeys
:
zblk
=
valdict
.
get
(
k
)
v1
=
None
if
zblk
is
not
None
:
v1
=
zblk
.
loadblkdata
()
v2
=
zv
.
get
(
k
)
if
v1
!=
v2
:
if
v1
is
None
:
zblk
=
ZBlk
()
valdict
[
k
]
=
zblk
if
v2
is
not
None
:
zblk
.
setblkdata
(
v2
)
zblk
.
_p_changed
=
True
elif
v2
is
None
:
del
valdict
[
k
]
head
=
commit
(
subj
)
head
=
commit
(
subj
)
xprint
(
"%s"
%
ashex
(
head
))
xprint
(
"%s"
%
ashex
(
head
))
...
...
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