[Zope-Checkins] CVS: Zope/utilities/ZODBTools - checkbtrees.py:1.2 fstest.py:1.5 netspace.py:1.2 parsezeolog.py:1.2 zeopack.py:1.6 zeoreplay.py:1.3 zeoup.py:1.6
Martijn Pieters
mj@zope.com
Wed, 14 Aug 2002 17:22:58 -0400
Update of /cvs-repository/Zope/utilities/ZODBTools
In directory cvs.zope.org:/tmp/cvs-serv10249/ZODBTools
Modified Files:
checkbtrees.py fstest.py netspace.py parsezeolog.py zeopack.py
zeoreplay.py zeoup.py
Log Message:
Clean up indentation and trailing whitespace.
=== Zope/utilities/ZODBTools/checkbtrees.py 1.1 => 1.2 ===
--- Zope/utilities/ZODBTools/checkbtrees.py:1.1 Thu Jun 20 18:49:50 2002
+++ Zope/utilities/ZODBTools/checkbtrees.py Wed Aug 14 17:22:57 2002
@@ -25,7 +25,7 @@
attrs = ()
for pair in attrs:
sub.append(pair)
-
+
# what if it is a mapping?
try:
items = obj.items()
=== Zope/utilities/ZODBTools/fstest.py 1.4 => 1.5 ===
--- Zope/utilities/ZODBTools/fstest.py:1.4 Mon Feb 11 18:40:41 2002
+++ Zope/utilities/ZODBTools/fstest.py Wed Aug 14 17:22:57 2002
@@ -4,14 +4,14 @@
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
-#
+#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
-#
+#
##############################################################################
"""Simple consistency checker for FileStorage.
@@ -109,7 +109,7 @@
It also leaves the file pointer set to pos. The path argument is
used for generating error messages.
"""
-
+
h = file.read(TREC_HDR_LEN)
if not h:
return None, None
@@ -131,7 +131,7 @@
raise FormatError("%s truncated possibly because of"
" damaged records at %s" % (path, pos))
if status == Status.checkpoint:
- raise FormatError("%s checkpoint flag was not cleared at %s"
+ raise FormatError("%s checkpoint flag was not cleared at %s"
% (path, pos))
if status not in ' up':
raise FormatError("%s has invalid status '%s' at %s" %
=== Zope/utilities/ZODBTools/netspace.py 1.1 => 1.2 ===
--- Zope/utilities/ZODBTools/netspace.py:1.1 Fri May 3 16:33:22 2002
+++ Zope/utilities/ZODBTools/netspace.py Wed Aug 14 17:22:57 2002
@@ -89,7 +89,7 @@
keys = filter(paths.has_key, keys)
fmt = "%8s %5d %8d %s %s.%s"
-
+
for oid in keys:
data, serialno = fs.load(oid, '')
mod, klass = get_pickle_metadata(data)
=== Zope/utilities/ZODBTools/parsezeolog.py 1.1 => 1.2 ===
--- Zope/utilities/ZODBTools/parsezeolog.py:1.1 Mon Apr 29 11:12:48 2002
+++ Zope/utilities/ZODBTools/parsezeolog.py Wed Aug 14 17:22:57 2002
@@ -65,7 +65,7 @@
t.url = args[2]
t.objects = []
self.cur_t[client] = t
-
+
def tpc_finish(self, time, args, client):
t = self.cur_t.get(client, None)
if t is None:
@@ -93,7 +93,7 @@
else:
bytes = 0
print "%s %2d %4d %10d %s" % (t.begin, t.finish - t.begin,
- len(t.objects), bytes,
+ len(t.objects), bytes,
time.ctime(t.begin)), t.url
if __name__ == "__main__":
=== Zope/utilities/ZODBTools/zeopack.py 1.5 => 1.6 ===
--- Zope/utilities/ZODBTools/zeopack.py:1.5 Wed Jan 30 17:10:08 2002
+++ Zope/utilities/ZODBTools/zeopack.py Wed Aug 14 17:22:57 2002
@@ -6,11 +6,11 @@
Options:
-p port -- port to connect to
-
+
-h host -- host to connect to (default is current host)
-
+
-U path -- Unix-domain socket to connect to
-
+
-S name -- storage name (default is '1')
-d days -- pack objects more than days old
@@ -96,7 +96,7 @@
if port is None:
usage()
addr = host, port
-
+
pack(addr, storage, days, wait)
if __name__ == "__main__":
=== Zope/utilities/ZODBTools/zeoreplay.py 1.2 => 1.3 ===
--- Zope/utilities/ZODBTools/zeoreplay.py:1.2 Thu May 9 11:35:56 2002
+++ Zope/utilities/ZODBTools/zeoreplay.py Wed Aug 14 17:22:57 2002
@@ -46,7 +46,7 @@
pass
-
+
def usage(code, msg=''):
print __doc__
if msg:
@@ -54,7 +54,7 @@
sys.exit(code)
-
+
def parse_time(line):
"""Return the time portion of a zLOG line in seconds or None."""
mo = datecre.match(line)
@@ -82,7 +82,7 @@
return t, m, c
-
+
class StoreStat:
def __init__(self, when, oid, size):
self.when = when
@@ -123,7 +123,7 @@
self._finishtime = when
-
+
# Mapping oid -> revid
_revids = {}
@@ -159,7 +159,7 @@
self._replaydelta = t1 - t0 - origdelta
-
+
class ZEOParser:
def __init__(self, maxtxns=-1, report=1, storage=None):
self.__txns = []
@@ -186,7 +186,7 @@
meth = getattr(txn, 'tpc_begin', None)
if meth is not None:
meth(when, args, client)
-
+
def storea(self, when, args, client):
txn = self.__curtxn.get(client)
if txn is None:
@@ -221,7 +221,7 @@
print '%s %s %4d %10d %s %s' % (
txn._begintime, txn._finishtime - txn._begintime,
len(txn._objects),
- bytes,
+ bytes,
time.ctime(txn._begintime),
txn._url)
@@ -248,7 +248,7 @@
print 'average faster txn was:', float(sum) / len(faster)
-
+
def main():
try:
opts, args = getopt.getopt(
@@ -281,7 +281,7 @@
if replay:
storage = FileStorage(storagefile)
- #storage = Full(storagefile)
+ #storage = Full(storagefile)
#storage = PrimaryStorage('yyz', storage, RS_PORT)
t0 = now()
p = ZEOParser(maxtxns, report, storage)
@@ -308,6 +308,6 @@
print 'total time:', t3-t0
-
+
if __name__ == '__main__':
main()
=== Zope/utilities/ZODBTools/zeoup.py 1.5 => 1.6 ===
--- Zope/utilities/ZODBTools/zeoup.py:1.5 Thu Mar 28 15:05:23 2002
+++ Zope/utilities/ZODBTools/zeoup.py Wed Aug 14 17:22:57 2002
@@ -7,14 +7,14 @@
attempt to update the zeoup counter in the root. It will report
success if it updates to counter or if it gets a ConflictError. A
ConflictError is considered a success, because the client was able to
-start a transaction.
+start a transaction.
Options:
-p port -- port to connect to
-
+
-h host -- host to connect to (default is current host)
-
+
-U path -- Unix-domain socket to connect to
--nowrite -- Do not update the zeoup counter.