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
d1af8efa
Commit
d1af8efa
authored
Sep 21, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
4fec22ea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
wcfs/internal/zdata/δftail.go
wcfs/internal/zdata/δftail.go
+8
-9
No files found.
wcfs/internal/zdata/δftail.go
View file @
d1af8efa
...
...
@@ -589,19 +589,18 @@ func (δFtail *ΔFtail) SliceByFileRev(zfile *ZBigFile, lo, hi zodb.Tid) /*reado
// query .δBtail.SliceByRootRev(file.blktab, lo, hi) +
// merge δZBlk history with that.
// merging tree (δT) and Zblk (δZblk) histories into file history (δFile):
//
δT
────────·──────────────·─────────────────·────────────
//
//
δT
────────·──────────────·─────────────────·────────────
// │ │
// ↓ │
// δZblk₁ ────────────────o───────────────────o─────────────────
//
δZblk₁ ────────────────o───────────────────o─────────────────
// |
// ↓
// δZblk₂ ────────────x────────────────x────────────────────────
//
δZblk₂ ────────────x────────────────x────────────────────────
//
//
// δFile ────────o───────o──────x─────x────────────────────────
//
δFile ────────o───────o──────x─────x────────────────────────
δftail
,
err
:=
δFtail
.
rebuildIfNeeded
(
zfile
.
POid
())
...
...
@@ -675,7 +674,7 @@ func (δFtail *ΔFtail) SliceByFileRev(zfile *ZBigFile, lo, hi zodb.Tid) /*reado
}
else
{
δE
:=
vδE
[
ie
+
1
]
root
=
δE
.
oldRoot
head
=
δE
.
Rev
-
1
//
XXX ok?
head
=
δE
.
Rev
-
1
//
TODO better set to exact revision coming before this epoch
for
zblk
,
inblk
:=
range
δE
.
oldTrackSetZBlk
{
Zinblk
[
zblk
]
=
inblk
.
Clone
()
}
...
...
@@ -702,7 +701,7 @@ func (δFtail *ΔFtail) SliceByFileRev(zfile *ZBigFile, lo, hi zodb.Tid) /*reado
// at3 δTø δD{c,d,e} δ{0,1,2}
// at4 δTø δD{c,e} δ{ 1,2}
//
// if tracked={0}
for (at1,at4] query
changes to 1 should be
// if tracked={0}
, for (at1,at4] query,
changes to 1 should be
// also all present @at2, @at3 and @at4 - because @at2 both 0
// and 1 are changed in the same tracked bucket. Note that
// changes to 2 should not be present at all.
...
...
@@ -951,7 +950,7 @@ type _ΔZBigFile struct {
blktabOld
,
blktabNew
zodb
.
Oid
}
func
zfilediff
(
db
*
zodb
.
DB
,
foid
zodb
.
Oid
,
old
,
new
zodb
.
Tid
)
(
δ
*
_ΔZBigFile
,
err
error
)
{
txn
,
ctx
:=
transaction
.
New
(
context
.
TODO
())
//
XXX - merge in ctx arg?
txn
,
ctx
:=
transaction
.
New
(
context
.
TODO
())
//
TODO - merge in cancel via ctx arg
defer
txn
.
Abort
()
zconnOld
,
err
:=
db
.
Open
(
ctx
,
&
zodb
.
ConnOptions
{
At
:
old
})
if
err
!=
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