[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/versioncontrol/
Added documentation for the info attribute of version events.
Jim Fulton
jim at zope.com
Wed Jul 6 12:07:49 EDT 2005
Log message for revision 31020:
Added documentation for the info attribute of version events.
Added a message attribute to check-in events.
Changed:
U Zope3/trunk/src/zope/app/versioncontrol/event.py
U Zope3/trunk/src/zope/app/versioncontrol/interfaces.py
U Zope3/trunk/src/zope/app/versioncontrol/repository.py
-=-
Modified: Zope3/trunk/src/zope/app/versioncontrol/event.py
===================================================================
--- Zope3/trunk/src/zope/app/versioncontrol/event.py 2005-07-06 01:59:09 UTC (rev 31019)
+++ Zope3/trunk/src/zope/app/versioncontrol/event.py 2005-07-06 16:07:43 UTC (rev 31020)
@@ -47,6 +47,10 @@
zope.interface.implements(
zope.app.versioncontrol.interfaces.IVersionCheckedIn)
+ def __init__(self, object, info, message):
+ super(VersionCheckedIn, self).__init__(object, info)
+ self.message = message
+
def __str__(self):
return "checked in %s, version %s" % (
self.object, self.info.version_id)
Modified: Zope3/trunk/src/zope/app/versioncontrol/interfaces.py
===================================================================
--- Zope3/trunk/src/zope/app/versioncontrol/interfaces.py 2005-07-06 01:59:09 UTC (rev 31019)
+++ Zope3/trunk/src/zope/app/versioncontrol/interfaces.py 2005-07-06 16:07:43 UTC (rev 31020)
@@ -307,6 +307,8 @@
class IVersionEvent(zope.app.event.interfaces.IObjectEvent):
"""Base interface for all version-control events."""
+ info = zope.interface.Attribute("Version info (IVersionInfo)")
+
class IVersionControlApplied(IVersionEvent):
"""Event fired when version control is initially applied to an object."""
@@ -323,6 +325,9 @@
class IVersionCheckedIn(IVersionEvent):
"""Event fired when an object is checked in."""
+ message = zope.schema.Text(
+ title=_("Checkin Message"),
+ )
class IVersionCheckedOut(IVersionEvent):
"""Event fired when an object is checked out."""
Modified: Zope3/trunk/src/zope/app/versioncontrol/repository.py
===================================================================
--- Zope3/trunk/src/zope/app/versioncontrol/repository.py 2005-07-06 01:59:09 UTC (rev 31019)
+++ Zope3/trunk/src/zope/app/versioncontrol/repository.py 2005-07-06 16:07:43 UTC (rev 31020)
@@ -273,7 +273,7 @@
info.status = CHECKED_IN
info.touch()
- zope.event.notify(event.VersionCheckedIn(object, info))
+ zope.event.notify(event.VersionCheckedIn(object, info, message))
def uncheckoutResource(self, object):
info = self.getVersionInfo(object)
More information about the Zope3-Checkins
mailing list