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
c267c969
Commit
c267c969
authored
Sep 22, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
c0b25b92
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
13 deletions
+2
-13
wcfs/internal/xbtree/treediff.go
wcfs/internal/xbtree/treediff.go
+2
-13
No files found.
wcfs/internal/xbtree/treediff.go
View file @
c267c969
...
@@ -171,23 +171,13 @@ func δZConnectTracked(δZv []zodb.Oid, T blib.PPTreeSubSet) (δZTC setOid, δto
...
@@ -171,23 +171,13 @@ func δZConnectTracked(δZv []zodb.Oid, T blib.PPTreeSubSet) (δZTC setOid, δto
// XXX place
// XXX place
// nodeInRange represents a Node coming under [lo, hi_] key range in its tree.
// nodeInRange represents a Node coming under [lo, hi_] key range in its tree.
type
nodeInRange
struct
{
type
nodeInRange
struct
{
prefix
[]
zodb
.
Oid
// path to this node goes via this objects
prefix
[]
zodb
.
Oid
// path to this node goes via this objects
keycov
blib
.
KeyRange
keycov
blib
.
KeyRange
// key coverage
node
Node
node
Node
done
bool
// whether this node was already taken into account while computing diff
done
bool
// whether this node was already taken into account while computing diff
}
}
// XXX place, doc
// XXX place, doc
/*
func (n *nodeInRange) NodePath() []Node {
path := []Node{}
for n != nil {
path = append([]Node{n.node}, path...)
n = n.parent
}
return path
}
*/
func
(
n
*
nodeInRange
)
Path
()
[]
zodb
.
Oid
{
func
(
n
*
nodeInRange
)
Path
()
[]
zodb
.
Oid
{
// return full copy - else .prefix can become aliased in between children of a node
// return full copy - else .prefix can become aliased in between children of a node
return
append
([]
zodb
.
Oid
{},
append
(
n
.
prefix
,
n
.
node
.
POid
())
...
)
return
append
([]
zodb
.
Oid
{},
append
(
n
.
prefix
,
n
.
node
.
POid
())
...
)
...
@@ -275,7 +265,6 @@ func (prs *rangeSplit) Expand(rnode *nodeInRange) (children rangeSplit) {
...
@@ -275,7 +265,6 @@ func (prs *rangeSplit) Expand(rnode *nodeInRange) (children rangeSplit) {
// GetToLeaf expands step-by-step every tree through which it has to traverse to next depth level.
// GetToLeaf expands step-by-step every tree through which it has to traverse to next depth level.
//
//
// GetToLeaf panics if k is not covered.
// GetToLeaf panics if k is not covered.
// XXX also return path?
func
(
prs
*
rangeSplit
)
GetToLeaf
(
ctx
context
.
Context
,
k
Key
)
(
*
nodeInRange
,
error
)
{
func
(
prs
*
rangeSplit
)
GetToLeaf
(
ctx
context
.
Context
,
k
Key
)
(
*
nodeInRange
,
error
)
{
rnode
,
ok
,
err
:=
prs
.
GetToLeaf_
(
ctx
,
k
)
rnode
,
ok
,
err
:=
prs
.
GetToLeaf_
(
ctx
,
k
)
if
err
==
nil
&&
!
ok
{
if
err
==
nil
&&
!
ok
{
...
...
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