[Zope-CVS] SVN: zversioning/trunk/src/versioning/ removed unique id utility call. Must be fixed later on

Uwe Oestermeier uwe_oestermeier at iwm-kmrc.de
Thu Oct 14 09:24:11 EDT 2004


Log message for revision 28177:
  removed unique id utility call. Must be fixed later on

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 13:20:28 UTC (rev 28176)
+++ zversioning/trunk/src/versioning/README.txt	2004-10-14 13:24:09 UTC (rev 28177)
@@ -2,6 +2,7 @@
 Versioning
 ==========
 
+
 Versioning means different things to different people and there is no common optimal 
 solution for all the problems that are related to the history of evolving data.
 Therefore we want to provide a flexible framework that is pluggable in its
@@ -41,17 +42,28 @@
         to ensure that the changing versions can be accessed later on. 
         We use the abstract term ticket to describe the fact that different
         storages use quite different reference schemes, e.g. global unique ids,
-        paths and revision numbers, python pointers, the _p_oid in the ZODB etc.
+        paths and revision numbers like SVN, python references in the ZODB etc.
         to retrieve and access parts of the history of an object.
         
-    2.  IVersionableAspects. 
+        In the long run we want to be able to plug in
+        other versioning systems like Subversion or relational databases as
+        other backends.
+        
+        
+    2.  IVersionableAspects. A plugin for the replication process that determines
+        what is versioned and how it stored. This is implemented as multiadapter
+        from IVersionable to IHistoriesStorage because only the combination
+        of both is able to determine what is stored in which way.
     
    
-    3.  INameChooser.
+    3.  INameChooser. A plugin for different labelling schemes, e.g. version 1, 
+        version 2, ... vs. v1.0, v1.1, v.1.1.1 etc.
     
     
-    4.  ICheckoutAware.
-    
+    4.  ICheckoutAware. A plugin that adds the ability to mark items as checked out
+        to data storages that do not provide this functionality themselves.    
+
+
     XXX
     
     5.  IMergeStrategies 
@@ -233,11 +245,13 @@
   >>> sample.text
   'text version 2 of sample'
 
+
   #>>> repo.revertToVersion(sample, u'001')
   #>>> db_root['sample'].text
   'text version 1 of sample'
   #>>> sample.text
   'text version 1 of sample'
+
   
   >>> len(repo.listVersions(sample))
   2

Modified: zversioning/trunk/src/versioning/storage.py
===================================================================
--- zversioning/trunk/src/versioning/storage.py	2004-10-14 13:20:28 UTC (rev 28176)
+++ zversioning/trunk/src/versioning/storage.py	2004-10-14 13:24:09 UTC (rev 28177)
@@ -91,7 +91,6 @@
     
     implements(IHistoryStorage, IAnnotatable)
     
-    
     def __init__(self) :
         super(SimpleHistoryStorage, self).__init__()
         self.unique_ids = zapi.getUtility(IUniqueIdUtility)
@@ -109,6 +108,11 @@
         """ Returns a unique id of an object as
             a ticket that remains stable across time.
         """
+        if obj._p_oid is None :
+            raise RuntimeError("cannot version uncommited object")
+        return unicode(obj._p_oid).encode("iso-8859-1")
+        
+        # XXX unique id utility is broken
         return str(self.unique_ids.register(obj))
     
   



More information about the Zope-CVS mailing list