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
476742f8
Commit
476742f8
authored
May 15, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
1ae40c93
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
wcfs/δbtail.go
wcfs/δbtail.go
+7
-5
No files found.
wcfs/δbtail.go
View file @
476742f8
...
...
@@ -857,6 +857,7 @@ func (δBtail *ΔBtail) rebuild() (err error) {
// go backwards and merge vδT <- treediff(lo..hi/trackNew)
vδZ
:=
δBtail
.
δZtail
.
Data
()
vδtrack
:=
[]
*
δtrackIndex
{}
for
i
:=
len
(
vδZ
)
-
1
;
i
>=
0
;
i
--
{
δZ
:=
vδZ
[
i
]
...
...
@@ -904,6 +905,7 @@ func (δBtail *ΔBtail) rebuild() (err error) {
tracef
(
"-> root<%s> δkv*: %v δtrack*: %v
\n
"
,
root
,
δT
,
δtrack
)
trackNew
.
ApplyΔ
(
δtrack
)
vδtrack
=
append
([]
*
δtrackIndex
{
δtrack
},
vδtrack
...
)
if
len
(
δT
)
==
0
{
// an object might be resaved without change
continue
...
...
@@ -945,11 +947,11 @@ func (δBtail *ΔBtail) rebuild() (err error) {
}
}
//
merge trackNew in
to .trackIdx
// FIXME here trackNew was adjusted to correspond to @tail
// FIXME -> we have to map it back to correspond to @head before merge
//
// TODO -> remember δtracks from treediff; reverse them and apply them back in reverse order.
//
trackNew was adjusted to correspond to @tail. Map it back to @head and merge
to .trackIdx
for
_
,
δtrack
:=
range
vδtrack
{
δtrack
.
Reverse
()
// we saved it as lo<-hi; now we go lo->hi
trackNew
.
ApplyΔ
(
δtrack
)
}
δBtail
.
trackIdx
.
UnionInplace
(
trackNew
)
return
nil
...
...
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