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
1cd2aa17
Commit
1cd2aa17
authored
Apr 14, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
987daea8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
3 deletions
+20
-3
wcfs/δftail.go
wcfs/δftail.go
+20
-3
No files found.
wcfs/δftail.go
View file @
1cd2aa17
...
@@ -112,15 +112,32 @@ func (δf *ΔFTail) LastRevOf(file *BigFile, blk int64, at zodb.Tid) (_ zodb.Tid
...
@@ -112,15 +112,32 @@ func (δf *ΔFTail) LastRevOf(file *BigFile, blk int64, at zodb.Tid) (_ zodb.Tid
panic
(
"TODO"
)
panic
(
"TODO"
)
}
}
// XXX δB.GetAt(root, key, at) at ∈ (tail, head]
// LastBlkRev returns last revision that changed file[blk] as of @at database state.
// LastBlkRev returns last revision that changed file[blk] as of @at database state.
//
//
// if exact=False - what is returned is only an upper bound for last block revision.
// if exact=False - what is returned is only an upper bound for last block revision.
//
// at must ∈ (tail, head] XXX [tail ?
func
(
f
*
BigFile
)
LastBlkRev
(
blk
int64
,
at
zodb
.
Tid
)
(
_
zodb
.
Tid
,
exact
bool
)
{
func
(
f
*
BigFile
)
LastBlkRev
(
blk
int64
,
at
zodb
.
Tid
)
(
_
zodb
.
Tid
,
exact
bool
)
{
δf
:=
f
.
head
.
bfdir
.
δFtail
δf
:=
f
.
head
.
bfdir
.
δFtail
// revision of when blktab[blk] entry changed last.
// revision of when blktab[blk] entry changed last.
treeKeyRev
,
exact
:=
δf
.
ΔTail
.
LastRevOf
(
f
.
zfile
.
blktab
,
blk
,
at
)
// XXX activate?
//treeKeyRev, exact := δf.ΔTail.LastRevOf(f.zfile.blktab, blk, at) // XXX activate?
_
=
treeKeyRev
panic
(
"TODO"
)
zblkOid
,
ok
,
tabRev
,
tabRevExact
:=
δf
.
ΔTail
.
GetAt
(
f
.
zfile
.
blktab
,
blk
,
at
)
// block was removed
if
!
ok
{
return
tabTev
,
tabRevExact
}
// blktab[blk] was changed to point to a zblk @rev.
// blk revision is max rev and when zblk changed last in (rev, at] range.
zblkRev
,
zblkExact
:=
δZ
.
LastRevOf
(
zblkOid
,
at
)
if
zblkRev
>
rev
{
return
zblkRev
,
zblkRevExact
}
else
{
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