[Zope-CVS] CVS: Products/ZopeVersionControl - nonversioned.py:1.4
Shane Hathaway
shane at zope.com
Tue Apr 20 19:04:04 EDT 2004
Update of /cvs-repository/Products/ZopeVersionControl
In directory cvs.zope.org:/tmp/cvs-serv16757
Modified Files:
nonversioned.py
Log Message:
References should be versioned, either.
=== Products/ZopeVersionControl/nonversioned.py 1.3 => 1.4 ===
--- Products/ZopeVersionControl/nonversioned.py:1.3 Fri Mar 12 16:12:11 2004
+++ Products/ZopeVersionControl/nonversioned.py Tue Apr 20 19:04:03 2004
@@ -25,11 +25,16 @@
try:
# Optional support for references.
from Products.References.Proxy import proxyBase
+ from Products.References.PathReference import PathReference
except ImportError:
- isProxy = None
+ isProxyOrReference = None
else:
- def isProxy(obj):
- return (proxyBase(obj) is not aq_base(obj))
+ def isProxyOrReference(obj):
+ if proxyBase(obj) is not aq_base(obj):
+ return 1
+ if isinstance(obj, PathReference):
+ return 1
+ return 0
def getNonVersionedDataAdapter(obj):
@@ -135,8 +140,8 @@
# This object should include the state of subobjects
# that won't be versioned independently.
continue
- if isProxy is not None:
- if isProxy(value):
+ if isProxyOrReference is not None:
+ if isProxyOrReference(value):
# This object should include the state of
# subobjects that are references.
continue
More information about the Zope-CVS
mailing list