[CMF-checkins] CVS: CMF/CMFStaging - VersionsTool.py:1.9

Brian Lloyd brian@zope.com
Wed, 19 Feb 2003 16:13:12 -0500


Update of /cvs-repository/CMF/CMFStaging
In directory cvs.zope.org:/tmp/cvs-serv11708

Modified Files:
	VersionsTool.py 
Log Message:
Added isResourceUpToDate method

=== CMF/CMFStaging/VersionsTool.py 1.8 => 1.9 ===
--- CMF/CMFStaging/VersionsTool.py:1.8	Mon Aug  5 12:14:16 2002
+++ CMF/CMFStaging/VersionsTool.py	Wed Feb 19 16:13:12 2003
@@ -195,6 +195,12 @@
         return repo.getVersionInfo(object).history_id
 
 
+    security.declareProtected(UseVersionControl, 'isResourceUpToDate')
+    def isResourceUpToDate(self, object, require_branch=0):
+        """Return true if a version-controlled resource is up to date."""
+        repo = self._getVersionRepository()
+        return repo.isResourceUpToDate(object, require_branch)
+
     security.declareProtected(UseVersionControl, 'revertToVersion')
     def revertToVersion(self, object, version_id):
         """Reverts the object to the given version.