[Zope-CVS] CVS: Products/ZopeVersionControl - Repository.py:1.12 Utility.py:1.4 VersionSupport.py:1.4

Ken Manheimer klm at zope.com
Tue Feb 24 14:25:14 EST 2004


Update of /cvs-repository/Products/ZopeVersionControl
In directory cvs.zope.org:/tmp/cvs-serv22563

Modified Files:
	Repository.py Utility.py VersionSupport.py 
Log Message:
Moved isAVersionableResource() to Utility.py so it can be used in
Repository.py and VersionSupport.py without mutual imports.


=== Products/ZopeVersionControl/Repository.py 1.11 => 1.12 ===
--- Products/ZopeVersionControl/Repository.py:1.11	Tue Feb 24 13:32:54 2004
+++ Products/ZopeVersionControl/Repository.py	Tue Feb 24 14:25:13 2004
@@ -20,7 +20,7 @@
 from Globals import InitializeClass, Persistent
 from AccessControl import ClassSecurityInfo
 from Utility import use_vc_permission, _findPath
-from Utility import VersionControlError, VersionInfo
+from Utility import isAVersionableResource, VersionControlError, VersionInfo
 from DateTime.DateTime import DateTime
 from BTrees.OOBTree import OOBTree
 from BTrees.OIBTree import OIBTree
@@ -29,16 +29,6 @@
 import Utility
 from nonversioned import getNonVersionedData, restoreNonVersionedData
 
-
-def isAVersionableResource(obj):
-    """ True if an object is versionable.
-
-    To qualify, the object must be persistent (have its own db record), and
-    must not have an true attribute named '__non_versionable__'."""
-
-    if getattr(obj, '__non_versionable__', 0):
-        return 0
-    return hasattr(obj, '_p_oid')
 
 class Repository(Implicit, Persistent):
     """The repository implementation manages the actual data of versions


=== Products/ZopeVersionControl/Utility.py 1.3 => 1.4 ===
--- Products/ZopeVersionControl/Utility.py:1.3	Tue Jan 21 16:47:12 2003
+++ Products/ZopeVersionControl/Utility.py	Tue Feb 24 14:25:13 2004
@@ -26,6 +26,16 @@
 use_vc_permission = 'Use version control'
 
 
+def isAVersionableResource(obj):
+    """ True if an object is versionable.
+
+    To qualify, the object must be persistent (have its own db record), and
+    must not have an true attribute named '__non_versionable__'."""
+
+    if getattr(obj, '__non_versionable__', 0):
+        return 0
+    return hasattr(obj, '_p_oid')
+
 class VersionInfo(Persistent):
     """A VersionInfo object contains bookkeeping information for version
        controlled objects. The bookkeeping information can be read (but


=== Products/ZopeVersionControl/VersionSupport.py 1.3 => 1.4 ===
--- Products/ZopeVersionControl/VersionSupport.py:1.3	Tue Feb 24 13:33:47 2004
+++ Products/ZopeVersionControl/VersionSupport.py	Tue Feb 24 14:25:13 2004
@@ -15,9 +15,8 @@
 
 import ExtensionClass, AccessControl, Acquisition
 from Globals import DTMLFile, InitializeClass
-from Utility import VersionControlError
+from Utility import VersionControlError, isAVersionableResource
 from Utility import use_vc_permission
-from Repository import isAVersionableResource
 
 
 class VersionSupport(ExtensionClass.Base):




More information about the Zope-CVS mailing list