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
011fafc5
Commit
011fafc5
authored
Jun 19, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
63daf19e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
wcfs/δbtail.go
wcfs/δbtail.go
+13
-4
No files found.
wcfs/δbtail.go
View file @
011fafc5
...
@@ -415,8 +415,8 @@ func diffX(ctx context.Context, a, b Node, δZTC SetOid) (δ map[Key]Value, err
...
@@ -415,8 +415,8 @@ func diffX(ctx context.Context, a, b Node, δZTC SetOid) (δ map[Key]Value, err
// a, b point to top of the subtree @old and @new revisions.
// a, b point to top of the subtree @old and @new revisions.
// δZTC is connected set of objects covering δZT (objects changed in this tree in old..new).
// δZTC is connected set of objects covering δZT (objects changed in this tree in old..new).
func
diffT
(
ctx
context
.
Context
,
a
,
b
*
Tree
,
δZTC
SetOid
)
(
δ
map
[
Key
]
Value
,
err
error
)
{
func
diffT
(
ctx
context
.
Context
,
a
,
b
*
Tree
,
δZTC
SetOid
)
(
δ
map
[
Key
]
Value
,
err
error
)
{
fmt
.
Printf
(
" T
%s
\n
"
,
a
.
POid
(
))
fmt
.
Printf
(
" T
%s %s
\n
"
,
xidOf
(
a
),
xidOf
(
b
))
defer
xerr
.
Contextf
(
&
err
,
"diffT %s
"
,
a
.
POid
(
))
defer
xerr
.
Contextf
(
&
err
,
"diffT %s
%s"
,
xidOf
(
a
),
xidOf
(
b
))
if
a
.
POid
()
!=
b
.
POid
()
{
if
a
.
POid
()
!=
b
.
POid
()
{
panic
(
"different trees"
)
panic
(
"different trees"
)
}
}
...
@@ -491,8 +491,8 @@ func diffT(ctx context.Context, a, b *Tree, δZTC SetOid) (δ map[Key]Value, err
...
@@ -491,8 +491,8 @@ func diffT(ctx context.Context, a, b *Tree, δZTC SetOid) (δ map[Key]Value, err
// diffB computes difference in between two revisions of a bucket.
// diffB computes difference in between two revisions of a bucket.
// see diffX for details.
// see diffX for details.
func
diffB
(
ctx
context
.
Context
,
a
,
b
*
Bucket
)
(
δ
map
[
Key
]
Value
,
err
error
)
{
func
diffB
(
ctx
context
.
Context
,
a
,
b
*
Bucket
)
(
δ
map
[
Key
]
Value
,
err
error
)
{
fmt
.
Printf
(
" B
%s
\n
"
,
a
.
POid
(
))
fmt
.
Printf
(
" B
%s %s
\n
"
,
xidOf
(
a
),
xidOf
(
b
))
defer
xerr
.
Contextf
(
&
err
,
"diffB %s
"
,
a
.
POid
(
))
defer
xerr
.
Contextf
(
&
err
,
"diffB %s
%s"
,
xidOf
(
a
),
xidOf
(
b
))
// XXX oid can be InvalidOid for T/B... (i.e. B is part of T and is not yet committed separately)
// XXX oid can be InvalidOid for T/B... (i.e. B is part of T and is not yet committed separately)
if
a
.
POid
()
!=
b
.
POid
()
{
if
a
.
POid
()
!=
b
.
POid
()
{
panic
(
"different buckets"
)
panic
(
"different buckets"
)
...
@@ -587,6 +587,15 @@ func vOid(xvalue interface{}) (zodb.Oid, error) {
...
@@ -587,6 +587,15 @@ func vOid(xvalue interface{}) (zodb.Oid, error) {
return
value
.
POid
(),
nil
return
value
.
POid
(),
nil
}
}
// xidOf return string representation of object xid.
func
xidOf
(
obj
zodb
.
IPersistent
)
string
{
if
obj
==
nil
{
return
"ø"
}
xid
:=
zodb
.
Xid
{
At
:
obj
.
PJar
()
.
At
(),
Oid
:
obj
.
POid
()}
return
xid
.
String
()
}
func
(
δBtail
*
ΔBtail
)
ForgetPast
(
revCut
zodb
.
Tid
)
{
func
(
δBtail
*
ΔBtail
)
ForgetPast
(
revCut
zodb
.
Tid
)
{
...
...
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