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
9694761d
Commit
9694761d
authored
Jun 24, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
ece1c216
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
11 deletions
+17
-11
wcfs/δbtail.go
wcfs/δbtail.go
+17
-11
No files found.
wcfs/δbtail.go
View file @
9694761d
...
...
@@ -913,7 +913,7 @@ func diffT(ctx context.Context, a, b *Tree, δZTC SetOid, trackIdx map[zodb.Oid]
bnode
.
done
=
true
}
//
add k as hole if k is not there
//
k is not there -> +[k]ø
if
!
Bdone
.
Has
(
k
)
{
δB
:=
map
[
Key
]
ΔValue
{
k
:
{
VDEL
,
VDEL
}}
// hole
err
=
δMerge
(
δ
,
δB
);
if
err
!=
nil
{
return
nil
,
err
}
...
...
@@ -927,8 +927,7 @@ func diffT(ctx context.Context, a, b *Tree, δZTC SetOid, trackIdx map[zodb.Oid]
Bqueue
=
SetKey
{}
for
k
:=
range
Aqueue
{
fmt
.
Printf
(
" A [%v]
\n
"
,
k
)
Adone
.
Add
(
k
)
abucket
,
ok
,
err
:=
av
.
GetToLeaf
(
ctx
,
k
)
anode
,
ok
,
err
:=
av
.
GetToLeaf
(
ctx
,
k
)
if
err
!=
nil
{
return
nil
,
err
}
...
...
@@ -939,13 +938,13 @@ func diffT(ctx context.Context, a, b *Tree, δZTC SetOid, trackIdx map[zodb.Oid]
// XXX check for anode.node.(*Tree) (ø tree case)
// - bucket if not already done
// XXX also extract holes
if
!
abucket
.
done
{
δA
,
err
:=
diffB
(
ctx
,
abucket
.
node
.
(
*
Bucket
),
nil
)
// - bucket if that bucket is reached for the first time
if
!
anode
.
done
{
δA
,
err
:=
diffB
(
ctx
,
anode
.
node
.
(
*
Bucket
),
nil
)
if
err
!=
nil
{
return
nil
,
err
}
// XXX also extract holes
// δ <- δA
err
=
δMerge
(
δ
,
δA
)
...
...
@@ -953,14 +952,21 @@ func diffT(ctx context.Context, a, b *Tree, δZTC SetOid, trackIdx map[zodb.Oid]
return
nil
,
err
}
// Adone <- δA
// Bqueue <- δA
for
k
:=
range
δA
{
if
!
Bdone
.
Has
(
k
)
{
Bqueue
.
Add
(
k
)
for
k_
:=
range
δA
{
Adone
.
Add
(
k_
)
if
!
Bdone
.
Has
(
k_
)
{
Bqueue
.
Add
(
k_
)
}
}
abucket
.
done
=
true
anode
.
done
=
true
}
// k is not there -> -[k]ø
if
!
Adone
.
Has
(
k
)
{
// XXX
}
fmt
.
Printf
(
" av: %s
\n
"
,
av
)
...
...
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