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
899dbc2c
Commit
899dbc2c
authored
Apr 14, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
fcbc604b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
wcfs/internal/xbtree/δbtail.go
wcfs/internal/xbtree/δbtail.go
+12
-0
wcfs/δftail.go
wcfs/δftail.go
+1
-1
No files found.
wcfs/internal/xbtree/δbtail.go
View file @
899dbc2c
...
...
@@ -228,6 +228,18 @@ func (btail *ΔTail) Update(δZ *zodb.EventCommit) []ΔTree {
// func (btail *ΔTail) update()
// XXX -> Get(root, key, at) -> (valueOid, rev) ?
// GetAt returns root[key] as of @at database state plus revision that changed it.
//
// if revExact=False - rev is upper estimate for the revision.
//
// XXX only tracked set?
//
// XXX at must ∈ (tail, head] XXX [tail ?
func
(
btail
*
ΔTail
)
GetAt
(
root
*
Tree
,
key
Key
,
at
zodb
.
Tid
)
(
value
Value
,
ok
bool
,
rev
zodb
.
Tid
,
revExact
bool
)
{
panic
(
"TODO"
)
}
func
(
btail
*
ΔTail
)
LastRevOf
(
root
*
Tree
,
key
Key
,
at
zodb
.
Tid
)
(
_
zodb
.
Tid
,
exact
bool
)
{
/*
lastRevOf = btail.lastRevOf[root]
...
...
wcfs/δftail.go
View file @
899dbc2c
...
...
@@ -114,7 +114,6 @@ func (δf *ΔFTail) LastRevOf(file *BigFile, blk int64, at zodb.Tid) (_ zodb.Tid
}
*/
// XXX δB.GetAt(root, key, at) at ∈ (tail, head]
// LastBlkRev returns last revision that changed file[blk] as of @at database state.
//
...
...
@@ -130,6 +129,7 @@ func (f *BigFile) LastBlkRev(blk int64, at zodb.Tid) (_ zodb.Tid, exact bool) {
zblkOid
,
ok
,
tabRev
,
tabRevExact
:=
δf
.
ΔTail
.
GetAt
(
f
.
zfile
.
blktab
,
blk
,
at
)
// block was removed
// XXX or not in tracked set?
if
!
ok
{
return
tabRev
,
tabRevExact
}
...
...
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