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
10ca3c4e
Commit
10ca3c4e
authored
Jun 24, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
1233d221
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
3 deletions
+31
-3
wcfs/δbtail.go
wcfs/δbtail.go
+31
-3
No files found.
wcfs/δbtail.go
View file @
10ca3c4e
...
@@ -764,9 +764,37 @@ func diffT(ctx context.Context, a, b *Tree, δZTC SetOid, trackIdx map[zodb.Oid]
...
@@ -764,9 +764,37 @@ func diffT(ctx context.Context, a, b *Tree, δZTC SetOid, trackIdx map[zodb.Oid]
aq
:=
[]
*
nodeInRange
{
atop
}
// stack
aq
:=
[]
*
nodeInRange
{
atop
}
// stack
for
len
(
aq
)
>
0
{
for
len
(
aq
)
>
0
{
l
:=
len
(
aq
)
l
:=
len
(
aq
)
arn
:=
aq
[
l
-
1
];
aq
=
aq
[
:
l
-
1
]
// arn=aq.pop()
arn
:=
aq
[
l
-
1
];
aq
=
aq
[
:
l
-
1
]
// arn=aq.pop()
err
:=
arn
.
node
.
PActivate
(
ctx
);
if
err
!=
nil
{
return
nil
,
err
}
atree
:=
arn
.
node
.
(
*
Tree
)
// ok - only trees in aq
defer
arn
.
node
.
PDeactivate
()
err
=
atree
.
PActivate
(
ctx
);
if
err
!=
nil
{
return
nil
,
err
}
defer
atree
.
PDeactivate
()
if
len
(
atree
.
Entryv
())
==
0
{
// empty tree - do not expand into bucket - only process tracked holes
// XXX dup wrt bucket processing?
track
,
ok
:=
trackIdx
[
atree
.
POid
()]
if
!
ok
{
panicf
(
"%s ∈ δZTC, but ∉ trackIdx"
,
vnode
(
atree
))
}
δA
:=
map
[
Key
]
ΔValue
{}
for
k
:=
range
track
.
holes
{
δA
[
k
]
=
ΔValue
{
VDEL
,
VDEL
}
// ø->ø indicates hole
}
// δ <- δA
err
=
δMerge
(
δ
,
δA
)
if
err
!=
nil
{
return
nil
,
err
}
// Adone <- δA
// Bqueue <- δA
for
k
:=
range
δA
{
Adone
.
Add
(
k
)
Bqueue
.
Add
(
k
)
}
continue
}
children
:=
av
.
Expand
(
arn
)
children
:=
av
.
Expand
(
arn
)
// fmt.Printf("Y children: %s\n", children)
// fmt.Printf("Y children: %s\n", children)
...
...
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