[Checkins] SVN: z3c.offlinepack/tags/0.1.3/ Tag 0.1.3 release
Ross Patterson
me at rpatterson.net
Wed Sep 26 15:45:52 EDT 2007
Log message for revision 80133:
Tag 0.1.3 release
Changed:
A z3c.offlinepack/tags/0.1.3/
D z3c.offlinepack/tags/0.1.3/README.txt
A z3c.offlinepack/tags/0.1.3/README.txt
D z3c.offlinepack/tags/0.1.3/paster.cfg
A z3c.offlinepack/tags/0.1.3/paster.cfg
D z3c.offlinepack/tags/0.1.3/setup.cfg
D z3c.offlinepack/tags/0.1.3/setup.py
A z3c.offlinepack/tags/0.1.3/setup.py
D z3c.offlinepack/tags/0.1.3/z3c/offlinepack/README.txt
A z3c.offlinepack/tags/0.1.3/z3c/offlinepack/README.txt
D z3c.offlinepack/tags/0.1.3/z3c/offlinepack/__init__.py
A z3c.offlinepack/tags/0.1.3/z3c/offlinepack/__init__.py
-=-
Copied: z3c.offlinepack/tags/0.1.3 (from rev 80119, z3c.offlinepack/trunk)
Deleted: z3c.offlinepack/tags/0.1.3/README.txt
===================================================================
--- z3c.offlinepack/trunk/README.txt 2007-09-26 18:37:46 UTC (rev 80119)
+++ z3c.offlinepack/tags/0.1.3/README.txt 2007-09-26 19:45:52 UTC (rev 80133)
@@ -1,40 +0,0 @@
-;-*- rST -*-
-
-==================
-Pack ZODBs Offline
-==================
-
-Pack a ZODB storage without running any part of the Zope application
-server. Only an appropriate version of Zope for the ZODB storage is
-required. Use on a copy of a ZODB storage. Do not run on a ZODB
-storage currently in use.
-
-Install the distribution:
-
- $ python setup.py install
-
-Then use the offlinepack script to pack a copy of your ZODB:
-
- $ offlinepack /path/to/Data-copy.fs
-
-zc.buildout
------------
-
-A buildout.cfg is included that will install the offlinepack script
-to the buildout. The buildout makes it possible to quickly use the
-offlinepack script without modifying your python installation.
-
- $ python bootsrtap/bootsrtap.py -v
- $ bin/buildout -v
- $ bin/offlinepack /path/to/Data-copy.fs
-
-The buildout.cfg file can also be modified to use a specific version
-of ZODB3. This is uesful if you need to use offlinepack without
-migrating the ZODB to a newer version of ZODB3. Add the version
-specifier to the offlinepack section of buildout.cfg. For example, to
-use offlinepack with Zope 2.9, use the following offlinepack section.
-
- [offlinepack]
- recipe = zc.recipe.egg:scripts
- eggs = z3c.offlinepack
- ZODB3<3.7-dev
Copied: z3c.offlinepack/tags/0.1.3/README.txt (from rev 80132, z3c.offlinepack/trunk/README.txt)
===================================================================
--- z3c.offlinepack/tags/0.1.3/README.txt (rev 0)
+++ z3c.offlinepack/tags/0.1.3/README.txt 2007-09-26 19:45:52 UTC (rev 80133)
@@ -0,0 +1,54 @@
+==================
+Pack ZODBs Offline
+==================
+
+Pack a ZODB storage without running any part of the Zope application
+server. Only an appropriate version of ZODB3 for the ZODB storage is
+required. Apply only to copies of ZODB storages, not ZODB storages
+currently in use.
+
+Install the distribution::
+
+ $ python setup.py install
+
+Then use the offlinepack script to pack a copy of your ZODB::
+
+ $ offlinepack /path/to/Data-copy.fs
+
+Use the --help option for more details::
+
+ $ offlinepack --help
+ usage: offlinepack [options] PATH...
+
+ Pack ZODB storages without running Zope or ZEO
+
+ options:
+ -h, --help show this help message and exit
+ -d DAYS, --days=DAYS remove revisions more than DAYS old [default: 0]
+ -s DOTTED, --storage=DOTTED
+ use the storage constructor at DOTTED [default:
+ ZODB.FileStorage.FileStorage]
+
+zc.buildout
+-----------
+
+A buildout.cfg is included that will install the offlinepack script
+to the buildout. The buildout makes it possible to quickly use the
+offlinepack script without modifying the system python installation::
+
+ $ svn co svn://svn.zope.org/repos/main/z3c.offlinepack/trunk z3c.offlinepack
+ $ cd z3c.offlinepack
+ $ python bootsrtap/bootsrtap.py -v
+ $ bin/buildout -v
+ $ bin/offlinepack /path/to/Data-copy.fs
+
+The buildout.cfg file can also be modified to use a specific version
+of ZODB3. This is uesful if you need to use offlinepack without
+migrating the ZODB to a newer version of ZODB3. Add the version
+specifier to the offlinepack section of buildout.cfg. For example, to
+use offlinepack with Zope 2.9, use the following offlinepack section.
+
+ [offlinepack]
+ recipe = zc.recipe.egg:scripts
+ eggs = z3c.offlinepack
+ ZODB3<3.7-dev
Deleted: z3c.offlinepack/tags/0.1.3/paster.cfg
===================================================================
--- z3c.offlinepack/trunk/paster.cfg 2007-09-26 18:37:46 UTC (rev 80119)
+++ z3c.offlinepack/tags/0.1.3/paster.cfg 2007-09-26 19:45:52 UTC (rev 80133)
@@ -1,15 +0,0 @@
-[pastescript]
-namespace_package = z3c
-description = Pack ZODB databases without running Zope or ZEO
-author = Ross Patterson
-author_email = me at rpatterson.net
-license_name = GPL
-url = http://svn.zope.org/z3c.offlinepack
-version = 0.1
-plus = +
-zip_safe = True
-keywords =
-egg = z3c.offlinepack
-long_description =
-dot = .
-
Copied: z3c.offlinepack/tags/0.1.3/paster.cfg (from rev 80122, z3c.offlinepack/trunk/paster.cfg)
===================================================================
--- z3c.offlinepack/tags/0.1.3/paster.cfg (rev 0)
+++ z3c.offlinepack/tags/0.1.3/paster.cfg 2007-09-26 19:45:52 UTC (rev 80133)
@@ -0,0 +1,14 @@
+[pastescript]
+namespace_package = z3c
+description = Pack ZODB databases without running Zope or ZEO
+author = Ross Patterson
+author_email = me at rpatterson.net
+license_name = GPL
+url = http://svn.zope.org/z3c.offlinepack
+version = 0.1.2
+plus = +
+zip_safe = True
+keywords =
+egg = z3c.offlinepack
+dot = .
+
Deleted: z3c.offlinepack/tags/0.1.3/setup.cfg
===================================================================
--- z3c.offlinepack/trunk/setup.cfg 2007-09-26 18:37:46 UTC (rev 80119)
+++ z3c.offlinepack/tags/0.1.3/setup.cfg 2007-09-26 19:45:52 UTC (rev 80133)
@@ -1,3 +0,0 @@
-[egg_info]
-tag_build = dev
-tag_svn_revision = true
Deleted: z3c.offlinepack/tags/0.1.3/setup.py
===================================================================
--- z3c.offlinepack/trunk/setup.py 2007-09-26 18:37:46 UTC (rev 80119)
+++ z3c.offlinepack/tags/0.1.3/setup.py 2007-09-26 19:45:52 UTC (rev 80133)
@@ -1,42 +0,0 @@
-from setuptools import setup, find_packages
-import sys, os
-
-version = '0.1.1'
-
-setup(name='z3c.offlinepack',
- version=version,
- description="Pack ZODB databases without running Zope or ZEO",
- long_description="""\
-Pack a ZODB storage without running any part of the Zope application
-server. Only an appropriate version of Zope for the ZODB storage is
-required. Use on a copy of a ZODB storage. Do not run on a ZODB
-storage currently in use.""",
- # Get more strings from http://www.python.org/pypi?%3Aaction=list_classifiers
- classifiers=[
- "Framework :: Plone",
- "Framework :: Zope2",
- "Framework :: Zope3",
- "Programming Language :: Python",
- "Topic :: Software Development :: Libraries :: Python Modules",
- ],
- keywords='',
- author='Ross Patterson',
- author_email='me at rpatterson.net',
- url='http://svn.zope.org/z3c.offlinepack',
- license='GPL',
- packages=find_packages(exclude=['ez_setup']),
- namespace_packages=['z3c'],
- include_package_data=True,
- zip_safe=True,
- install_requires=[
- 'setuptools',
- # -*- Extra requirements: -*-
- 'ZODB3', 'zope.dottedname'
- ],
- extras_require=dict(test=['zc.buildout', 'zc.recipe.egg']),
- entry_points="""
- # -*- Entry points: -*-
- [console_scripts]
- offlinepack = z3c.offlinepack:main
- """,
- )
Copied: z3c.offlinepack/tags/0.1.3/setup.py (from rev 80130, z3c.offlinepack/trunk/setup.py)
===================================================================
--- z3c.offlinepack/tags/0.1.3/setup.py (rev 0)
+++ z3c.offlinepack/tags/0.1.3/setup.py 2007-09-26 19:45:52 UTC (rev 80133)
@@ -0,0 +1,39 @@
+from setuptools import setup, find_packages
+import sys, os
+
+version = '0.1.3'
+
+setup(name='z3c.offlinepack',
+ version=version,
+ description="Pack ZODB databases without running Zope or ZEO",
+ long_description=open(os.path.join(os.path.dirname(__file__),
+ 'README.txt')).read(),
+ # Get more strings from http://www.python.org/pypi?%3Aaction=list_classifiers
+ classifiers=[
+ "Framework :: Plone",
+ "Framework :: Zope2",
+ "Framework :: Zope3",
+ "Programming Language :: Python",
+ "Topic :: Software Development :: Libraries :: Python Modules",
+ ],
+ keywords='',
+ author='Ross Patterson',
+ author_email='me at rpatterson.net',
+ url='http://svn.zope.org/z3c.offlinepack',
+ license='GPL',
+ packages=find_packages(exclude=['ez_setup']),
+ namespace_packages=['z3c'],
+ include_package_data=True,
+ zip_safe=True,
+ install_requires=[
+ 'setuptools',
+ # -*- Extra requirements: -*-
+ 'ZODB3', 'zope.dottedname'
+ ],
+ extras_require=dict(test=['zc.buildout', 'zc.recipe.egg']),
+ entry_points="""
+ # -*- Entry points: -*-
+ [console_scripts]
+ offlinepack = z3c.offlinepack:main
+ """,
+ )
Deleted: z3c.offlinepack/tags/0.1.3/z3c/offlinepack/README.txt
===================================================================
--- z3c.offlinepack/trunk/z3c/offlinepack/README.txt 2007-09-26 18:37:46 UTC (rev 80119)
+++ z3c.offlinepack/tags/0.1.3/z3c/offlinepack/README.txt 2007-09-26 19:45:52 UTC (rev 80133)
@@ -1,33 +0,0 @@
-;-*- Doctest -*-
-==================
-Pack ZODBs Offline
-==================
-
-Pack a ZODB storage without running any part of the Zope application
-server. Only an appropriate version of Zope for the ZODB storage is
-required. Use on a copy of a ZODB storage. Do not run on a ZODB
-storage currently in use.
-
-Start with a FileStorage that has versions that would be removed on
-pack.
-
- >>> import ZODB, ZODB.FileStorage, transaction
- >>> db = ZODB.DB(ZODB.FileStorage.FileStorage(data_fs))
- >>> conn = db.open()
- >>> conn.root()['foo'] = 'foo'
- >>> transaction.commit()
- >>> conn.root()['foo'] = 'bar'
- >>> transaction.commit()
- >>> conn.close()
- >>> db.close()
-
-The size after packing will be smaller than the size after packing.
-
- >>> import os
- >>> initial_size = os.path.getsize(data_fs)
-
- >>> import z3c.offlinepack
- >>> z3c.offlinepack.pack_paths([data_fs])
-
- >>> os.path.getsize(data_fs) < initial_size
- True
Copied: z3c.offlinepack/tags/0.1.3/z3c/offlinepack/README.txt (from rev 80121, z3c.offlinepack/trunk/z3c/offlinepack/README.txt)
===================================================================
--- z3c.offlinepack/tags/0.1.3/z3c/offlinepack/README.txt (rev 0)
+++ z3c.offlinepack/tags/0.1.3/z3c/offlinepack/README.txt 2007-09-26 19:45:52 UTC (rev 80133)
@@ -0,0 +1,33 @@
+;-*- Doctest -*-
+==================
+Pack ZODBs Offline
+==================
+
+Pack a ZODB storage without running any part of the Zope application
+server. Only an appropriate version of ZODB3 for the ZODB storage is
+required. Apply only to copies of ZODB storages, not ZODB storages
+currently in use.
+
+Start with a FileStorage that has versions that would be removed on
+pack.
+
+ >>> import ZODB, ZODB.FileStorage, transaction
+ >>> db = ZODB.DB(ZODB.FileStorage.FileStorage(data_fs))
+ >>> conn = db.open()
+ >>> conn.root()['foo'] = 'foo'
+ >>> transaction.commit()
+ >>> conn.root()['foo'] = 'bar'
+ >>> transaction.commit()
+ >>> conn.close()
+ >>> db.close()
+
+The size after packing will be smaller than the size after packing.
+
+ >>> import os
+ >>> initial_size = os.path.getsize(data_fs)
+
+ >>> import z3c.offlinepack
+ >>> z3c.offlinepack.pack_paths([data_fs])
+
+ >>> os.path.getsize(data_fs) < initial_size
+ True
Deleted: z3c.offlinepack/tags/0.1.3/z3c/offlinepack/__init__.py
===================================================================
--- z3c.offlinepack/trunk/z3c/offlinepack/__init__.py 2007-09-26 18:37:46 UTC (rev 80119)
+++ z3c.offlinepack/tags/0.1.3/z3c/offlinepack/__init__.py 2007-09-26 19:45:52 UTC (rev 80133)
@@ -1,60 +0,0 @@
-#!/usr/bin/python
-"""Pack a ZODB storage without running any part of the Zope application
-server. Only an appropriate version of Zope for the ZODB storage is
-required. Use on a copy of a ZODB storage. Do not run on a ZODB
-storage currently in use."""
-
-usage="usage: %prog [options] PATH..."
-
-import sys, os, logging, time, optparse
-
-import zope.dottedname.resolve
-import ZODB.FileStorage, ZODB.serialize
-
-parser = optparse.OptionParser(usage=usage, description=__doc__,
- version='0.1')
-days = optparse.make_option(
- '-d', '--days', type="int", default=0,
- help=("remove revisions more than DAYS old "
- "[default: %default]"))
-parser.add_option(days)
-
-def storage_callback(option, opt_str, value, parser, *args, **kwargs):
- setattr(parser.values, option.dest,
- zope.dottedname.resolve.resolve(value))
-storage = optparse.make_option(
- '-s', '--storage', metavar='DOTTED', type="string",
- default=ZODB.FileStorage.FileStorage,
- action='callback', callback=storage_callback,
- help=("use the storage constructor at DOTTED "
- "[default: ZODB.FileStorage.FileStorage]"))
-parser.add_option(storage)
-
-logger = logging.getLogger('fspack')
-
-def pack_paths(paths, days=days.default, storage=storage.default):
- delta = days*86400
- for path in paths:
- pack(path, delta, constructor=storage)
-
-def pack(path, delta=days.default*86400, constructor=storage.default):
- storage = constructor(path)
- start = time.time()
- storage.pack(start-delta, ZODB.serialize.referencesf)
- storage.close()
- logger.info('%s has been packed in %.3f seconds'
- % (path, time.time()-start))
-
-def main(parser=parser):
- logging.basicConfig(level=logging.INFO)
-
- options, args = parser.parse_args()
- if not args:
- parser.error("at least one PATH is required")
-
- pack_paths(paths=args, **options.__dict__)
-
- logging.shutdown()
-
-if __name__ == '__main__':
- main()
Copied: z3c.offlinepack/tags/0.1.3/z3c/offlinepack/__init__.py (from rev 80131, z3c.offlinepack/trunk/z3c/offlinepack/__init__.py)
===================================================================
--- z3c.offlinepack/tags/0.1.3/z3c/offlinepack/__init__.py (rev 0)
+++ z3c.offlinepack/tags/0.1.3/z3c/offlinepack/__init__.py 2007-09-26 19:45:52 UTC (rev 80133)
@@ -0,0 +1,56 @@
+#!/usr/bin/python
+"""Pack ZODB storages without running Zope or ZEO"""
+
+usage="usage: %prog [options] PATH..."
+
+import sys, os, logging, time, optparse
+
+import zope.dottedname.resolve
+import ZODB.FileStorage, ZODB.serialize
+
+parser = optparse.OptionParser(usage=usage, description=__doc__)
+days = optparse.make_option(
+ '-d', '--days', type="int", default=0,
+ help=("remove revisions more than DAYS old "
+ "[default: %default]"))
+parser.add_option(days)
+
+def storage_callback(option, opt_str, value, parser, *args, **kwargs):
+ setattr(parser.values, option.dest,
+ zope.dottedname.resolve.resolve(value))
+storage = optparse.make_option(
+ '-s', '--storage', metavar='DOTTED', type="string",
+ default=ZODB.FileStorage.FileStorage,
+ action='callback', callback=storage_callback,
+ help=("use the storage constructor at DOTTED "
+ "[default: ZODB.FileStorage.FileStorage]"))
+parser.add_option(storage)
+
+logger = logging.getLogger('fspack')
+
+def pack_paths(paths, days=days.default, storage=storage.default):
+ delta = days*86400
+ for path in paths:
+ pack(path, delta, constructor=storage)
+
+def pack(path, delta=days.default*86400, constructor=storage.default):
+ storage = constructor(path)
+ start = time.time()
+ storage.pack(start-delta, ZODB.serialize.referencesf)
+ storage.close()
+ logger.info('%s has been packed in %.3f seconds'
+ % (path, time.time()-start))
+
+def main(parser=parser):
+ logging.basicConfig(level=logging.INFO)
+
+ options, args = parser.parse_args()
+ if not args:
+ parser.error("at least one PATH is required")
+
+ pack_paths(paths=args, **options.__dict__)
+
+ logging.shutdown()
+
+if __name__ == '__main__':
+ main()
More information about the Checkins
mailing list