[Zope-Checkins] SVN: Zope/trunk/lib/python/Products/BTreeFolder2/ added BTreeFolder2

2005-04-25 Thread Andreas Jung
Log message for revision 30156:
  added BTreeFolder2
  

Changed:
  A   Zope/trunk/lib/python/Products/BTreeFolder2/
  A   Zope/trunk/lib/python/Products/BTreeFolder2/BTreeFolder2.py
  A   Zope/trunk/lib/python/Products/BTreeFolder2/BTreeFolder2.pyc
  A   Zope/trunk/lib/python/Products/BTreeFolder2/CHANGES.txt
  A   Zope/trunk/lib/python/Products/BTreeFolder2/CMFBTreeFolder.py
  A   Zope/trunk/lib/python/Products/BTreeFolder2/README.txt
  A   Zope/trunk/lib/python/Products/BTreeFolder2/__init__.py
  A   Zope/trunk/lib/python/Products/BTreeFolder2/__init__.pyc
  A   Zope/trunk/lib/python/Products/BTreeFolder2/btreefolder2.gif
  A   Zope/trunk/lib/python/Products/BTreeFolder2/contents.dtml
  A   Zope/trunk/lib/python/Products/BTreeFolder2/folderAdd.dtml
  A   Zope/trunk/lib/python/Products/BTreeFolder2/tests/
  A   Zope/trunk/lib/python/Products/BTreeFolder2/tests/__init__.py
  A   Zope/trunk/lib/python/Products/BTreeFolder2/tests/__init__.pyc
  A   Zope/trunk/lib/python/Products/BTreeFolder2/tests/testBTreeFolder2.py
  A   Zope/trunk/lib/python/Products/BTreeFolder2/tests/testBTreeFolder2.pyc
  A   Zope/trunk/lib/python/Products/BTreeFolder2/version.txt

-=-
Added: Zope/trunk/lib/python/Products/BTreeFolder2/BTreeFolder2.py
===
--- Zope/trunk/lib/python/Products/BTreeFolder2/BTreeFolder2.py 2005-04-25 
10:01:22 UTC (rev 30155)
+++ Zope/trunk/lib/python/Products/BTreeFolder2/BTreeFolder2.py 2005-04-25 
13:29:39 UTC (rev 30156)
@@ -0,0 +1,514 @@
+##
+#
+# 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
+#
+##
+"""BTreeFolder2
+
+$Id: BTreeFolder2.py,v 1.27 2004/03/17 22:49:25 urbanape Exp $
+"""
+
+import sys
+from cgi import escape
+from urllib import quote
+from random import randint
+from types import StringType
+
+import Globals
+from Globals import DTMLFile
+from Globals import Persistent
+from Acquisition import aq_base
+from BTrees.OOBTree import OOBTree
+from BTrees.OIBTree import OIBTree, union
+from BTrees.Length import Length
+from ZODB.POSException import ConflictError
+from OFS.ObjectManager import BadRequestException, BeforeDeleteException
+from OFS.Folder import Folder
+from AccessControl import getSecurityManager, ClassSecurityInfo
+from AccessControl.Permissions import access_contents_information, \
+ view_management_screens
+from zLOG import LOG, INFO, ERROR, WARNING
+from Products.ZCatalog.Lazy import LazyMap
+
+
+manage_addBTreeFolderForm = DTMLFile('folderAdd', globals())
+
+def manage_addBTreeFolder(dispatcher, id, title='', REQUEST=None):
+"""Adds a new BTreeFolder object with id *id*.
+"""
+id = str(id)
+ob = BTreeFolder2(id)
+ob.title = str(title)
+dispatcher._setObject(id, ob)
+ob = dispatcher._getOb(id)
+if REQUEST is not None:
+return dispatcher.manage_main(dispatcher, REQUEST, update_menu=1)
+
+
+listtext0 = '''
+'''
+listtext1 = '''%s
+'''
+listtext2 = '''
+'''
+
+
+_marker = []  # Create a new marker object.
+
+MAX_UNIQUEID_ATTEMPTS = 1000
+
+class ExhaustedUniqueIdsError (Exception):
+pass
+
+
+class BTreeFolder2Base (Persistent):
+"""Base for BTree-based folders.
+"""
+
+security = ClassSecurityInfo()
+
+manage_options=(
+({'label':'Contents', 'action':'manage_main',},
+ ) + Folder.manage_options[1:]
+)
+
+security.declareProtected(view_management_screens,
+  'manage_main')
+manage_main = DTMLFile('contents', globals())
+
+_tree = None  # OOBTree: { id -> object }
+_count = None # A BTrees.Length
+_v_nextid = 0 # The integer component of the next generated ID
+_mt_index = None  # OOBTree: { meta_type -> OIBTree: { id -> 1 } }
+title = ''
+
+
+def __init__(self, id=None):
+if id is not None:
+self.id = id
+self._initBTrees()
+
+def _initBTrees(self):
+self._tree = OOBTree()
+self._count = Length()
+self._mt_index = OOBTree()
+
+
+def _populateFromFolder(self, source):
+"""Fill this folder with the contents of another folder.
+"""
+for name in source.objectIds():
+value = source._getOb(name, None)
+if value is not None:
+self._setOb(name, aq_base(value))
+
+
+security.declareProtected(view_management_screens, 'manage_fixCount')
+def manage_fixCount(se

[Zope-Checkins] SVN: Zope/trunk/lib/python/Products/BTreeFolder2/ removed *.pyc files

2005-04-25 Thread Andreas Jung
Log message for revision 30157:
  removed *.pyc files
  

Changed:
  D   Zope/trunk/lib/python/Products/BTreeFolder2/BTreeFolder2.pyc
  D   Zope/trunk/lib/python/Products/BTreeFolder2/__init__.pyc
  D   Zope/trunk/lib/python/Products/BTreeFolder2/tests/__init__.pyc
  D   Zope/trunk/lib/python/Products/BTreeFolder2/tests/testBTreeFolder2.pyc

-=-
Deleted: Zope/trunk/lib/python/Products/BTreeFolder2/BTreeFolder2.pyc
===
(Binary files differ)

Deleted: Zope/trunk/lib/python/Products/BTreeFolder2/__init__.pyc
===
(Binary files differ)

Deleted: Zope/trunk/lib/python/Products/BTreeFolder2/tests/__init__.pyc
===
(Binary files differ)

Deleted: Zope/trunk/lib/python/Products/BTreeFolder2/tests/testBTreeFolder2.pyc
===
(Binary files differ)

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/trunk/doc/CHANGES.txt added BTreeFolder2

2005-04-25 Thread Andreas Jung
Log message for revision 30158:
  added BTreeFolder2
  

Changed:
  U   Zope/trunk/doc/CHANGES.txt

-=-
Modified: Zope/trunk/doc/CHANGES.txt
===
--- Zope/trunk/doc/CHANGES.txt  2005-04-25 13:30:07 UTC (rev 30157)
+++ Zope/trunk/doc/CHANGES.txt  2005-04-25 13:30:42 UTC (rev 30158)
@@ -22,9 +22,17 @@
 
- Port ZOPE_CONFIG patch from Zope 2.7 to Zope 2.8
 
-   - Including BTreeFolder2 with beta 2
 
+  after Zope 2.8b1 
 
+Features added
+
+  - Included BTreeFolder2
+
+Bugs fixed
+  
+
+
   Zope 2.8b1 (2005/04/24)
 
 Features added

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/trunk/ Move to ZODB 3.4a5, which fixes some problems in the new savepoint features.

2005-04-25 Thread Tim Peters
Log message for revision 30171:
  Move to ZODB 3.4a5, which fixes some problems in the new savepoint features.
  

Changed:
  _U  Zope/trunk/lib/python/
  _U  Zope/trunk/utilities/

-=-

Property changes on: Zope/trunk/lib/python
___
Name: svn:externals
   - zope   
svn://svn.zope.org/repos/main/Zope3/tags/ZopeX3-3.0.0-Zope-2.8-a3/src/zope
BTrees svn://svn.zope.org/repos/main/ZODB/tags/3.4.0a4/src/BTrees
Persistencesvn://svn.zope.org/repos/main/ZODB/tags/3.4.0a4/src/Persistence
persistent svn://svn.zope.org/repos/main/ZODB/tags/3.4.0a4/src/persistent
ThreadedAsync  svn://svn.zope.org/repos/main/ZODB/tags/3.4.0a4/src/ThreadedAsync
transactionsvn://svn.zope.org/repos/main/ZODB/tags/3.4.0a4/src/transaction
ZEOsvn://svn.zope.org/repos/main/ZODB/tags/3.4.0a4/src/ZEO
ZODB   svn://svn.zope.org/repos/main/ZODB/tags/3.4.0a4/src/ZODB
ZopeUndo   svn://svn.zope.org/repos/main/ZODB/tags/3.4.0a4/src/ZopeUndo

   + zope   
svn://svn.zope.org/repos/main/Zope3/tags/ZopeX3-3.0.0-Zope-2.8-a3/src/zope
BTrees svn://svn.zope.org/repos/main/ZODB/tags/3.4.0a5/src/BTrees
Persistencesvn://svn.zope.org/repos/main/ZODB/tags/3.4.0a5/src/Persistence
persistent svn://svn.zope.org/repos/main/ZODB/tags/3.4.0a5/src/persistent
ThreadedAsync  svn://svn.zope.org/repos/main/ZODB/tags/3.4.0a5/src/ThreadedAsync
transactionsvn://svn.zope.org/repos/main/ZODB/tags/3.4.0a5/src/transaction
ZEOsvn://svn.zope.org/repos/main/ZODB/tags/3.4.0a5/src/ZEO
ZODB   svn://svn.zope.org/repos/main/ZODB/tags/3.4.0a5/src/ZODB
ZopeUndo   svn://svn.zope.org/repos/main/ZODB/tags/3.4.0a5/src/ZopeUndo



Property changes on: Zope/trunk/utilities
___
Name: svn:externals
   - ZODBTools  svn://svn.zope.org/repos/main/ZODB/tags/3.4.0a4/src/scripts

   + ZODBTools  svn://svn.zope.org/repos/main/ZODB/tags/3.4.0a5/src/scripts


___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins