[Zope-CVS] SVN: zversioning/trunk/src/versioning/ made the
SimpleHistoryStorage implement IAnnotatable directly
Grégoire Weber
zope.org at incept.ch
Thu Oct 14 04:57:46 EDT 2004
Log message for revision 28149:
made the SimpleHistoryStorage implement IAnnotatable directly
Changed:
U zversioning/trunk/src/versioning/README.txt
U zversioning/trunk/src/versioning/storage.py
-=-
Modified: zversioning/trunk/src/versioning/README.txt
===================================================================
--- zversioning/trunk/src/versioning/README.txt 2004-10-14 08:48:45 UTC (rev 28148)
+++ zversioning/trunk/src/versioning/README.txt 2004-10-14 08:57:45 UTC (rev 28149)
@@ -48,7 +48,6 @@
|--> c
>>> import zope.app.versioncontrol.interfaces
- >>> from zope.app.annotation.interfaces import IAnnotatable
>>> from zope.interface import directlyProvides
>>> from zope.app.folder import Folder, rootFolder
>>> from zope.app.tests.setup import setUpTraversal
@@ -81,8 +80,8 @@
>>> util.commit()
-Setting up a Repository
------------------------
+Setting up a ICheckoutCheckinRepository
+---------------------------------------
In this architecture we can choose between several repositories. We take a
CopyModifyMergeRepository without check in and check out as an example.
@@ -118,10 +117,6 @@
... interfaces.ICheckoutAware,
... storage.DefaultCheckoutAware)
-Our 'ICheckoutAware' adapter XXX
-
- >>> directlyProvides(histories_storage, IAnnotatable)
-
In this implementation the repository is simply a adapter to a
'IHistoryStorage'. This ensures that several versioning strategies
can be used with the same storage:
@@ -136,8 +131,8 @@
>>> repo = interfaces.ICopyModifyMergeRepository(histories_storage)
-Use the CheckoutCheckinRepository
----------------------------------
+Useing the ICheckoutCheckinRepository
+-------------------------------------
An object that isn't 'IVersionable' can't be put under version control.
Applying version control should raise an exception:
Modified: zversioning/trunk/src/versioning/storage.py
===================================================================
--- zversioning/trunk/src/versioning/storage.py 2004-10-14 08:48:45 UTC (rev 28148)
+++ zversioning/trunk/src/versioning/storage.py 2004-10-14 08:57:45 UTC (rev 28149)
@@ -18,6 +18,7 @@
from zope.interface import implements
from persistent.dict import PersistentDict
from zope.app.folder import Folder
+from zope.app.annotation.interfaces import IAnnotatable
from zope.app.exception.interfaces import UserError
from zope.app.copypastemove.interfaces import IObjectCopier
from zope.app.container.interfaces import INameChooser
@@ -71,7 +72,7 @@
"""
- implements(IHistoryStorage)
+ implements(IHistoryStorage, IAnnotatable)
def register(self, obj):
""" Register an obj for version control.
More information about the Zope-CVS
mailing list