|
/
Zope
/
gocept svn checkins
/
Archive
/
2007
/
2007-02
/
SVN: r4399 - in gocept.download/trunk: . src src/gocept src/gocept/download
[
SVN: r4398 - gocept.download / Christian Theune ... ]
[
SVN: r4419 - gocept.seleniumtestrunner / ... ]
SVN: r4399 - in gocept.download/trunk: . src src/gocept src/gocept/download
Christian Theune <ct(at)gocept.com> |
2007-02-01 11:45:33 |
[ FULL ]
|
Author: ctheune
Date: Thu Feb 1 11:45:30 2007
New Revision: 4399
Added:
gocept.download/trunk/
gocept.download/trunk/README.txt (contents, props changed)
gocept.download/trunk/setup.py (contents, props changed)
gocept.download/trunk/src/
gocept.download/trunk/src/gocept/
gocept.download/trunk/src/gocept/__init__.py (contents, props changed)
gocept.download/trunk/src/gocept/download/
gocept.download/trunk/src/gocept/download/__init__.py (contents, props
changed)
Log:
importing gocept.download code
Added: gocept.download/trunk/README.txt
==============================================================================
--- (empty file)
+++ gocept.download/trunk/README.txt Thu Feb 1 11:45:30 2007
(at)(at) -0,0 +1,6 (at)(at)
+===============
+gocept.download
+===============
+
+
+zc.buildout recipe to download and extract an archive.
Added: gocept.download/trunk/setup.py
==============================================================================
--- (empty file)
+++ gocept.download/trunk/setup.py Thu Feb 1 11:45:30 2007
(at)(at) -0,0 +1,25 (at)(at)
+from setuptools import setup, find_packages
+
+name = "gocept.download"
+setup(
+ name = name,
+ version = "0.9",
+ author = "Christian Theune",
+ author_email = "ct(at)gocept.com",
+ description = "zc.buildout recipe for downloading and extracting an
archive.",
+ long_description = open('README.txt').read(),
+ license = "ZPL 2.1",
+ keywords = "zope3 buildout",
+ url='http://svn.gocept.com/repos/gocept/'+name,
+ zip_safe=False,
+ packages = find_packages('src'),
+ include_package_data = True,
+ package_dir = {'':'src'},
+ namespace_packages = ['gocept'],
+ install_requires = ['zc.buildout', 'setuptools'],
+ entry_points = {
+ 'zc.buildout': [
+ 'default = %s:Recipe' % name,
+ ]
+ },
+ )
Added: gocept.download/trunk/src/gocept/__init__.py
==============================================================================
--- (empty file)
+++ gocept.download/trunk/src/gocept/__init__.py Thu Feb 1 11:45:30 2007
(at)(at) -0,0 +1,6 (at)(at)
+# namespace package boilerplate
+try:
+ __import__('pkg_resources').declare_namespace(__name__)
+except ImportError, e:
+ from pkgutil import extend_path
+ __path__ = extend_path(__path__, __name__)
Added: gocept.download/trunk/src/gocept/download/__init__.py
==============================================================================
--- (empty file)
+++ gocept.download/trunk/src/gocept/download/__init__.py Thu Feb 1 11:45:30
2007
(at)(at) -0,0 +1,119 (at)(at)
+##############################################################################
+#
+# Copyright (c) 2007 gocept gmbh & co. kg and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (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.
+#
+##############################################################################
+
+import os
+import urlparse
+import urllib
+import md5
+import tempfile
+import subprocess
+import shutil
+
+
+class Recipe:
+ """Recipe that downloads a package from the net and unpacks it.
+
+ Configuration options:
+
+ url
+ strip-top-level-dir
+ md5sum
+
+ """
+
+ def __init__(self, buildout, name, options):
+ self.options = options
+ self.buildout = buildout
+ self.name = name
+
+ buildout['buildout'].setdefault(
+ 'download-directory',
+ os.path.join(buildout['buildout']['directory'], 'downloads'))
+
+ options['location'] = os.path.join(
+ buildout['buildout']['parts-directory'],
+ self.name,
+ )
+
+ options['bin-directory'] = buildout['buildout']['bin-directory']
+ options.setdefault('strip-top-level-dir', 'true')
+
+ self.filename = urlparse.urlparse(options['url'])[2].split('/')[-1]
+
+ def update(self):
+ pass
+
+ def install(self):
+ download_dir = self.buildout['buildout']['download-directory']
+ if not os.path.isdir(download_dir):
+ os.mkdir(download_dir)
+
+ if not os.path.isdir(self.options['location']):
+ os.mkdir(self.options['location'])
+
+ # Step 1: Download the package (if not downloaded already)
+ download_filename = os.path.join(download_dir, self.filename)
+ if not os.path.exists(download_filename):
+ # XXX undefined behavior when file already exists
+ # XXX watch out for offline flag
+ urllib.urlretrieve(self.options['url'], download_filename)
+
+ # Check MD5 sum
+ if compute_md5sum(download_filename) != self.options['md5sum']:
+ raise ValueError("Invalid MD5 sum for downloaded file %r" %
+ self.options['url'])
+
+ # Step 2: Extract the package
+ extract_dir = tempfile.mkdtemp()
+ is_ext = download_filename.endswith
+ if is_ext('.tar.gz') or is_ext('.tgz'):
+ call = ['tar', 'xzf', download_filename, '-C', extract_dir]
+ elif is_ext('.tar.bz2') or is_ext('.tbz2'):
+ call = ['tar', 'xzf', download_filename, '-C', extract_dir]
+ elif is_ext('.zip'):
+ call = ['unzip', download_filename, '-d', extract_dir]
+ else:
+ raise ValueError("Unsupported file type: %r" % download_filename)
+
+ retcode = subprocess.call(call)
+ if retcode != 0:
+ raise Exception("Extraction of file %r failed (tempdir: %r)" %
+ (download_filename, extract_dir))
+
+ # Step 3: Move the desired element into the place of the part
+ top_level_contents = os.listdir(extract_dir)
+ if self.options['strip-top-level-dir'] == 'true':
+ if len(top_level_contents) != 1:
+ raise ValueError("Can't strip top level directory because "
+ "there is more than one element in the "
+ "archive.")
+ base = os.path.join(extract_dir, top_level_contents[0])
+ else:
+ base = extract_dir
+
+ for filename in os.listdir(base):
+ shutil.move(os.path.join(base, filename),
os.path.join(self.options['location'], filename))
+
+ shutil.rmtree(extract_dir)
+ return [self.options['location']]
+
+
+def compute_md5sum(filename):
+ hash = md5.new('')
+ f = file(filename)
+ chunk = f.read(2**16)
+ while chunk:
+ hash.update(chunk)
+ chunk = f.read(2**16)
+ return hash.hexdigest()
|
SVN: r4401 - in gocept.ooodocma/trunk: . src src/gocept src/gocept/ooodocma
Christian Theune <ct(at)gocept.com> |
2007-02-05 21:20:01 |
[ FULL ]
|
Author: ctheune
Date: Mon Feb 5 21:19:58 2007
New Revision: 4401
Added:
gocept.ooodocma/trunk/
gocept.ooodocma/trunk/README.txt (contents, props changed)
gocept.ooodocma/trunk/TODO.txt (contents, props changed)
gocept.ooodocma/trunk/setup.py (contents, props changed)
gocept.ooodocma/trunk/src/
gocept.ooodocma/trunk/src/gocept/
gocept.ooodocma/trunk/src/gocept/__init__.py (contents, props changed)
gocept.ooodocma/trunk/src/gocept/ooodocma/
gocept.ooodocma/trunk/src/gocept/ooodocma/__init__.py (contents, props
changed)
Log:
- importing code
Added: gocept.ooodocma/trunk/README.txt
==============================================================================
--- (empty file)
+++ gocept.ooodocma/trunk/README.txt Mon Feb 5 21:19:58 2007
(at)(at) -0,0 +1,6 (at)(at)
+===============
+gocept.download
+===============
+
+
+zc.buildout recipe to download and extract an archive.
Added: gocept.ooodocma/trunk/TODO.txt
==============================================================================
--- (empty file)
+++ gocept.ooodocma/trunk/TODO.txt Mon Feb 5 21:19:58 2007
(at)(at) -0,0 +1,5 (at)(at)
+ - variables for buildout: storage_directory
+ smtp_server
+ sender_address
+
+ - release ooodocma, release gocept.ctl
Added: gocept.ooodocma/trunk/setup.py
==============================================================================
--- (empty file)
+++ gocept.ooodocma/trunk/setup.py Mon Feb 5 21:19:58 2007
(at)(at) -0,0 +1,26 (at)(at)
+from setuptools import setup, find_packages
+
+name = "gocept.ooodocma"
+setup(
+ name = name,
+ version = "0.9",
+ author = "Christian Theune",
+ author_email = "ct(at)gocept.com",
+ description = "zc.buildout recipe for installing an
OpenOffice.org/DocmaServer package",
+ long_description = open('README.txt').read(),
+ license = "ZPL 2.1",
+ keywords = "zope3 buildout",
+ classifiers = ["Framework :: Buildout"],
+ url='ftp://ftp.gocept.com/OOoDocmaServer/',
+ zip_safe=False,
+ packages = find_packages('src'),
+ include_package_data = True,
+ package_dir = {'':'src'},
+ namespace_packages = ['gocept'],
+ install_requires = ['zc.buildout', 'setuptools', 'gocept.download',
'zc.recipe.egg', 'zdaemon'],
+ entry_points = {
+ 'zc.buildout': [
+ 'default = %s:Recipe' % name,
+ ]
+ },
+ )
Added: gocept.ooodocma/trunk/src/gocept/__init__.py
==============================================================================
--- (empty file)
+++ gocept.ooodocma/trunk/src/gocept/__init__.py Mon Feb 5 21:19:58 2007
(at)(at) -0,0 +1,6 (at)(at)
+# namespace package boilerplate
+try:
+ __import__('pkg_resources').declare_namespace(__name__)
+except ImportError, e:
+ from pkgutil import extend_path
+ __path__ = extend_path(__path__, __name__)
Added: gocept.ooodocma/trunk/src/gocept/ooodocma/__init__.py
==============================================================================
--- (empty file)
+++ gocept.ooodocma/trunk/src/gocept/ooodocma/__init__.py Mon Feb 5 21:19:58
2007
(at)(at) -0,0 +1,89 (at)(at)
+##############################################################################
+#
+# Copyright (c) 2006-2007 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (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.
+#
+##############################################################################
+
+import os.path
+
+import zc.recipe.egg
+
+import gocept.download
+
+
+class Recipe:
+ """Downloads and configures a docmaserver/openoffice frankenstein
+
+ Parameters:
+
+ ip - ip for the docmaserver to listen on
+ port - port for the docmaserver to listen on
+ password - password for the docmaserver
+
+ url - url to the docmaserver frankenstein package
+ md5sum - md5sum for verification
+ """
+
+ def __init__(self, buildout, name, options):
+ self.options = options
+ self.buildout = buildout
+ self.name = name
+ self.package_download = gocept.download.Recipe(buildout, name,
options)
+
+ options['scripts'] = ''
+ options['eggs'] = ''
+ options.pop('entry-points', None)
+ self.egg = zc.recipe.egg.Egg(buildout, name, options)
+
+ def install(self):
+ paths = self.package_download.install()
+
+ for config_file in [('docmaserver', 'docma_config.cfg'),
+ ('docmaserver', 'zdaemon.conf'),
+ ('oood', 'oood-config.xml'),
+ ('oood', 'zdaemon.conf')]:
+ self._update_config_file(os.path.join(*config_file))
+
+ # start scripts
+ requirements, ws = self.egg.working_set(('zdaemon',))
+ oood_script_name = self.name+'-oood'
+ zc.buildout.easy_install.scripts(
+ [(oood_script_name, 'zdaemon.zdctl', 'main')],
+ ws, self.options['executable'], self.options['bin-directory'],
+ arguments = ('\n ["-C", %r]'
+ '\n + sys.argv[1:]'
+ % os.path.join(self.options['location'], 'oood',
'zdaemon.conf')
+ )
+ )
+ docma_script_name = self.name+'-docma'
+ zc.buildout.easy_install.scripts(
+ [(docma_script_name, 'zdaemon.zdctl', 'main')],
+ ws, self.options['executable'], self.options['bin-directory'],
+ arguments = ('\n ["-C", %r]'
+ '\n + sys.argv[1:]'
+ % os.path.join(self.options['location'],
'docmaserver', 'zdaemon.conf')
+ )
+ )
+
+ paths.append(os.path.join(self.options['bin-directory'],
oood_script_name))
+ paths.append(os.path.join(self.options['bin-directory'],
docma_script_name))
+ return paths
+
+ def update(self):
+ pass
+
+ def _update_config_file(self, filename):
+ filename = os.path.join(self.options['location'], filename)
+ data = open(filename+'.in').read()
+ data = data % self.options
+ new = open(filename, 'w')
+ new.write(data)
+ new.close()
|
SVN: r4402 - in gocept.download/trunk: . src/gocept/download
Christian Theune <ct(at)gocept.com> |
2007-02-07 06:31:40 |
[ FULL ]
|
Author: ctheune
Date: Wed Feb 7 06:31:38 2007
New Revision: 4402
Added:
gocept.download/trunk/CHANGES.txt (contents, props changed)
Modified:
gocept.download/trunk/ (props changed)
gocept.download/trunk/setup.py
gocept.download/trunk/src/gocept/download/__init__.py
Log:
- added ignores
- bumping version to 0.9.1
- failing if parts directory exists already
Added: gocept.download/trunk/CHANGES.txt
==============================================================================
--- (empty file)
+++ gocept.download/trunk/CHANGES.txt Wed Feb 7 06:31:38 2007
(at)(at) -0,0 +1,4 (at)(at)
+0.9.1
+=====
+
+ - Fail if part directory exists already.
Modified: gocept.download/trunk/setup.py
==============================================================================
--- gocept.download/trunk/setup.py (original)
+++ gocept.download/trunk/setup.py Wed Feb 7 06:31:38 2007
(at)(at) -3,13 +3,14 (at)(at)
name = "gocept.download"
setup(
name = name,
- version = "0.9",
+ version = "0.9.1",
author = "Christian Theune",
author_email = "ct(at)gocept.com",
description = "zc.buildout recipe for downloading and extracting an
archive.",
long_description = open('README.txt').read(),
license = "ZPL 2.1",
keywords = "zope3 buildout",
+ classifiers = ["Framework :: Buildout"],
url='http://svn.gocept.com/repos/gocept/'+name,
zip_safe=False,
packages = find_packages('src'),
Modified: gocept.download/trunk/src/gocept/download/__init__.py
==============================================================================
--- gocept.download/trunk/src/gocept/download/__init__.py (original)
+++ gocept.download/trunk/src/gocept/download/__init__.py Wed Feb 7 06:31:38
2007
(at)(at) -59,8 +59,9 (at)(at)
if not os.path.isdir(download_dir):
os.mkdir(download_dir)
- if not os.path.isdir(self.options['location']):
- os.mkdir(self.options['location'])
+ # We fail if the location already exists, typically this means it
+ # is a broken installation.
+ os.mkdir(self.options['location'])
# Step 1: Download the package (if not downloaded already)
download_filename = os.path.join(download_dir, self.filename)
|
SVN: r4404 - in gocept.ctl/trunk: . src src/gocept src/gocept/ctl
Christian Theune <ct(at)gocept.com> |
2007-02-07 06:34:38 |
[ FULL ]
|
Author: ctheune
Date: Wed Feb 7 06:34:37 2007
New Revision: 4404
Added:
gocept.ctl/trunk/
gocept.ctl/trunk/CHANGES.txt (contents, props changed)
gocept.ctl/trunk/README.txt (contents, props changed)
gocept.ctl/trunk/setup.py (contents, props changed)
gocept.ctl/trunk/src/
gocept.ctl/trunk/src/gocept/
gocept.ctl/trunk/src/gocept/__init__.py (contents, props changed)
gocept.ctl/trunk/src/gocept/ctl/
gocept.ctl/trunk/src/gocept/ctl/__init__.py (contents, props changed)
Log:
- importing code
Added: gocept.ctl/trunk/CHANGES.txt
==============================================================================
--- (empty file)
+++ gocept.ctl/trunk/CHANGES.txt Wed Feb 7 06:34:37 2007
(at)(at) -0,0 +1,4 (at)(at)
+0.9
+===
+
+ Initial release
Added: gocept.ctl/trunk/README.txt
==============================================================================
--- (empty file)
+++ gocept.ctl/trunk/README.txt Wed Feb 7 06:34:37 2007
(at)(at) -0,0 +1,6 (at)(at)
+===============
+gocept.download
+===============
+
+
+zc.buildout recipe to create a convenience-script for controlling services.
Added: gocept.ctl/trunk/setup.py
==============================================================================
--- (empty file)
+++ gocept.ctl/trunk/setup.py Wed Feb 7 06:34:37 2007
(at)(at) -0,0 +1,26 (at)(at)
+from setuptools import setup, find_packages
+
+name = "gocept.ctl"
+setup(
+ name = name,
+ version = "0.9",
+ author = "Christian Theune",
+ author_email = "ct(at)gocept.com",
+ description = "zc.buildout recipe to create a convenience-script for
controlling services",
+ long_description = open('README.txt').read(),
+ license = "ZPL 2.1",
+ keywords = "zope3 buildout",
+ url='http://svn.gocept.com/repos/gocept/'+name,
+ classifiers = ["Framework :: Buildout"],
+ zip_safe=False,
+ packages = find_packages('src'),
+ include_package_data = True,
+ package_dir = {'':'src'},
+ namespace_packages = ['gocept'],
+ install_requires = ['zc.buildout', 'setuptools'],
+ entry_points = {
+ 'zc.buildout': [
+ 'default = %s:Recipe' % name,
+ ]
+ },
+ )
Added: gocept.ctl/trunk/src/gocept/__init__.py
==============================================================================
--- (empty file)
+++ gocept.ctl/trunk/src/gocept/__init__.py Wed Feb 7 06:34:37 2007
(at)(at) -0,0 +1,6 (at)(at)
+# namespace package boilerplate
+try:
+ __import__('pkg_resources').declare_namespace(__name__)
+except ImportError, e:
+ from pkgutil import extend_path
+ __path__ = extend_path(__path__, __name__)
Added: gocept.ctl/trunk/src/gocept/ctl/__init__.py
==============================================================================
--- (empty file)
+++ gocept.ctl/trunk/src/gocept/ctl/__init__.py Wed Feb 7 06:34:37 2007
(at)(at) -0,0 +1,102 (at)(at)
+##############################################################################
+#
+# Copyright (c) 2007 gocept gmbh & co. kg and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (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.
+#
+##############################################################################
+
+import os
+import urlparse
+import urllib
+import md5
+import tempfile
+import subprocess
+import shutil
+
+script_template = """#!/bin/sh
+
+start ()
+{
+ echo 'Starting ...'
+%(start)s
+}
+
+stop ()
+{
+ echo 'Stopping ...'
+%(stop)s
+
+}
+
+help ()
+{
+ echo "Usage: $0 <start|stop|restart>"
+}
+
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ start
+ stop
+ ;;
+ *)
+ help
+ ;;
+esac
+"""
+
+
+class Recipe:
+ """Recipe that creates a shell script to start/stop multiple services
+ in a buildout.
+
+ Configuration options:
+
+ scripts ... list of script names to control (priority by order)
+
+ """
+
+ def __init__(self, buildout, name, options):
+ self.options = options
+ self.buildout = buildout
+ self.name = name
+ self.base = self.buildout['buildout']['bin-directory']
+ self.scripts = self.options['scripts'].split()
+
+ def update(self):
+ # No update needed, only run when configuration changes
+ pass
+
+ def install(self):
+ script = script_template % {'start': self._generate_commands('start'),
+ 'stop': self._generate_commands('stop',
reverse=True)}
+ script_name = os.path.join(self.base, self.name)
+ f = open(script_name, 'wb')
+ f.write(script)
+ f.close()
+ os.chmod(script_name, 0755)
+ return script_name
+
+ def _generate_commands(self, command, reverse=False):
+ """Build the list of commands for all scripts."""
+ commands = ""
+ scripts = self.scripts
+ if reverse:
+ scripts = reversed(self.scripts)
+ for script in scripts:
+ commands += "\techo %s ...\n" % script
+ commands += ("\t%s %s\n" %
+ (os.path.join(self.base, script), command))
+ return commands
|
SVN: r4405 - in gocept.ooodocma/trunk: . src/gocept/ooodocma
Christian Theune <ct(at)gocept.com> |
2007-02-07 07:00:16 |
[ FULL ]
|
Author: ctheune
Date: Wed Feb 7 07:00:14 2007
New Revision: 4405
Removed:
gocept.ooodocma/trunk/TODO.txt
Modified:
gocept.ooodocma/trunk/src/gocept/ooodocma/__init__.py
Log:
- support for more variables (email, smtpserver, storage area)
- automatic creation of storage area if required
Modified: gocept.ooodocma/trunk/src/gocept/ooodocma/__init__.py
==============================================================================
--- gocept.ooodocma/trunk/src/gocept/ooodocma/__init__.py (original)
+++ gocept.ooodocma/trunk/src/gocept/ooodocma/__init__.py Wed Feb 7 07:00:14
2007
(at)(at) -30,6 +30,11 (at)(at)
url - url to the docmaserver frankenstein package
md5sum - md5sum for verification
+
+ storage - directory to store jobs in
+ smtpserver - hostname or ip of smtpserver to use
+ email - sender email address for job notifications
+
"""
def __init__(self, buildout, name, options):
(at)(at) -46,6 +51,10 (at)(at)
def install(self):
paths = self.package_download.install()
+ if not os.path.isdir(self.options['storage']):
+ # Fails if the storage path is a file.
+ os.mkdir(self.options['storage'])
+
for config_file in [('docmaserver', 'docma_config.cfg'),
('docmaserver', 'zdaemon.conf'),
('oood', 'oood-config.xml'),
|
SVN: r4411 - in gocept.js.dojo/trunk: . src src/gocept src/gocept/js src/gocept/js/dojo
Christian Zagrodnick <cz(at)gocept.com> |
2007-02-07 12:08:05 |
[ FULL ]
|
Author: zagy
Date: Wed Feb 7 12:08:04 2007
New Revision: 4411
Added:
gocept.js.dojo/trunk/setup.py (contents, props changed)
gocept.js.dojo/trunk/src/
gocept.js.dojo/trunk/src/gocept/
gocept.js.dojo/trunk/src/gocept/__init__.py (contents, props changed)
gocept.js.dojo/trunk/src/gocept/js/
gocept.js.dojo/trunk/src/gocept/js/__init__.py (contents, props changed)
gocept.js.dojo/trunk/src/gocept/js/dojo/ (props changed)
gocept.js.dojo/trunk/src/gocept/js/dojo/__init__.py (contents, props
changed)
gocept.js.dojo/trunk/src/gocept/js/dojo/configure.zcml
Log:
adding dojo library
Added: gocept.js.dojo/trunk/setup.py
==============================================================================
--- (empty file)
+++ gocept.js.dojo/trunk/setup.py Wed Feb 7 12:08:04 2007
(at)(at) -0,0 +1,16 (at)(at)
+from setuptools import setup, find_packages
+
+setup(
+ name='gocept.js.dojo',
+ version='trunk',
+ author='gocept',
+ author_email='mail(at)gocept.com',
+ url='https://svn.gocept.com/repos/gocept/gocept.js.dojo',
+ description="""\
+""",
+ packages=find_packages('src'),
+ package_dir = {'': 'src'},
+ include_package_data = True,
+ zip_safe=False,
+ license='ZPL 2.1',
+ install_requires=['zc.resourcelibrary',])
Added: gocept.js.dojo/trunk/src/gocept/__init__.py
==============================================================================
--- (empty file)
+++ gocept.js.dojo/trunk/src/gocept/__init__.py Wed Feb 7 12:08:04 2007
(at)(at) -0,0 +1,7 (at)(at)
+# this is a namespace package
+try:
+ import pkg_resources
+ pkg_resources.declare_namespace(__name__)
+except ImportError:
+ import pkgutil
+ __path__ = pkgutil.extend_path(__path__, __name__)
Added: gocept.js.dojo/trunk/src/gocept/js/__init__.py
==============================================================================
--- (empty file)
+++ gocept.js.dojo/trunk/src/gocept/js/__init__.py Wed Feb 7 12:08:04 2007
(at)(at) -0,0 +1,7 (at)(at)
+# this is a namespace package
+try:
+ import pkg_resources
+ pkg_resources.declare_namespace(__name__)
+except ImportError:
+ import pkgutil
+ __path__ = pkgutil.extend_path(__path__, __name__)
Added: gocept.js.dojo/trunk/src/gocept/js/dojo/__init__.py
==============================================================================
--- (empty file)
+++ gocept.js.dojo/trunk/src/gocept/js/dojo/__init__.py Wed Feb 7 12:08:04
2007
(at)(at) -0,0 +1 (at)(at)
+# package
Added: gocept.js.dojo/trunk/src/gocept/js/dojo/configure.zcml
==============================================================================
--- (empty file)
+++ gocept.js.dojo/trunk/src/gocept/js/dojo/configure.zcml Wed Feb 7 12:08:04
2007
(at)(at) -0,0 +1,8 (at)(at)
+<configure
+ xmlns="http://namespaces.zope.org/zope">
+
+ <resourceLibrary name="dojo">
+ <directory source="dojo" include="dojo.js" />
+ </resourceLibrary>
+
+</configure>
|
SVN: r4413 - gocept.download/trunk/src/gocept/download
Thomas Lotze <tl(at)gocept.com> |
2007-02-07 14:05:37 |
[ FULL ]
|
Author: thomas
Date: Wed Feb 7 14:05:35 2007
New Revision: 4413
Modified:
gocept.download/trunk/src/gocept/download/__init__.py
Log:
creating part directory immediately before it is needed as we don't want an
empty one to hang around after a failed install attempt
Modified: gocept.download/trunk/src/gocept/download/__init__.py
==============================================================================
--- gocept.download/trunk/src/gocept/download/__init__.py (original)
+++ gocept.download/trunk/src/gocept/download/__init__.py Wed Feb 7 14:05:35
2007
(at)(at) -59,10 +59,6 (at)(at)
if not os.path.isdir(download_dir):
os.mkdir(download_dir)
- # We fail if the location already exists, typically this means it
- # is a broken installation.
- os.mkdir(self.options['location'])
-
# Step 1: Download the package (if not downloaded already)
download_filename = os.path.join(download_dir, self.filename)
if not os.path.exists(download_filename):
(at)(at) -103,6 +99,10 (at)(at)
else:
base = extract_dir
+ # We fail if the location already exists, typically this means it
+ # is a broken installation.
+ os.mkdir(self.options['location'])
+
for filename in os.listdir(base):
shutil.move(os.path.join(base, filename),
os.path.join(self.options['location'], filename))
|
SVN: r4417 - gocept.download/tags/gocept.download-0.9.2
Thomas Lotze <tl(at)gocept.com> |
2007-02-07 16:18:19 |
[ FULL ]
|
Author: thomas
Date: Wed Feb 7 16:18:18 2007
New Revision: 4417
Added:
gocept.download/tags/gocept.download-0.9.2/
- copied from r4415, gocept.download/trunk/
Modified:
gocept.download/tags/gocept.download-0.9.2/setup.py
Log:
tagging gocept.download-0.9.2
Modified: gocept.download/tags/gocept.download-0.9.2/setup.py
==============================================================================
--- gocept.download/trunk/setup.py (original)
+++ gocept.download/tags/gocept.download-0.9.2/setup.py Wed Feb 7 16:18:18
2007
(at)(at) -3,7 +3,7 (at)(at)
name = "gocept.download"
setup(
name = name,
- version = "dev",
+ version = "0.9.2",
author = "Christian Theune",
author_email = "ct(at)gocept.com",
description = "zc.buildout recipe for downloading and extracting an
archive.",
|
SVN: r4418 - gocept.download/trunk/src
Thomas Lotze <tl(at)gocept.com> |
2007-02-07 16:21:51 |
[ FULL ]
|
Author: thomas
Date: Wed Feb 7 16:21:50 2007
New Revision: 4418
Modified:
gocept.download/trunk/src/ (props changed)
Log:
ignore egg-info
|
SVN: r4421 - in gocept.seleniumtestrunner/trunk: . src src/gocept src/gocept/seleniumtestrunner
Christian Zagrodnick <cz(at)gocept.com> |
2007-02-08 10:39:26 |
[ FULL ]
|
Author: zagy
Date: Thu Feb 8 10:39:25 2007
New Revision: 4421
Added:
gocept.seleniumtestrunner/trunk/setup.py (contents, props changed)
gocept.seleniumtestrunner/trunk/src/ (props changed)
gocept.seleniumtestrunner/trunk/src/gocept/
gocept.seleniumtestrunner/trunk/src/gocept/__init__.py (contents, props
changed)
gocept.seleniumtestrunner/trunk/src/gocept/seleniumtestrunner/
gocept.seleniumtestrunner/trunk/src/gocept/seleniumtestrunner/__init__.py
(contents, props changed)
Log:
testrunner recipe for running zc.selenium tests
Added: gocept.seleniumtestrunner/trunk/setup.py
==============================================================================
--- (empty file)
+++ gocept.seleniumtestrunner/trunk/setup.py Thu Feb 8 10:39:25 2007
(at)(at) -0,0 +1,27 (at)(at)
+import os
+from setuptools import setup, find_packages
+
+name = "gocept.seleniumtestrunner"
+setup(
+ name = name,
+ version = "trunk",
+ author = "Christian Zagrodnick",
+ author_email = "cz(at)gocept.com",
+ description = "ZC Buildout recipe for creating selenium test runners",
+ long_description = "XXX",
+ license = "ZPL 2.1",
+ keywords = "development build testing",
+ url='https://svn.gocept.com/repos/gocept/gocept.seleniumtestrunner',
+
+ packages = find_packages('src'),
+ include_package_data = True,
+ package_dir = {'':'src'},
+ namespace_packages = ['gocept'],
+ install_requires = ['zc.buildout >=1.0.0b12',
+ 'zc.recipe.egg >=1.0.0a3',
+ 'setuptools',
+ 'zope.testing',
+ 'gocept.zope3instance',
+ ],
+ entry_points = {'zc.buildout': ['default = %s:Recipe' % name]},
+ )
Added: gocept.seleniumtestrunner/trunk/src/gocept/__init__.py
==============================================================================
--- (empty file)
+++ gocept.seleniumtestrunner/trunk/src/gocept/__init__.py Thu Feb 8 10:39:25
2007
(at)(at) -0,0 +1,7 (at)(at)
+# this is a namespace package
+try:
+ import pkg_resources
+ pkg_resources.declare_namespace(__name__)
+except ImportError:
+ import pkgutil
+ __path__ = pkgutil.extend_path(__path__, __name__)
Added:
gocept.seleniumtestrunner/trunk/src/gocept/seleniumtestrunner/__init__.py
==============================================================================
--- (empty file)
+++
gocept.seleniumtestrunner/trunk/src/gocept/seleniumtestrunner/__init__.py Thu
Feb 8 10:39:25 2007
(at)(at) -0,0 +1,97 (at)(at)
+##############################################################################
+#
+# Copyright (c) 2006-2007 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (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.
+#
+##############################################################################
+"""Selenium testrunner recipie
+
+$Id$
+"""
+
+import os, sys
+import pkg_resources
+import zc.buildout.easy_install
+import zc.recipe.egg
+import gocept.zope3instance
+
+class Recipe:
+
+ def __init__(self, buildout, name, options):
+ self.buildout = buildout
+ self.name = name
+ self.options = options
+ options['script'] =
os.path.join(buildout['buildout']['bin-directory'],
+ options.get('script', self.name),
+ )
+ self.egg = zc.recipe.egg.Egg(buildout, name, options)
+
+ def install(self):
+ options = self.options
+ eggs, ws = self.egg.working_set(('zc.selenium', 'zope.testing'))
+
+ zope3_location = gocept.zope3instance.Recipe.validateZ3Path(
+ self.buildout[options['instance']]['zope3-location'])
+ extra_paths = self.egg.extra_paths + [zope3_location]
+
+
+ parts_dir = self.buildout['buildout']['parts-directory']
+ instance = options['instance']
+ selenium_conf = os.path.join(
+ parts_dir, instance, options.get('selenium-conf',
'selenium.conf'))
+ selenium_zcml = os.path.join(
+ parts_dir, instance, options.get('selenium-zcml',
'selenium.zcml'))
+
+ file(selenium_conf, 'w').write(selenium_conf_template % selenium_zcml)
+
+ initialization = initialization_template % (selenium_conf,)
+
+ return zc.buildout.easy_install.scripts(
+ [(options['script'], 'zc.selenium.selenium','main')],
+ ws, options['executable'],
+ self.buildout['buildout']['bin-directory'],
+ extra_paths=extra_paths,
+ initialization=initialization,
+ )
+
+ update = install
+
+initialization_template = """\
+sys.argv[1:1] = [%r]
+"""
+
+
+selenium_conf_template = """\
+interrupt-check-interval 200
+site-definition %s
+
+<zodb>
+ <demostorage>
+ </demostorage>
+</zodb>
+
+<server http0>
+ type WSGI-HTTP
+ address 127.0.0.1:8080
+</server>
+
+<accesslog>
+ <logfile>
+ path STDOUT
+ </logfile>
+</accesslog>
+
+<eventlog>
+ <logfile>
+ path STDOUT
+ formatter zope.exceptions.log.Formatter
+ </logfile>
+</eventlog>
+"""
|
SVN: r4422 - in gocept.ctl/trunk: . src/gocept/ctl
Christian Theune <ct(at)gocept.com> |
2007-02-09 10:56:39 |
[ FULL ]
|
Author: ctheune
Date: Fri Feb 9 10:56:37 2007
New Revision: 4422
Modified:
gocept.ctl/trunk/ (props changed)
gocept.ctl/trunk/CHANGES.txt
gocept.ctl/trunk/setup.py
gocept.ctl/trunk/src/gocept/ctl/__init__.py
Log:
- fixed restart order
- added support for svn develop eggs
Modified: gocept.ctl/trunk/CHANGES.txt
==============================================================================
--- gocept.ctl/trunk/CHANGES.txt (original)
+++ gocept.ctl/trunk/CHANGES.txt Fri Feb 9 10:56:37 2007
(at)(at) -1,3 +1,8 (at)(at)
+0.9.1
+=====
+
+ - Fixed restart order
+
0.9
===
Modified: gocept.ctl/trunk/setup.py
==============================================================================
--- gocept.ctl/trunk/setup.py (original)
+++ gocept.ctl/trunk/setup.py Fri Feb 9 10:56:37 2007
(at)(at) -3,7 +3,7 (at)(at)
name = "gocept.ctl"
setup(
name = name,
- version = "0.9",
+ version = "dev",
author = "Christian Theune",
author_email = "ct(at)gocept.com",
description = "zc.buildout recipe to create a convenience-script for
controlling services",
(at)(at) -16,6 +16,7 (at)(at)
packages = find_packages('src'),
include_package_data = True,
package_dir = {'':'src'},
+ download_url='https://svn.gocept.com/repos/gocept/gocept.ctl/trunk#egg=gocept.ctl-dev',
namespace_packages = ['gocept'],
install_requires = ['zc.buildout', 'setuptools'],
entry_points = {
Modified: gocept.ctl/trunk/src/gocept/ctl/__init__.py
==============================================================================
--- gocept.ctl/trunk/src/gocept/ctl/__init__.py (original)
+++ gocept.ctl/trunk/src/gocept/ctl/__init__.py Fri Feb 9 10:56:37 2007
(at)(at) -48,8 +48,8 (at)(at)
stop
;;
restart)
- start
stop
+ start
;;
*)
help
|
SVN: r4427 - in gocept.js.dojo/trunk: . src/gocept/js/dojo
Roman Joost <rj(at)gocept.com> |
2007-02-12 16:42:59 |
[ FULL ]
|
Author: roman
Date: Mon Feb 12 16:42:57 2007
New Revision: 4427
Added:
gocept.js.dojo/trunk/src/gocept/js/dojo/table.py
gocept.js.dojo/trunk/src/gocept/js/dojo/table.txt
gocept.js.dojo/trunk/src/gocept/js/dojo/test.py
Modified:
gocept.js.dojo/trunk/setup.py
Log:
- added customized formatter for dojo based filtering table
- include zc.table
Modified: gocept.js.dojo/trunk/setup.py
==============================================================================
--- gocept.js.dojo/trunk/setup.py (original)
+++ gocept.js.dojo/trunk/setup.py Mon Feb 12 16:42:57 2007
(at)(at) -13,4 +13,5 (at)(at)
include_package_data = True,
zip_safe=False,
license='ZPL 2.1',
- install_requires=['zc.resourcelibrary',])
+ install_requires=['zc.resourcelibrary',
+ 'zc.table',])
Added: gocept.js.dojo/trunk/src/gocept/js/dojo/table.py
==============================================================================
--- (empty file)
+++ gocept.js.dojo/trunk/src/gocept/js/dojo/table.py Mon Feb 12 16:42:57 2007
(at)(at) -0,0 +1,20 (at)(at)
+# Copyright (c) 2007 gocept gmbh & co. kg
+# See also LICENSE.txt
+# $Id$
+import zc.table.table
+import zc.resourcelibrary
+
+class DojoTableFormatter(zc.table.table.Formatter):
+
+ def __call__(self, attrs):
+ """renders the table"""
+ return "\n<table %s>\n%s</table>\n%s" % (
+ self._getTableAttributes(attrs), self.renderContents(),
+ self.renderExtra())
+
+ def _getTableAttributes(self, attrs):
+ """returns given attributes as string incl. CSS class"""
+ result = self._getCSSClass('table')
+ result += " ".join(['%s="%s"' %i for i in attrs.items()])
+
+ return result
Added: gocept.js.dojo/trunk/src/gocept/js/dojo/table.txt
==============================================================================
--- (empty file)
+++ gocept.js.dojo/trunk/src/gocept/js/dojo/table.txt Mon Feb 12 16:42:57 2007
(at)(at) -0,0 +1,31 (at)(at)
+Formatter
+=========
+
+The custom DojoTableFormatter renders a HTML table with additional dojo
+specific attributes::
+
+ >>> import zc.table.column
+ >>> import gocept.js.dojo.table
+ >>>
+ >>>
+ >>> class Test(object):
+ ...
+ ... columns = (
+ ... zc.table.column.GetterColumn('Titel',
+ ... lambda t, c: t[0]),
+ ... zc.table.column.GetterColumn('Erstellt',
+ ... lambda t, c: t[1])
+ ... )
+ ...
+ ... content = [('A', '20.02.2007'), ('B', '20.03.2007')]
+ ...
+ ... def contentTable(self, attrs):
+ ... return gocept.js.dojo.table.DojoTableFormatter(
+ ... self, self, self.content,
+ ... columns=self.columns)(attrs)
+ >>>
+ >>>
+ >>> attrs = {'dojoType':'FilteringTable',
+ ... 'enableMultiselect':'true'}
+ >>> Test().contentTable(attrs)
+ u'\n<table enableMultiselect="true" dojoType="FilteringTable">...'
Added: gocept.js.dojo/trunk/src/gocept/js/dojo/test.py
==============================================================================
--- (empty file)
+++ gocept.js.dojo/trunk/src/gocept/js/dojo/test.py Mon Feb 12 16:42:57 2007
(at)(at) -0,0 +1,12 (at)(at)
+# Copyright (c) 2007 gocept gmbh & co. kg
+# See also LICENSE.txt
+# $Id: test.py 7986 2007-02-09 15:04:26Z zagy $
+
+from zope.testing import doctest
+
+
+def test_suite():
+ return doctest.DocFileSuite(
+ 'table.txt',
+ optionflags=(doctest.REPORT_NDIFF + doctest.NORMALIZE_WHITESPACE +
+ doctest.ELLIPSIS))
|
SVN: r4428 - in gocept.js.dojo/trunk/src/gocept/js/dojo: . resources
Roman Joost <rj(at)gocept.com> |
2007-02-12 17:14:39 |
[ FULL ]
|
Author: roman
Date: Mon Feb 12 17:14:37 2007
New Revision: 4428
Added:
gocept.js.dojo/trunk/src/gocept/js/dojo/resources/
gocept.js.dojo/trunk/src/gocept/js/dojo/resources/tableHandlers.js
Modified:
gocept.js.dojo/trunk/src/gocept/js/dojo/configure.zcml
gocept.js.dojo/trunk/src/gocept/js/dojo/table.py
Log:
- moved javascript handling code for dojo based tables
- renamed resourcelibrary dojo to gocept.js.dojo
Modified: gocept.js.dojo/trunk/src/gocept/js/dojo/configure.zcml
==============================================================================
--- gocept.js.dojo/trunk/src/gocept/js/dojo/configure.zcml (original)
+++ gocept.js.dojo/trunk/src/gocept/js/dojo/configure.zcml Mon Feb 12 17:14:37
2007
(at)(at) -1,8 +1,12 (at)(at)
<configure
xmlns="http://namespaces.zope.org/zope">
- <resourceLibrary name="dojo">
+ <resourceLibrary name="gocept.js.dojo">
<directory source="dojo" include="dojo.js" />
</resourceLibrary>
+
+ <resourceLibrary name="tableHandlers" require="gocept.js.dojo">
+ <directory source="resources" include="tableHandlers.js" />
+ </resourceLibrary>
</configure>
Added: gocept.js.dojo/trunk/src/gocept/js/dojo/resources/tableHandlers.js
==============================================================================
--- (empty file)
+++ gocept.js.dojo/trunk/src/gocept/js/dojo/resources/tableHandlers.js Mon Feb
12 17:14:37 2007
(at)(at) -0,0 +1,2 (at)(at)
+// imports
+dojo.require("dojo.widget.FilteringTable");
Modified: gocept.js.dojo/trunk/src/gocept/js/dojo/table.py
==============================================================================
--- gocept.js.dojo/trunk/src/gocept/js/dojo/table.py (original)
+++ gocept.js.dojo/trunk/src/gocept/js/dojo/table.py Mon Feb 12 17:14:37 2007
(at)(at) -8,6 +8,8 (at)(at)
def __call__(self, attrs):
"""renders the table"""
+ zc.resourcelibrary.need('tableHandlers')
+
return "\n<table %s>\n%s</table>\n%s" % (
self._getTableAttributes(attrs), self.renderContents(),
self.renderExtra())
|
SVN: r4429 - gocept.download/trunk/src/gocept/download
Thomas Lotze <tl(at)gocept.com> |
2007-02-12 22:44:43 |
[ FULL ]
|
Author: thomas
Date: Mon Feb 12 22:44:41 2007
New Revision: 4429
Modified:
gocept.download/trunk/src/gocept/download/__init__.py
Log:
whitespace
Modified: gocept.download/trunk/src/gocept/download/__init__.py
==============================================================================
--- gocept.download/trunk/src/gocept/download/__init__.py (original)
+++ gocept.download/trunk/src/gocept/download/__init__.py Mon Feb 12 22:44:41
2007
(at)(at) -38,7 +38,7 (at)(at)
self.name = name
buildout['buildout'].setdefault(
- 'download-directory',
+ 'download-directory',
os.path.join(buildout['buildout']['directory'], 'downloads'))
options['location'] = os.path.join(
(at)(at) -59,7 +59,7 (at)(at)
if not os.path.isdir(download_dir):
os.mkdir(download_dir)
- # Step 1: Download the package (if not downloaded already)
+ # Step 1: Download the package (if not downloaded already)
download_filename = os.path.join(download_dir, self.filename)
if not os.path.exists(download_filename):
# XXX undefined behavior when file already exists
(at)(at) -68,7 +68,7 (at)(at)
# Check MD5 sum
if compute_md5sum(download_filename) != self.options['md5sum']:
- raise ValueError("Invalid MD5 sum for downloaded file %r" %
+ raise ValueError("Invalid MD5 sum for downloaded file %r" %
self.options['url'])
# Step 2: Extract the package
|
SVN: r4430 - gocept.download/trunk/src/gocept/download
Thomas Lotze <tl(at)gocept.com> |
2007-02-12 23:16:44 |
[ FULL ]
|
Author: thomas
Date: Mon Feb 12 23:16:42 2007
New Revision: 4430
Modified:
gocept.download/trunk/src/gocept/download/__init__.py
Log:
better name for temporary extract dir
Modified: gocept.download/trunk/src/gocept/download/__init__.py
==============================================================================
--- gocept.download/trunk/src/gocept/download/__init__.py (original)
+++ gocept.download/trunk/src/gocept/download/__init__.py Mon Feb 12 23:16:42
2007
(at)(at) -72,7 +72,7 (at)(at)
self.options['url'])
# Step 2: Extract the package
- extract_dir = tempfile.mkdtemp()
+ extract_dir = tempfile.mkdtemp("buildout-" + self.name)
is_ext = download_filename.endswith
if is_ext('.tar.gz') or is_ext('.tgz'):
call = ['tar', 'xzf', download_filename, '-C', extract_dir]
|
SVN: r4431 - gocept.download/trunk/src/gocept/download
Thomas Lotze <tl(at)gocept.com> |
2007-02-12 23:37:22 |
[ FULL ]
|
Author: thomas
Date: Mon Feb 12 23:37:21 2007
New Revision: 4431
Modified:
gocept.download/trunk/src/gocept/download/__init__.py
Log:
fixing tar.bz2 extraction
Modified: gocept.download/trunk/src/gocept/download/__init__.py
==============================================================================
--- gocept.download/trunk/src/gocept/download/__init__.py (original)
+++ gocept.download/trunk/src/gocept/download/__init__.py Mon Feb 12 23:37:21
2007
(at)(at) -77,7 +77,7 (at)(at)
if is_ext('.tar.gz') or is_ext('.tgz'):
call = ['tar', 'xzf', download_filename, '-C', extract_dir]
elif is_ext('.tar.bz2') or is_ext('.tbz2'):
- call = ['tar', 'xzf', download_filename, '-C', extract_dir]
+ call = ['tar', 'xjf', download_filename, '-C', extract_dir]
elif is_ext('.zip'):
call = ['unzip', download_filename, '-d', extract_dir]
else:
|
SVN: r4432 - gocept.download/trunk/src/gocept/download
Thomas Lotze <tl(at)gocept.com> |
2007-02-12 23:57:08 |
[ FULL ]
|
Author: thomas
Date: Mon Feb 12 23:57:06 2007
New Revision: 4432
Modified:
gocept.download/trunk/src/gocept/download/__init__.py
Log:
added destination option to allow for extracting to a temporary directory
without creating a part
Modified: gocept.download/trunk/src/gocept/download/__init__.py
==============================================================================
--- gocept.download/trunk/src/gocept/download/__init__.py (original)
+++ gocept.download/trunk/src/gocept/download/__init__.py Mon Feb 12 23:57:06
2007
(at)(at) -13,6 +13,7 (at)(at)
##############################################################################
import os
+import os.path
import urlparse
import urllib
import md5
(at)(at) -29,6 +30,7 (at)(at)
url
strip-top-level-dir
md5sum
+ destination
"""
(at)(at) -41,10 +43,11 (at)(at)
'download-directory',
os.path.join(buildout['buildout']['directory'], 'downloads'))
- options['location'] = os.path.join(
- buildout['buildout']['parts-directory'],
- self.name,
- )
+ if not options.get('destination'):
+ options['location'] = os.path.join(
+ buildout['buildout']['parts-directory'],
+ self.name,
+ )
options['bin-directory'] = buildout['buildout']['bin-directory']
options.setdefault('strip-top-level-dir', 'true')
(at)(at) -59,6 +62,18 (at)(at)
if not os.path.isdir(download_dir):
os.mkdir(download_dir)
+ destination = self.options.get('destination')
+ # Fail if a destination is given and is not an empty directory.
+ # Consider both None (destination option was not given) and ''
+ # (destination option was given, but with an empty value) for the
+ # destination to not be given.
+ if (destination and
+ os.path.exists(destination) and
+ (not os.path.isdir(destination) or os.listdir(destination))
+ ):
+ raise ValueError(
+ "Destination %s must be an empty directory." % destination)
+
# Step 1: Download the package (if not downloaded already)
download_filename = os.path.join(download_dir, self.filename)
if not os.path.exists(download_filename):
(at)(at) -99,15 +114,21 (at)(at)
else:
base = extract_dir
- # We fail if the location already exists, typically this means it
- # is a broken installation.
- os.mkdir(self.options['location'])
+ if destination is None:
+ # We fail if the location already exists, typically this means it
+ # is a broken installation.
+ destination = self.options['location']
+ os.mkdir(destination)
+ part_directories = [destination]
+ else:
+ part_directories = []
for filename in os.listdir(base):
- shutil.move(os.path.join(base, filename),
os.path.join(self.options['location'], filename))
+ shutil.move(os.path.join(base, filename),
+ os.path.join(destination, filename))
shutil.rmtree(extract_dir)
- return [self.options['location']]
+ return part_directories
def compute_md5sum(filename):
|
SVN: r4436 - gocept.download/tags/gocept.download-0.9.3
Thomas Lotze <tl(at)gocept.com> |
2007-02-13 10:48:21 |
[ FULL ]
|
Author: thomas
Date: Tue Feb 13 10:48:20 2007
New Revision: 4436
Added:
gocept.download/tags/gocept.download-0.9.3/
- copied from r4432, gocept.download/trunk/
gocept.download/tags/gocept.download-0.9.3/CHANGES.txt
- copied unchanged from r4435, gocept.download/trunk/CHANGES.txt
Modified:
gocept.download/tags/gocept.download-0.9.3/setup.py
Log:
tagging gocept.download-0.9.3
Modified: gocept.download/tags/gocept.download-0.9.3/setup.py
==============================================================================
--- gocept.download/trunk/setup.py (original)
+++ gocept.download/tags/gocept.download-0.9.3/setup.py Tue Feb 13 10:48:20
2007
(at)(at) -3,7 +3,7 (at)(at)
name = "gocept.download"
setup(
name = name,
- version = "dev",
+ version = "0.9.3",
author = "Christian Theune",
author_email = "ct(at)gocept.com",
description = "zc.buildout recipe for downloading and extracting an
archive.",
|
SVN: r4441 - in gocept.js.dojo/trunk/src/gocept/js/dojo: . resources
Roman Joost <rj(at)gocept.com> |
2007-02-14 10:02:15 |
[ FULL ]
|
Author: roman
Date: Wed Feb 14 10:02:13 2007
New Revision: 4441
Modified:
gocept.js.dojo/trunk/src/gocept/js/dojo/resources/tableHandlers.js
gocept.js.dojo/trunk/src/gocept/js/dojo/table.py
gocept.js.dojo/trunk/src/gocept/js/dojo/table.txt
Log:
- added dojo based table and column based on zc.table
- added javascript handling code for filtering
Modified: gocept.js.dojo/trunk/src/gocept/js/dojo/resources/tableHandlers.js
==============================================================================
---
gocept.js.dojo/trunk/src/gocept/js/dojo/resources/tableHandlers.js (original)
+++ gocept.js.dojo/trunk/src/gocept/js/dojo/resources/tableHandlers.js Wed Feb
14 10:02:13 2007
(at)(at) -1,2 +1,29 (at)(at)
// imports
dojo.require("dojo.widget.FilteringTable");
+
+function updateFilter(tableId, input) {
+ var table = dojo.widget.byId(tableId);
+ if (!table)
+ return False;
+
+ table.setFilter("Titel", titleFilter);
+}
+
+function titleFilter(title) {
+ var input = document.getElementById('tableFilter')
+ var value = input.value.toLowerCase();
+ title = title.toLowerCase();
+ if (!value)
+ return true;
+
+ switch(title.search(value)) {
+ case -1: // not found
+ return false;
+ case 0: // found
+ return true;
+ default:
+ break
+ }
+
+ return true
+}
Modified: gocept.js.dojo/trunk/src/gocept/js/dojo/table.py
==============================================================================
--- gocept.js.dojo/trunk/src/gocept/js/dojo/table.py (original)
+++ gocept.js.dojo/trunk/src/gocept/js/dojo/table.py Wed Feb 14 10:02:13 2007
(at)(at) -2,21 +2,54 (at)(at)
# See also LICENSE.txt
# $Id$
import zc.table.table
+import zc.table.column
import zc.resourcelibrary
+
class DojoTableFormatter(zc.table.table.Formatter):
def __call__(self, attrs):
"""renders the table"""
zc.resourcelibrary.need('tableHandlers')
- return "\n<table %s>\n%s</table>\n%s" % (
+ return "\n<table%s>\n%s</table>\n%s" % (
self._getTableAttributes(attrs), self.renderContents(),
self.renderExtra())
def _getTableAttributes(self, attrs):
"""returns given attributes as string incl. CSS class"""
- result = self._getCSSClass('table')
- result += " ".join(['%s="%s"' %i for i in attrs.items()])
+ return "%s %s" %(self._getCSSClass('table'), attrs)
+
+
+ def renderHeader(self, column):
+ return ' <th%s %s>\n %s\n </th>\n' % (
+ self._getCSSClass('th'), column.attrs, self.getHeader(column))
+
+ def renderCell(self, item, column):
+ """renders cell without any whitespace"""
+ return ' <td%s>%s</td>\n' % (
+ self._getCSSClass('td'), self.getCell(item, column),)
+
+ def renderRows(self):
+ return ''.join([self.renderRow(item, id) for id, item in enumerate(
+ self.getItems())])
+
+ def renderRow(self, item, id):
+ return ' <tr%s value="%s">\n%s </tr>\n' % (
+ self._getCSSClass('tr'), id, self.renderCells(item))
+
+class DojoTableColumn(zc.table.column.Column):
+
+ def __init__(self, title=None, getter=None, attrs=""):
+ if getter is not None:
+ self.getter = getter
+
+ if title is not None:
+ self.title = title
+ self.name = title
+ self.attrs = attrs
+
+ def renderCell(self, item, formatter):
+ value = self.getter(item, formatter)
+ return unicode(value)
- return result
Modified: gocept.js.dojo/trunk/src/gocept/js/dojo/table.txt
==============================================================================
--- gocept.js.dojo/trunk/src/gocept/js/dojo/table.txt (original)
+++ gocept.js.dojo/trunk/src/gocept/js/dojo/table.txt Wed Feb 14 10:02:13 2007
(at)(at) -2,19 +2,25 (at)(at)
=========
The custom DojoTableFormatter renders a HTML table with additional dojo
-specific attributes::
+specific attributes. Please keep in mind, that you have to use at least
+the DojoTableColumn. The zc.table default columns won't work (and it
+wouldn't make sense to use them, because dojo needs additional
+attributes in the head). Provide the attributes as a string parameter::
- >>> import zc.table.column
>>> import gocept.js.dojo.table
>>>
>>>
>>> class Test(object):
- ...
+ ...
+ ... nameattrs = 'field="Titel" dataType="String"'
+ ... dateattrs = 'field="Erstellt" dataType="Date"'
... columns = (
- ... zc.table.column.GetterColumn('Titel',
- ... lambda t, c: t[0]),
- ... zc.table.column.GetterColumn('Erstellt',
- ... lambda t, c: t[1])
+ ... gocept.js.dojo.table.DojoTableColumn('Titel',
+ ... lambda t, c: t[0],
+ ... nameattrs),
+ ... gocept.js.dojo.table.DojoTableColumn('Erstellt',
+ ... lambda t, c: t[1],
+ ... dateattrs),
... )
...
... content = [('A', '20.02.2007'), ('B', '20.03.2007')]
(at)(at) -25,7 +31,38 (at)(at)
... columns=self.columns)(attrs)
>>>
>>>
- >>> attrs = {'dojoType':'FilteringTable',
- ... 'enableMultiselect':'true'}
- >>> Test().contentTable(attrs)
- u'\n<table enableMultiselect="true" dojoType="FilteringTable">...'
+ >>> attrs = 'dojoType="FilteringTable" enableMultiselect="true"'
+ >>> table = Test().contentTable(attrs)
+ >>> print table
+ <BLANKLINE>
+ <table dojoType="FilteringTable" enableMultiselect="true">
+ ...<th field="Titel" dataType="String">...
+ ...</th>...
+
+DojoTableColumn
+===============
+
+You can pass additional attributes as a string to render dojo
+attributes. I'll reuse the above example::
+
+ >>> print table
+ <BLANKLINE>
+ <table dojoType="FilteringTable" enableMultiselect="true">
+ <thead>
+ <tr>
+ <th field="Titel" dataType="String">
+ Titel
+ </th>...
+
+
+To get the filtering work for dojo, the table have to have a unique id
+set for each row in the table body::
+
+ >>> print table
+ <BLANKLINE>
+ <table...
+ <tr value="0">
+ <td>A</td>
+ <td>20.02.2007</td>
+ </tr>
+ <tr value="1">...
|
SVN: r4451 - in gocept.icon/trunk: . src src/gocept src/gocept/icon src/gocept/icon/browser
Roman Joost <rj(at)gocept.com> |
2007-02-16 10:28:32 |
[ FULL ]
|
Author: roman
Date: Fri Feb 16 10:28:30 2007
New Revision: 4451
Added:
gocept.icon/trunk/README.txt
gocept.icon/trunk/setup.py
gocept.icon/trunk/src/
gocept.icon/trunk/src/gocept/
gocept.icon/trunk/src/gocept/__init__.py
gocept.icon/trunk/src/gocept/icon/
gocept.icon/trunk/src/gocept/icon/__init__.py
gocept.icon/trunk/src/gocept/icon/browser/
gocept.icon/trunk/src/gocept/icon/browser/__init__.py
gocept.icon/trunk/src/gocept/icon/browser/configure.zcml
gocept.icon/trunk/src/gocept/icon/browser/icon.py
gocept.icon/trunk/src/gocept/icon/browser/icon.txt
gocept.icon/trunk/src/gocept/icon/browser/interfaces.py
gocept.icon/trunk/src/gocept/icon/browser/test.py
Log:
initial checkin of the gocept.icon package, which provides an icon adapter
Added: gocept.icon/trunk/README.txt
==============================================================================
--- (empty file)
+++ gocept.icon/trunk/README.txt Fri Feb 16 10:28:30 2007
(at)(at) -0,0 +1,5 (at)(at)
+================
+Icon integration
+================
+
+gocept.icon provides a better way to use icons in the ZMI.
Added: gocept.icon/trunk/setup.py
==============================================================================
--- (empty file)
+++ gocept.icon/trunk/setup.py Fri Feb 16 10:28:30 2007
(at)(at) -0,0 +1,16 (at)(at)
+from setuptools import setup, find_packages
+
+setup(
+ name='gocept.icon',
+ version='trunk',
+ author='gocept',
+ author_email='mail(at)gocept.com',
+ url='https://svn.gocept.com/repos/gocept/gocept.icon',
+ description="""\
+""",
+ packages=find_packages('src'),
+ package_dir = {'': 'src'},
+ include_package_data = True,
+ zip_safe=False,
+ license='ZPL 2.1',
+ install_requires=[])
Added: gocept.icon/trunk/src/gocept/__init__.py
==============================================================================
--- (empty file)
+++ gocept.icon/trunk/src/gocept/__init__.py Fri Feb 16 10:28:30 2007
(at)(at) -0,0 +1,7 (at)(at)
+# this is a namespace package
+try:
+ import pkg_resources
+ pkg_resources.declare_namespace(__name__)
+except ImportError:
+ import pkgutil
+ __path__ = pkgutil.extend_path(__path__, __name__)
Added: gocept.icon/trunk/src/gocept/icon/__init__.py
==============================================================================
--- (empty file)
+++ gocept.icon/trunk/src/gocept/icon/__init__.py Fri Feb 16 10:28:30 2007
(at)(at) -0,0 +1,7 (at)(at)
+# this is a namespace package
+try:
+ import pkg_resources
+ pkg_resources.declare_namespace(__name__)
+except ImportError:
+ import pkgutil
+ __path__ = pkgutil.extend_path(__path__, __name__)
Added: gocept.icon/trunk/src/gocept/icon/browser/__init__.py
==============================================================================
--- (empty file)
+++ gocept.icon/trunk/src/gocept/icon/browser/__init__.py Fri Feb 16 10:28:30
2007
(at)(at) -0,0 +1 (at)(at)
+# package
Added: gocept.icon/trunk/src/gocept/icon/browser/configure.zcml
==============================================================================
--- (empty file)
+++ gocept.icon/trunk/src/gocept/icon/browser/configure.zcml Fri Feb 16
10:28:30 2007
(at)(at) -0,0 +1,10 (at)(at)
+<configure
+ xmlns="http://namespaces.zope.org/zope">
+
+ <zope:adapter
+ for="zope.app.publisher.browser.icon.IconView"
+ provides=".interfaces.IICon"
+ factory=".icon.Icon"
+ />
+
+</configure>
Added: gocept.icon/trunk/src/gocept/icon/browser/icon.py
==============================================================================
--- (empty file)
+++ gocept.icon/trunk/src/gocept/icon/browser/icon.py Fri Feb 16 10:28:30 2007
(at)(at) -0,0 +1,55 (at)(at)
+# Copyright (c) 2007 gocept gmbh & co. kg
+# See also LICENSE.txt
+# $Id$
+
+import zc.table.table
+import zc.table.column
+import zc.resourcelibrary
+
+
+class DojoTableFormatter(zc.table.table.Formatter):
+
+ def __call__(self, attrs):
+ """renders the table"""
+ zc.resourcelibrary.need('tableHandlers')
+
+ return "\n<table%s>\n%s</table>\n%s" % (
+ self._getTableAttributes(attrs), self.renderContents(),
+ self.renderExtra())
+
+ def _getTableAttributes(self, attrs):
+ """returns given attributes as string incl. CSS class"""
+ return "%s %s" %(self._getCSSClass('table'), attrs)
+
+ def renderHeader(self, column):
+ return ' <th%s %s>\n %s\n </th>\n' % (
+ self._getCSSClass('th'), column.attrs, self.getHeader(column))
+
+ def renderCell(self, item, column):
+ """renders cell without any whitespace"""
+ return ' <td%s>%s</td>\n' % (
+ self._getCSSClass('td'), self.getCell(item, column),)
+
+ def renderRows(self):
+ return ''.join([self.renderRow(item, id) for id, item in enumerate(
+ self.getItems())])
+
+ def renderRow(self, item, id):
+ return ' <tr%s value="%s">\n%s </tr>\n' % (
+ self._getCSSClass('tr'), id, self.renderCells(item))
+
+
+class DojoTableColumn(zc.table.column.Column):
+
+ def __init__(self, title=None, getter=None, attrs=""):
+ if getter is not None:
+ self.getter = getter
+
+ if title is not None:
+ self.title = title
+ self.name = title
+ self.attrs = attrs
+
+ def renderCell(self, item, formatter):
+ value = self.getter(item, formatter)
+ return unicode(value)
Added: gocept.icon/trunk/src/gocept/icon/browser/icon.txt
==============================================================================
--- (empty file)
+++ gocept.icon/trunk/src/gocept/icon/browser/icon.txt Fri Feb 16 10:28:30 2007
(at)(at) -0,0 +1,68 (at)(at)
+Formatter
+=========
+
+The custom DojoTableFormatter renders a HTML table with additional dojo
+specific attributes. Please keep in mind, that you have to use at least
+the DojoTableColumn. The zc.table default columns won't work (and it
+wouldn't make sense to use them, because dojo needs additional
+attributes in the head). Provide the attributes as a string parameter::
+
+ >>> import gocept.js.dojo.table
+ >>>
+ >>>
+ >>> class Test(object):
+ ...
+ ... nameattrs = 'field="Titel" dataType="String"'
+ ... dateattrs = 'field="Erstellt" dataType="Date"'
+ ... columns = (
+ ... gocept.js.dojo.table.DojoTableColumn('Titel',
+ ... lambda t, c: t[0],
+ ... nameattrs),
+ ... gocept.js.dojo.table.DojoTableColumn('Erstellt',
+ ... lambda t, c: t[1],
+ ... dateattrs),
+ ... )
+ ...
+ ... content = [('A', '20.02.2007'), ('B', '20.03.2007')]
+ ...
+ ... def contentTable(self, attrs):
+ ... return gocept.js.dojo.table.DojoTableFormatter(
+ ... self, self, self.content,
+ ... columns=self.columns)(attrs)
+ >>>
+ >>>
+ >>> attrs = 'dojoType="FilteringTable" enableMultiselect="true"'
+ >>> table = Test().contentTable(attrs)
+ >>> print table
+ <BLANKLINE>
+ <table dojoType="FilteringTable" enableMultiselect="true">
+ ...<th field="Titel" dataType="String">...
+ ...</th>...
+
+DojoTableColumn
+===============
+
+You can pass additional attributes as a string to render dojo
+attributes. I'll reuse the above example::
+
+ >>> print table
+ <BLANKLINE>
+ <table dojoType="FilteringTable" enableMultiselect="true">
+ <thead>
+ <tr>
+ <th field="Titel" dataType="String">
+ Titel
+ </th>...
+
+
+To get the filtering work for dojo, the table have to have a unique id
+set for each row in the table body::
+
+ >>> print table
+ <BLANKLINE>
+ <table...
+ <tr value="0">
+ <td>A</td>
+ <td>20.02.2007</td>
+ </tr>
+ <tr value="1">...
Added: gocept.icon/trunk/src/gocept/icon/browser/interfaces.py
==============================================================================
--- (empty file)
+++ gocept.icon/trunk/src/gocept/icon/browser/interfaces.py Fri Feb 16 10:28:30
2007
(at)(at) -0,0 +1,7 (at)(at)
+# -*- coding: latin-1 -*-
+# Copyright (c) 2007 gocept gmbh & co. kg
+# See also LICENSE.txt
+# $Id$
+
+class IIcon(Interface):
+ """Adapter which returns an icon with a different size"""
Added: gocept.icon/trunk/src/gocept/icon/browser/test.py
==============================================================================
--- (empty file)
+++ gocept.icon/trunk/src/gocept/icon/browser/test.py Fri Feb 16 10:28:30 2007
(at)(at) -0,0 +1,12 (at)(at)
+# Copyright (c) 2007 gocept gmbh & co. kg
+# See also LICENSE.txt
+# $Id: test.py 7986 2007-02-09 15:04:26Z zagy $
+
+from zope.testing import doctest
+
+
+def test_suite():
+ return doctest.DocFileSuite(
+ 'icon.txt',
+ optionflags=(doctest.REPORT_NDIFF + doctest.NORMALIZE_WHITESPACE +
+ doctest.ELLIPSIS))
|
SVN: r4469 - in gocept.zeoraid/trunk: . src/gocept src/gocept/zeoraid
Christian Theune <ct(at)gocept.com> |
2007-02-24 19:50:47 |
[ FULL ]
|
Author: ctheune
Date: Sat Feb 24 19:50:43 2007
New Revision: 4469
Added:
gocept.zeoraid/trunk/setup.py (contents, props changed)
Modified:
gocept.zeoraid/trunk/src/gocept/__init__.py
gocept.zeoraid/trunk/src/gocept/zeoraid/TODO.txt
Log:
- added setup.py
- copied namespace-compatible __init__.py to gocept/
Added: gocept.zeoraid/trunk/setup.py
==============================================================================
--- (empty file)
+++ gocept.zeoraid/trunk/setup.py Sat Feb 24 19:50:43 2007
(at)(at) -0,0 +1,22 (at)(at)
+from setuptools import setup, find_packages
+
+name = "gocept.zeoraid"
+setup(
+ name = name,
+ version = "dev",
+ author = "Christian Theune",
+ author_email = "ct(at)gocept.com",
+ description = "A ZODB storage for replication using RAID techniques.",
+ long_description = open('src/gocept/zeoraid/README.txt').read(),
+ license = "ZPL 2.1",
+ keywords = "zodb buildout",
+ classifiers = ["Framework :: Buildout"],
+ url='http://svn.gocept.com/repos/gocept/'+name,
+ download_url='https://svn.gocept.com/repos/gocept/gocept.download/trunk#egg=gocept.download-dev',
+ zip_safe=False,
+ packages = find_packages('src'),
+ include_package_data = True,
+ package_dir = {'':'src'},
+ namespace_packages = ['gocept'],
+ install_requires = ['zc.buildout', 'setuptools'],
+ )
Modified: gocept.zeoraid/trunk/src/gocept/__init__.py
==============================================================================
--- gocept.zeoraid/trunk/src/gocept/__init__.py (original)
+++ gocept.zeoraid/trunk/src/gocept/__init__.py Sat Feb 24 19:50:43 2007
(at)(at) -0,0 +1,6 (at)(at)
+# namespace package boilerplate
+try:
+ __import__('pkg_resources').declare_namespace(__name__)
+except ImportError, e:
+ from pkgutil import extend_path
+ __path__ = extend_path(__path__, __name__)
Modified: gocept.zeoraid/trunk/src/gocept/zeoraid/TODO.txt
==============================================================================
--- gocept.zeoraid/trunk/src/gocept/zeoraid/TODO.txt (original)
+++ gocept.zeoraid/trunk/src/gocept/zeoraid/TODO.txt Sat Feb 24 19:50:43 2007
(at)(at) -7,20 +7,6 (at)(at)
- Check edge cases for locking on all methods.
- - When synchronizing a storage after failure there might be transactions that
- happened after starting. We need to catch up with those. Locks might help
- here. We could also leverage putting a tpc_begin on one of the storages
- that we read from to avoid more transactions to get committed while
- replaying the last few transactions. This should only block for a few
- seconds.
-
- - When deleting a ZEO server and reconnecting it, the system is happy to keep
- writing to it. :/ We probably have to check that the last transaction is
- the expected one before each operation. (tpc_begin or so)
-
- - Sometimes, after a recovery, a Zope server sees tids that are getting
- smaller ...
-
- The second pass of the recovery isn't thread safe. Ensure that only one
recovery can run at a time. (This is probably a good idea anyway because of
IO load.)
(at)(at) -33,7 +19,7 (at)(at)
- Think about how to / whether to make packing work.
- - Think about how to do recover with the whole database and not just the
+ - Think about how to do recovery with the whole database and not just the
current object revisions. Currently we only recover the current state
(without any reference to versions) so undo becomes impossible to use after
a recovery.
(at)(at) -54,3 +40,5 (at)(at)
- Make manager script more like zopectl, provide recipe to talk to specific
RAID servers.
+
+ - Make buildout recipe an optional.
|
SVN: r4475 - in gocept.zeoraid/trunk: . 3rdparty src/gocept/zeoraid
Christian Theune <ct(at)gocept.com> |
2007-02-26 16:57:52 |
[ FULL ]
|
Author: ctheune
Date: Mon Feb 26 16:57:50 2007
New Revision: 4475
Modified:
gocept.zeoraid/trunk/3rdparty/ (props changed)
gocept.zeoraid/trunk/buildout.cfg
gocept.zeoraid/trunk/src/gocept/zeoraid/storage.py
Log:
- using ZODB from trunk
- small fixes from experimental/debugging changes
Modified: gocept.zeoraid/trunk/buildout.cfg
==============================================================================
--- gocept.zeoraid/trunk/buildout.cfg (original)
+++ gocept.zeoraid/trunk/buildout.cfg Mon Feb 26 16:57:50 2007
(at)(at) -1,5 +1,5 (at)(at)
[buildout]
-develop = .
+develop = . 3rdparty/ZODB
parts = test
[test]
Modified: gocept.zeoraid/trunk/src/gocept/zeoraid/storage.py
==============================================================================
--- gocept.zeoraid/trunk/src/gocept/zeoraid/storage.py (original)
+++ gocept.zeoraid/trunk/src/gocept/zeoraid/storage.py Mon Feb 26 16:57:50 2007
(at)(at) -125,7 +125,6 (at)(at)
def _apply_all_storages(self, method_name, *args, **kw):
results = []
for name in self.storages_optimal:
- time.sleep(0.01)
storage = self.storages[name]
try:
method = getattr(storage, method_name)
(at)(at) -133,10 +132,9 (at)(at)
except ZEO.ClientStorage.ClientDisconnected:
self._degrade_storage(name)
res = results[:]
- while res:
- test = res.pop()
+ for test1 in res:
for test2 in res:
- assert test == test2, "Results not consistent. Asynchronous
storage?"
+ assert test1 == test2, "Results not consistent. Asynchronous
storage?"
return results[0]
def isReadOnly(self):
(at)(at) -220,7 +218,7 (at)(at)
return self._apply_single_storage('undoLog', first, last, filter)
def undoInfo(self, first=0, last=-20, specification=None):
- return self._apply_all_storages('undoInfo', first, last,
+ return self._apply_single_storage('undoInfo', first, last,
specification)
def undo(self, transaction_id, transaction):
(at)(at) -231,7 +229,7 (at)(at)
self._lock_release()
def supportsTransactionalUndo(self):
- return False
+ return True
def pack(self, t, referencesf):
if self.isReadOnly():
|
|