Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Levin Zimmermann
neoppod
Commits
7d9d2f5c
Commit
7d9d2f5c
authored
Mar 06, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
15570825
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
24 deletions
+2
-24
go/neo/t/tzodb.py
go/neo/t/tzodb.py
+2
-24
No files found.
go/neo/t/tzodb.py
View file @
7d9d2f5c
...
...
@@ -22,37 +22,15 @@
from
__future__
import
print_function
import
zodbtools.util
from
zodbtools.util
import
storageFromURL
,
hashRegistry
from
ZODB.POSException
import
POSKeyError
from
ZODB.utils
import
p64
,
u64
import
hashlib
from
tcpu
import
Adler32Hasher
,
CRC32Hasher
import
sys
import
logging
from
time
import
time
from
getopt
import
getopt
,
GetoptError
# hasher that discards data
class
NullHasher
:
name
=
"null"
def
update
(
self
,
data
):
pass
def
hexdigest
(
self
):
return
"00"
# {} name -> hasher
hashRegistry
=
{
"null"
:
NullHasher
,
"adler32"
:
Adler32Hasher
,
"crc32"
:
CRC32Hasher
,
"sha1"
:
hashlib
.
sha1
,
"sha256"
:
hashlib
.
sha256
,
"sha512"
:
hashlib
.
sha512
,
}
def
usage
(
w
):
print
(
\
"""Usage: tzodb zhash [options] url
...
...
@@ -115,7 +93,7 @@ def zhash():
l
=
logging
.
getLogger
()
l
.
addHandler
(
logging
.
StreamHandler
())
stor
=
zodbtools
.
util
.
storageFromURL
(
url
,
read_only
=
True
)
stor
=
storageFromURL
(
url
,
read_only
=
True
)
last_tid
=
stor
.
lastTransaction
()
before
=
p64
(
u64
(
last_tid
)
+
1
)
...
...
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