Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
Commits
cdd7234b
Commit
cdd7234b
authored
Jul 04, 2018
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
go/zodb/*.py: qq moved from zodbtools -> pygolang
See
nexedi/zodbtools@b1163449
for details.
parent
4a2407dc
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
13 deletions
+13
-13
go/zodb/py/pydata-gen-testdata
go/zodb/py/pydata-gen-testdata
+5
-5
go/zodb/storage/fs1/py/gen-testdata
go/zodb/storage/fs1/py/gen-testdata
+8
-8
No files found.
go/zodb/py/pydata-gen-testdata
View file @
cdd7234b
#!/usr/bin/env python2
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
# Copyright (C) 2017 Nexedi SA and Contributors.
# Copyright (C) 2017
-2018
Nexedi SA and Contributors.
# Kirill Smelkov <kirr@nexedi.com>
# Kirill Smelkov <kirr@nexedi.com>
#
#
# This program is free software: you can Use, Study, Modify and Redistribute
# This program is free software: you can Use, Study, Modify and Redistribute
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
from
ZODB.tests
import
testSerialize
from
ZODB.tests
import
testSerialize
from
ZODB
import
serialize
from
ZODB
import
serialize
from
zodbtools.util
import
escape
qq
from
golang.gcompat
import
qq
def
main
():
def
main
():
# dump to go what to expect
# dump to go what to expect
...
@@ -46,8 +46,8 @@ def main():
...
@@ -46,8 +46,8 @@ def main():
emit
(
"
\
n
var _PyData_ClassName_Testv = [...]_PyDataClassName_TestEntry{"
)
emit
(
"
\
n
var _PyData_ClassName_Testv = [...]_PyDataClassName_TestEntry{"
)
for
test
in
testv
:
for
test
in
testv
:
emit
(
"
\
t
{"
)
emit
(
"
\
t
{"
)
emit
(
"
\
t
\
t
%s,"
%
escape
qq
(
test
))
emit
(
"
\
t
\
t
%s,"
%
qq
(
test
))
emit
(
"
\
t
\
t
%s,"
%
escape
qq
(
r
.
getClassName
(
test
)))
emit
(
"
\
t
\
t
%s,"
%
qq
(
r
.
getClassName
(
test
)))
emit
(
"
\
t
},"
)
emit
(
"
\
t
},"
)
emit
(
'
\
t
{"aaa", "?.?"},'
)
# invalid
emit
(
'
\
t
{"aaa", "?.?"},'
)
# invalid
emit
(
"}"
)
emit
(
"}"
)
...
...
go/zodb/storage/fs1/py/gen-testdata
View file @
cdd7234b
#!/usr/bin/env python2
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
# Copyright (C) 2017 Nexedi SA and Contributors.
# Copyright (C) 2017
-2018
Nexedi SA and Contributors.
# Kirill Smelkov <kirr@nexedi.com>
# Kirill Smelkov <kirr@nexedi.com>
#
#
# This program is free software: you can Use, Study, Modify and Redistribute
# This program is free software: you can Use, Study, Modify and Redistribute
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
from
ZODB.FileStorage
import
FileStorage
from
ZODB.FileStorage
import
FileStorage
from
zodbtools.test.gen_testdata
import
gen_testdb
from
zodbtools.test.gen_testdata
import
gen_testdb
from
zodbtools.util
import
escape
qq
from
golang.gcompat
import
qq
import
struct
import
struct
...
@@ -81,9 +81,9 @@ def main():
...
@@ -81,9 +81,9 @@ def main():
emit
(
"
\
t
\
t
\
t
TxnInfo:
\
t
zodb.TxnInfo{"
)
emit
(
"
\
t
\
t
\
t
TxnInfo:
\
t
zodb.TxnInfo{"
)
emit
(
"
\
t
\
t
\
t
\
t
Tid:
\
t
%s,"
%
hex64
(
txn
.
tid
))
emit
(
"
\
t
\
t
\
t
\
t
Tid:
\
t
%s,"
%
hex64
(
txn
.
tid
))
emit
(
"
\
t
\
t
\
t
\
t
Status:
\
t
'%s',"
%
txn
.
status
)
emit
(
"
\
t
\
t
\
t
\
t
Status:
\
t
'%s',"
%
txn
.
status
)
emit
(
"
\
t
\
t
\
t
\
t
User:
\
t
\
t
[]byte(%s),"
%
escape
qq
(
txn
.
user
))
emit
(
"
\
t
\
t
\
t
\
t
User:
\
t
\
t
[]byte(%s),"
%
qq
(
txn
.
user
))
emit
(
"
\
t
\
t
\
t
\
t
Description:
\
t
[]byte(%s),"
%
escape
qq
(
txn
.
description
))
emit
(
"
\
t
\
t
\
t
\
t
Description:
\
t
[]byte(%s),"
%
qq
(
txn
.
description
))
emit
(
"
\
t
\
t
\
t
\
t
Extension:
\
t
[]byte(%s),"
%
escape
qq
(
th
.
ext
))
emit
(
"
\
t
\
t
\
t
\
t
Extension:
\
t
[]byte(%s),"
%
qq
(
th
.
ext
))
emit
(
"
\
t
\
t
\
t
},"
)
emit
(
"
\
t
\
t
\
t
},"
)
emit
(
"
\
t
\
t
},"
)
emit
(
"
\
t
\
t
},"
)
...
@@ -118,14 +118,14 @@ def main():
...
@@ -118,14 +118,14 @@ def main():
data
=
"/* deleted */ nil"
data
=
"/* deleted */ nil"
datatid
=
"/* deleted */ 0"
datatid
=
"/* deleted */ 0"
else
:
else
:
data
=
"[]byte(%s)"
%
escape
qq
(
drec
.
data
)
data
=
"[]byte(%s)"
%
qq
(
drec
.
data
)
datatid
=
"/* copy from */ "
+
hex64
(
drec
.
data_txn
)
datatid
=
"/* copy from */ "
+
hex64
(
drec
.
data_txn
)
else
:
else
:
rawdata
=
drec
.
data
rawdata
=
drec
.
data
data
=
"/* same as ^^^ */ sameAsRaw"
data
=
"/* same as ^^^ */ sameAsRaw"
datatid
=
"/* no copy */ 0"
datatid
=
"/* no copy */ 0"
emit
(
"
\
t
\
t
\
t
\
t
[]byte(%s),"
%
escape
qq
(
rawdata
))
emit
(
"
\
t
\
t
\
t
\
t
[]byte(%s),"
%
qq
(
rawdata
))
emit
(
"
\
t
\
t
\
t
\
t
%s,"
%
data
)
emit
(
"
\
t
\
t
\
t
\
t
%s,"
%
data
)
emit
(
"
\
t
\
t
\
t
\
t
%s,"
%
datatid
)
emit
(
"
\
t
\
t
\
t
\
t
%s,"
%
datatid
)
emit
(
"
\
t
\
t
\
t
},"
)
emit
(
"
\
t
\
t
\
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