Merge lp:~thumper/launchpad/move-code-events into lp:launchpad

Proposed by Tim Penhey
Status: Merged
Approved by: Tim Penhey
Approved revision: no longer in the source branch.
Merged at revision: 10541
Proposed branch: lp:~thumper/launchpad/move-code-events
Merge into: lp:launchpad
Diff against target: 144 lines (+43/-30)
4 files modified
lib/canonical/launchpad/event/interfaces.py (+0/-23)
lib/lp/code/configure.zcml (+6/-6)
lib/lp/code/event/branchmergeproposal.py (+1/-1)
lib/lp/code/interfaces/event.py (+36/-0)
To merge this branch: bzr merge lp:~thumper/launchpad/move-code-events
Reviewer Review Type Date Requested Status
Stuart Bishop (community) Approve
Review via email: mp+21535@code.launchpad.net

Commit message

Move lp-code event interfaces into lp.code.interfaces.event.

Description of the change

A simple branch that just moves four interfaces into lp.code.interfaces.

To post a comment you must log in.
Revision history for this message
Stuart Bishop (stub) wrote :

Fine

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/canonical/launchpad/event/interfaces.py'
--- lib/canonical/launchpad/event/interfaces.py 2009-06-25 05:30:52 +0000
+++ lib/canonical/launchpad/event/interfaces.py 2010-03-17 08:05:41 +0000
@@ -5,13 +5,9 @@
55
6__metaclass__ = type6__metaclass__ = type
7__all__ = [7__all__ = [
8 'IBranchMergeProposalStatusChangeEvent',
9 'IJoinTeamEvent',8 'IJoinTeamEvent',
10 'IKarmaAssignedEvent',9 'IKarmaAssignedEvent',
11 'IMessageHeldEvent',10 'IMessageHeldEvent',
12 'INewBranchMergeProposalEvent',
13 'INewCodeReviewCommentEvent',
14 'IReviewerNominatedEvent',
15 'ITeamInvitationEvent',11 'ITeamInvitationEvent',
16 ]12 ]
1713
@@ -45,22 +41,3 @@
4541
46 mailing_list = Attribute('The mailing list the message is held for.')42 mailing_list = Attribute('The mailing list the message is held for.')
47 message_id = Attribute('The Message-ID of the held message.')43 message_id = Attribute('The Message-ID of the held message.')
48
49
50class IBranchMergeProposalStatusChangeEvent(IObjectEvent):
51 """A merge proposal has changed state."""
52 user = Attribute("The user who updated the proposal.")
53 from_state = Attribute("The previous queue_status.")
54 to_state = Attribute("The updated queue_status.")
55
56
57class INewBranchMergeProposalEvent(IObjectEvent):
58 """A new merge has been proposed."""
59
60
61class IReviewerNominatedEvent(IObjectEvent):
62 """A reviewer has been nominated."""
63
64
65class INewCodeReviewCommentEvent(IObjectEvent):
66 """A new comment has been added to the merge proposal."""
6744
=== modified file 'lib/lp/code/configure.zcml'
--- lib/lp/code/configure.zcml 2010-03-05 20:00:56 +0000
+++ lib/lp/code/configure.zcml 2010-03-17 08:05:41 +0000
@@ -37,7 +37,7 @@
37 </class>37 </class>
38 <subscriber38 <subscriber
39 for="lp.code.interfaces.codereviewvote.ICodeReviewVoteReference39 for="lp.code.interfaces.codereviewvote.ICodeReviewVoteReference
40 canonical.launchpad.event.interfaces.IReviewerNominatedEvent"40 lp.code.interfaces.event.IReviewerNominatedEvent"
41 handler="lp.code.mail.branchmergeproposal.send_review_requested_notifications"/>41 handler="lp.code.mail.branchmergeproposal.send_review_requested_notifications"/>
4242
43 <!-- CodeImportMachine -->43 <!-- CodeImportMachine -->
@@ -279,7 +279,7 @@
279 </class>279 </class>
280 <subscriber280 <subscriber
281 for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal281 for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal
282 canonical.launchpad.event.interfaces.INewBranchMergeProposalEvent"282 lp.code.interfaces.event.INewBranchMergeProposalEvent"
283 handler="lp.code.mail.branchmergeproposal.send_merge_proposal_created_notifications"/>283 handler="lp.code.mail.branchmergeproposal.send_merge_proposal_created_notifications"/>
284 <subscriber284 <subscriber
285 for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal285 for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal
@@ -287,11 +287,11 @@
287 handler="lp.code.mail.branchmergeproposal.send_merge_proposal_modified_notifications"/>287 handler="lp.code.mail.branchmergeproposal.send_merge_proposal_modified_notifications"/>
288 <subscriber288 <subscriber
289 for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal289 for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal
290 canonical.launchpad.event.interfaces.INewBranchMergeProposalEvent"290 lp.code.interfaces.event.INewBranchMergeProposalEvent"
291 handler="canonical.launchpad.subscribers.karma.branch_merge_proposed"/>291 handler="canonical.launchpad.subscribers.karma.branch_merge_proposed"/>
292 <subscriber292 <subscriber
293 for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal293 for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal
294 canonical.launchpad.event.interfaces.IBranchMergeProposalStatusChangeEvent"294 lp.code.interfaces.event.IBranchMergeProposalStatusChangeEvent"
295 handler="canonical.launchpad.subscribers.karma.branch_merge_status_changed"/>295 handler="canonical.launchpad.subscribers.karma.branch_merge_status_changed"/>
296 <adapter296 <adapter
297 for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal"297 for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal"
@@ -701,11 +701,11 @@
701 </class>701 </class>
702 <subscriber702 <subscriber
703 for="lp.code.interfaces.codereviewcomment.ICodeReviewComment703 for="lp.code.interfaces.codereviewcomment.ICodeReviewComment
704 canonical.launchpad.event.interfaces.INewCodeReviewCommentEvent"704 lp.code.interfaces.event.INewCodeReviewCommentEvent"
705 handler="lp.code.mail.codereviewcomment.send"/>705 handler="lp.code.mail.codereviewcomment.send"/>
706 <subscriber706 <subscriber
707 for="lp.code.interfaces.codereviewcomment.ICodeReviewComment707 for="lp.code.interfaces.codereviewcomment.ICodeReviewComment
708 canonical.launchpad.event.interfaces.INewCodeReviewCommentEvent"708 lp.code.interfaces.event.INewCodeReviewCommentEvent"
709 handler="canonical.launchpad.subscribers.karma.code_review_comment_added"/>709 handler="canonical.launchpad.subscribers.karma.code_review_comment_added"/>
710 <adapter710 <adapter
711 for="lp.code.interfaces.codereviewcomment.ICodeReviewComment"711 for="lp.code.interfaces.codereviewcomment.ICodeReviewComment"
712712
=== modified file 'lib/lp/code/event/branchmergeproposal.py'
--- lib/lp/code/event/branchmergeproposal.py 2009-06-25 04:06:00 +0000
+++ lib/lp/code/event/branchmergeproposal.py 2010-03-17 08:05:41 +0000
@@ -16,7 +16,7 @@
16from zope.component.interfaces import ObjectEvent16from zope.component.interfaces import ObjectEvent
17from zope.interface import implements17from zope.interface import implements
1818
19from canonical.launchpad.event.interfaces import (19from lp.code.interfaces.event import (
20 IBranchMergeProposalStatusChangeEvent,20 IBranchMergeProposalStatusChangeEvent,
21 INewBranchMergeProposalEvent,21 INewBranchMergeProposalEvent,
22 INewCodeReviewCommentEvent,22 INewCodeReviewCommentEvent,
2323
=== added file 'lib/lp/code/interfaces/event.py'
--- lib/lp/code/interfaces/event.py 1970-01-01 00:00:00 +0000
+++ lib/lp/code/interfaces/event.py 2010-03-17 08:05:41 +0000
@@ -0,0 +1,36 @@
1# Copyright 2010 Canonical Ltd. This software is licensed under the
2# GNU Affero General Public License version 3 (see the file LICENSE).
3
4"""Interfaces for events used in the launchpad code application."""
5
6__metaclass__ = type
7__all__ = [
8 'IBranchMergeProposalStatusChangeEvent',
9 'INewBranchMergeProposalEvent',
10 'INewCodeReviewCommentEvent',
11 'IReviewerNominatedEvent',
12 ]
13
14
15from zope.component.interfaces import IObjectEvent
16from zope.interface import Attribute
17
18
19class IBranchMergeProposalStatusChangeEvent(IObjectEvent):
20 """A merge proposal has changed state."""
21
22 user = Attribute("The user who updated the proposal.")
23 from_state = Attribute("The previous queue_status.")
24 to_state = Attribute("The updated queue_status.")
25
26
27class INewBranchMergeProposalEvent(IObjectEvent):
28 """A new merge has been proposed."""
29
30
31class IReviewerNominatedEvent(IObjectEvent):
32 """A reviewer has been nominated."""
33
34
35class INewCodeReviewCommentEvent(IObjectEvent):
36 """A new comment has been added to the merge proposal."""