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

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


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

Modified Files:
	VersionsTool.py 
Log Message:
Added getVersionIds call.


=== CMF/CMFStaging/VersionsTool.py 1.9 => 1.10 ===
--- CMF/CMFStaging/VersionsTool.py:1.9	Wed Feb 19 16:13:12 2003
+++ CMF/CMFStaging/VersionsTool.py	Wed Feb 19 16:33:32 2003
@@ -187,6 +187,15 @@
         else:
             return ''
 
+    security.declareProtected(UseVersionControl, 'getVersionIds')
+    def getVersionIds(self, object):
+        """Return the available version ids for an object."""
+        # yuck :(
+        repo = self._getVersionRepository()
+        ids = repo.getVersionIds(object)
+        ids = map(int, ids)
+        ids.sort()
+        return map(str, ids)
 
     security.declareProtected(UseVersionControl, 'getHistoryId')
     def getHistoryId(self, object):