[Zope-CVS] CVS: Products/ZopeVersionControl - IVersionControl.py:1.5 Repository.py:1.9

Grégoire Weber zope.org at incept.ch
Mon Jan 19 15:33:00 EST 2004


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

Modified Files:
	IVersionControl.py Repository.py 
Log Message:
added an optional message argument to the applyVersionControl() method; the change is backwards compatible


=== Products/ZopeVersionControl/IVersionControl.py 1.4 => 1.5 ===
--- Products/ZopeVersionControl/IVersionControl.py:1.4	Tue May 13 18:12:31 2003
+++ Products/ZopeVersionControl/IVersionControl.py	Mon Jan 19 15:32:59 2004
@@ -78,13 +78,16 @@
         Permission: public
         """
 
-    def applyVersionControl(object):
+    def applyVersionControl(object, message=None):
         """
         Place the given object under version control. A VersionControlError
         will be raised if the object is already under version control.
 
         After being placed under version control, the resource is logically
         in the 'checked-in' state.
+
+        If no message is passed the 'Initial checkin.' message string is 
+        written as the message log entry.
 
         Permission: Use version control
         """


=== Products/ZopeVersionControl/Repository.py 1.8 => 1.9 ===
--- Products/ZopeVersionControl/Repository.py:1.8	Thu Nov 13 18:09:06 2003
+++ Products/ZopeVersionControl/Repository.py	Mon Jan 19 15:32:59 2004
@@ -141,7 +141,7 @@
             )
 
     security.declareProtected(use_vc_permission, 'applyVersionControl')
-    def applyVersionControl(self, object):
+    def applyVersionControl(self, object, message=None):
         if self.isUnderVersionControl(object):
             raise VersionControlError(
                 'The resource is already under version control.'
@@ -179,7 +179,7 @@
         history.addLogEntry(version_id,
                             LogEntry.ACTION_CHECKIN,
                             _findPath(object),
-                            'Initial checkin.'
+                            message is None and 'Initial checkin.' or message
                             )
         return object
 




More information about the Zope-CVS mailing list