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
f473db65
Commit
f473db65
authored
May 31, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
8a1d3f7c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
wcfs/δbtail_test.go
wcfs/δbtail_test.go
+7
-6
No files found.
wcfs/δbtail_test.go
View file @
f473db65
...
@@ -144,10 +144,11 @@ func (tg *TreeGen) Commit(tree string) (_ zodb.Tid, err error) {
...
@@ -144,10 +144,11 @@ func (tg *TreeGen) Commit(tree string) (_ zodb.Tid, err error) {
}
}
// GetTree loads LOBtree from zurl@at->obj<root>.
//
X
GetTree loads LOBtree from zurl@at->obj<root>.
// Tree values must be ZBlk whose data is returned instead of references to ZBlk.
// Tree values must be ZBlk whose data is returned instead of references to ZBlk.
func
XGetTree
(
zurl
string
,
at
zodb
.
Tid
,
root
zodb
.
Oid
)
(
_
map
[
int64
]
string
,
err
error
)
{
func
XGetTree
(
zurl
string
,
at
zodb
.
Tid
,
root
zodb
.
Oid
)
map
[
int64
]
string
{
defer
xerr
.
Contextf
(
&
err
,
"%s: @%s: get tree %s"
,
zurl
,
at
,
root
)
//defer xerr.Contextf(&err, "%s: @%s: get tree %s", zurl, at, root)
defer
exc
.
Contextf
(
"%s: @%s: get tree %s"
,
zurl
,
at
,
root
)
X
:=
exc
.
Raiseif
X
:=
exc
.
Raiseif
ctx
:=
context
.
Background
()
ctx
:=
context
.
Background
()
...
@@ -166,7 +167,7 @@ func XGetTree(zurl string, at zodb.Tid, root zodb.Oid) (_ map[int64]string, err
...
@@ -166,7 +167,7 @@ func XGetTree(zurl string, at zodb.Tid, root zodb.Oid) (_ map[int64]string, err
xztree
,
err
:=
zconn
.
Get
(
ctx
,
root
);
X
(
err
)
xztree
,
err
:=
zconn
.
Get
(
ctx
,
root
);
X
(
err
)
ztree
,
ok
:=
xztree
.
(
*
btree
.
LOBTree
)
ztree
,
ok
:=
xztree
.
(
*
btree
.
LOBTree
)
if
!
ok
{
if
!
ok
{
return
nil
,
fmt
.
Error
f
(
"expected LOBTree, got %s"
,
zodb
.
ClassOf
(
xztree
))
exc
.
Raise
f
(
"expected LOBTree, got %s"
,
zodb
.
ClassOf
(
xztree
))
}
}
err
=
ztree
.
PActivate
(
ctx
);
X
(
err
)
err
=
ztree
.
PActivate
(
ctx
);
X
(
err
)
...
@@ -183,7 +184,7 @@ func XGetTree(zurl string, at zodb.Tid, root zodb.Oid) (_ map[int64]string, err
...
@@ -183,7 +184,7 @@ func XGetTree(zurl string, at zodb.Tid, root zodb.Oid) (_ map[int64]string, err
xv
:=
__
.
Value
()
xv
:=
__
.
Value
()
zv
,
ok
:=
xv
.
(
zBlk
)
zv
,
ok
:=
xv
.
(
zBlk
)
if
!
ok
{
if
!
ok
{
return
nil
,
fmt
.
Error
f
(
"[%d] -> %s; want ZBlk"
,
k
,
typeOf
(
xv
))
exc
.
Raise
f
(
"[%d] -> %s; want ZBlk"
,
k
,
typeOf
(
xv
))
}
}
data
,
_
,
err
:=
zv
.
loadBlkData
(
ctx
);
X
(
err
)
data
,
_
,
err
:=
zv
.
loadBlkData
(
ctx
);
X
(
err
)
...
@@ -193,7 +194,7 @@ func XGetTree(zurl string, at zodb.Tid, root zodb.Oid) (_ map[int64]string, err
...
@@ -193,7 +194,7 @@ func XGetTree(zurl string, at zodb.Tid, root zodb.Oid) (_ map[int64]string, err
zbucket
=
zbucket
.
Next
()
zbucket
=
zbucket
.
Next
()
}
}
return
kv
,
nil
return
kv
}
}
func
TestΔBTail
(
t
*
testing
.
T
)
{
func
TestΔBTail
(
t
*
testing
.
T
)
{
...
...
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