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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Joshua
wendelin.core
Commits
a06e0835
Commit
a06e0835
authored
Apr 03, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
6392de1d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
1 deletion
+34
-1
wcfs/internal/xbtree/δbtail.go
wcfs/internal/xbtree/δbtail.go
+1
-1
wcfs/misc.go
wcfs/misc.go
+33
-0
No files found.
wcfs/internal/xbtree/δbtail.go
View file @
a06e0835
...
...
@@ -210,7 +210,7 @@ func (δB *ΔTail) update() {
/*
δbZ = {}
for δ in δZ:
.
root
Idx[δ]:
.
track
Idx[δ]:
ø -> nothing
root -> δbZ[root] += δ
...
...
wcfs/misc.go
View file @
a06e0835
...
...
@@ -676,6 +676,16 @@ type ΔFTail struct {
fileIdx
map
[
*
btree
.
LOBTree
]
SetBigFile
// root -> {} BigFile XXX root -> oid?
}
type
ΔFentry
struct
{
Rev
zodb
.
Tid
Changev
[]
ΔFile
}
type
ΔFile
struct
{
File
*
BigFile
Blkv
[]
int64
}
func
NewΔFTail
(
at0
zodb
.
Tid
)
*
ΔFTail
{
return
&
ΔFTail
{
ΔTail
:
xbtree
.
NewΔTail
(
at0
),
...
...
@@ -694,6 +704,29 @@ func (δf *ΔFTail) Track(file *BigFile, path []btree.LONode) {
files
.
Add
(
file
)
}
func
(
δf
*
ΔFTail
)
Update
(
δZ
*
zodb
.
EventCommit
)
ΔFentry
{
δf
.
ΔTail
.
Update
(
δZ
)
δB
:=
xbtree
.
ΔRevEntry
{}
// XXX stub
var
changev
[]
ΔFile
// δB.Changev root -> file (via .fileIdx)
for
_
,
δ
:=
range
δB
.
Changev
{
files
:=
δf
.
fileIdx
[
δ
.
Root
]
if
len
(
files
)
==
0
{
panic
(
fmt
.
Sprintf
(
"ΔFTail: root<%s> -> ø file"
,
δ
.
Root
.
POid
()))
}
for
file
:=
range
files
{
changev
=
append
(
changev
,
ΔFile
{
File
:
file
,
Blkv
:
δ
.
Keyv
,
})
}
}
return
ΔFentry
{
Rev
:
δB
.
Rev
,
Changev
:
changev
,
}
}
// ---- make df happy (else it complains "function not supported") ----
...
...
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