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
86237665
Commit
86237665
authored
Sep 13, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
8c20a48a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
6 deletions
+20
-6
wcfs/internal/xbtree/xbtreetest/testing.go
wcfs/internal/xbtree/xbtreetest/testing.go
+1
-1
wcfs/internal/xbtree/xbtreetest/treegen.go
wcfs/internal/xbtree/xbtreetest/treegen.go
+8
-0
wcfs/internal/xbtree/xbtreetest/treegen.py
wcfs/internal/xbtree/xbtreetest/treegen.py
+10
-3
wcfs/internal/xbtree/xbtreetest/xbtreetest.go
wcfs/internal/xbtree/xbtreetest/xbtreetest.go
+0
-1
wcfs/internal/xzodb/xzodb.go
wcfs/internal/xzodb/xzodb.go
+1
-1
No files found.
wcfs/internal/xbtree/xbtreetest/testing.go
View file @
86237665
...
@@ -58,7 +58,7 @@ func N(short, medium, long int) int {
...
@@ -58,7 +58,7 @@ func N(short, medium, long int) int {
// NewRand returns new random-number generator and seed that was used to initialize it.
// NewRand returns new random-number generator and seed that was used to initialize it.
//
//
// The seed can be controlled via -randseed option
g
.
// The seed can be controlled via -randseed option.
func
NewRand
()
(
rng
*
rand
.
Rand
,
seed
int64
)
{
func
NewRand
()
(
rng
*
rand
.
Rand
,
seed
int64
)
{
seed
=
*
randseedFlag
seed
=
*
randseedFlag
if
seed
==
-
1
{
if
seed
==
-
1
{
...
...
wcfs/internal/xbtree/xbtreetest/treegen.go
View file @
86237665
...
@@ -182,6 +182,14 @@ func StartAllStructsSrv() (_ *AllStructsSrv, err error) {
...
@@ -182,6 +182,14 @@ func StartAllStructsSrv() (_ *AllStructsSrv, err error) {
// Commit creates new commit with underlying tree changed to specified tree topology.
// Commit creates new commit with underlying tree changed to specified tree topology.
//
// The following topologies are treated specially:
//
// - "ø" requests deletion of the tree, and
// - "øf" requests deletion of ZBigFile, that is referencing the tree.
// - "t<kv> D<data-kv>" changes both tree natively, and ZBlk data objects.
//
// see treegen.py for details.
func
(
tg
*
TreeSrv
)
Commit
(
tree
string
)
(
_
zodb
.
Tid
,
err
error
)
{
func
(
tg
*
TreeSrv
)
Commit
(
tree
string
)
(
_
zodb
.
Tid
,
err
error
)
{
defer
xerr
.
Contextf
(
&
err
,
"tree.srv %s: commit %s"
,
tg
.
zurl
,
tree
)
defer
xerr
.
Contextf
(
&
err
,
"tree.srv %s: commit %s"
,
tg
.
zurl
,
tree
)
...
...
wcfs/internal/xbtree/xbtreetest/treegen.py
View file @
86237665
...
@@ -65,7 +65,9 @@ session example:
...
@@ -65,7 +65,9 @@ session example:
S: 03d85dd871718899
S: 03d85dd871718899
...
...
XXX describe ø command
The following topology is treated specially:
- "ø" requests deletion of the tree.
allstructs
allstructs
...
@@ -114,7 +116,12 @@ session example:
...
@@ -114,7 +116,12 @@ session example:
ΔFtail support
ΔFtail support
--------------
--------------
XXX describe øf and `t... D...` commands.
In addition to pure-tree mode, the following topologies are treated specially
by `treegen trees`:
- "øf" requests deletion of ZBigFile, that is referencing the tree,
- "t<kv> D<data-kv>" changes both tree natively, and ZBlk data objects
referenced via root['treegen/values'].
--------
--------
...
@@ -195,7 +202,7 @@ class ZCtx(object):
...
@@ -195,7 +202,7 @@ class ZCtx(object):
zctx
.
valdict
=
valdict
zctx
.
valdict
=
valdict
commit
(
'treegen/values: init %r'
%
valv
,
skipIfEmpty
=
True
)
commit
(
'treegen/values: init %r'
%
valv
,
skipIfEmpty
=
True
)
# close release resources associated with zctx.
# close release
s
resources associated with zctx.
def
close
(
zctx
):
def
close
(
zctx
):
zctx
.
zconn
.
close
()
zctx
.
zconn
.
close
()
zctx
.
db
.
close
()
zctx
.
db
.
close
()
...
...
wcfs/internal/xbtree/xbtreetest/xbtreetest.go
View file @
86237665
...
@@ -18,7 +18,6 @@
...
@@ -18,7 +18,6 @@
// See https://www.nexedi.com/licensing for rationale and options.
// See https://www.nexedi.com/licensing for rationale and options.
// Package xbtreetest provides infrastructure for testing LOBTree with ZBlk values.
// Package xbtreetest provides infrastructure for testing LOBTree with ZBlk values.
// XXX -> treetest?
package
xbtreetest
package
xbtreetest
import
(
import
(
...
...
wcfs/internal/xzodb/xzodb.go
View file @
86237665
...
@@ -126,7 +126,7 @@ func IsErrNoData(err error) bool {
...
@@ -126,7 +126,7 @@ func IsErrNoData(err error) bool {
}
}
}
}
// XidOf return string representation of object xid.
// XidOf return
s
string representation of object xid.
func
XidOf
(
obj
zodb
.
IPersistent
)
string
{
func
XidOf
(
obj
zodb
.
IPersistent
)
string
{
if
obj
==
nil
||
reflect
.
ValueOf
(
obj
)
.
IsNil
()
{
if
obj
==
nil
||
reflect
.
ValueOf
(
obj
)
.
IsNil
()
{
return
"ø"
return
"ø"
...
...
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