[CMF-checkins] CVS: CMF/DCWorkflow/doc/examples/staging - checkin.py:1.1 checkout.py:1.1 retractStages.py:1.1 updateProductionStage.py:1.1 updateReviewStage.py:1.1
Shane Hathaway
shane@cvs.zope.org
Tue, 9 Jul 2002 12:25:05 -0400
Update of /cvs-repository/CMF/DCWorkflow/doc/examples/staging
In directory cvs.zope.org:/tmp/cvs-serv5261
Added Files:
checkin.py checkout.py retractStages.py
updateProductionStage.py updateReviewStage.py
Log Message:
Added some example scripts for staging. (They require the CMFStaging product.)
=== Added File CMF/DCWorkflow/doc/examples/staging/checkin.py ===
## Script (Python) "checkin"
##parameters=sci
# Check in the object to a Zope version repository, disallowing changes.
object = sci.object
vt = object.portal_versions
if vt.isCheckedOut(object):
vt.checkin(object, sci.kwargs.get('comment', ''))
=== Added File CMF/DCWorkflow/doc/examples/staging/checkout.py ===
## Script (Python) "checkout"
##parameters=sci
# Check out the object from a repository, allowing changes.
#
# For workflows that control staging, it makes sense to call this script
# before all transitions.
object = sci.object
vt = object.portal_versions
if not vt.isCheckedOut(object):
vt.checkout(object)
=== Added File CMF/DCWorkflow/doc/examples/staging/retractStages.py ===
## Script (Python) "retractStages"
##parameters=sci
# Remove the object from the given stages.
object = sci.object
st = object.portal_staging
st.removeStages(object, ['review', 'prod'])
=== Added File CMF/DCWorkflow/doc/examples/staging/updateProductionStage.py ===
## Script (Python) "updateProductionStage"
##parameters=sci
# Copy the object in development to review and production.
object = sci.object
st = object.portal_staging
st.updateStages(object, 'dev', ['review', 'prod'],
sci.kwargs.get('comment', ''))
=== Added File CMF/DCWorkflow/doc/examples/staging/updateReviewStage.py ===
## Script (Python) "updateReviewStage"
##parameters=sci
# Copy the object in development to review.
object = sci.object
st = object.portal_staging
st.updateStages(object, 'dev', ['review'],
sci.kwargs.get('comment', ''))