Merge lp:~mars/tarmac/fix-needs-review-api-call into lp:~launchpad/tarmac/lp-tarmac

Proposed by Māris Fogels
Status: Merged
Approved by: Māris Fogels
Approved revision: 386
Merged at revision: 386
Proposed branch: lp:~mars/tarmac/fix-needs-review-api-call
Merge into: lp:~launchpad/tarmac/lp-tarmac
Diff against target: 128 lines (+12/-12)
7 files modified
docs/introduction.txt (+1/-1)
docs/writingplugins.txt (+1/-1)
tarmac/plugins/bundlecommand.py (+2/-2)
tarmac/plugins/tests/test_bundlecommand.py (+2/-2)
tarmac/tests/__init__.py (+1/-1)
tarmac/tests/mock.py (+1/-1)
tarmac/tests/test_commands.py (+4/-4)
To merge this branch: bzr merge lp:~mars/tarmac/fix-needs-review-api-call
Reviewer Review Type Date Requested Status
Māris Fogels (community) Approve
Review via email: mp+43863@code.launchpad.net

Commit message

Fix the bundle-merge command's ability to set the 'Needs review' MP status.

Description of the change

This branch fixes a bug in the tarmac merge command that incorrectly sets the "Needs review" proposal status through the API.

To post a comment you must log in.
Revision history for this message
Māris Fogels (mars) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'docs/introduction.txt'
2--- docs/introduction.txt 2010-10-26 00:59:55 +0000
3+++ docs/introduction.txt 2010-12-16 04:03:56 +0000
4@@ -151,7 +151,7 @@
5 The Command plugin takes the merged tree result and runs a command on that
6 tree. If the command fails, then it raises an exception that causes the merge
7 to be abandoned, a comment on the merge proposal to be added, and the merge
8-proposal set to "Needs Review" (so that Tarmac doesn't try to merge it in the
9+proposal set to "Needs review" (so that Tarmac doesn't try to merge it in the
10 next run). This command can be a script that runs tests, verifies certain
11 files aren't changed, a script that verifies a proper build, etc. In order to
12 use the Command plugin, your branch must have a ``verify_command`` option in
13
14=== modified file 'docs/writingplugins.txt'
15--- docs/writingplugins.txt 2010-09-17 21:57:28 +0000
16+++ docs/writingplugins.txt 2010-12-16 04:03:56 +0000
17@@ -105,7 +105,7 @@
18 typically a longer message describing the issue in more detail. This comment
19 will be posted to the merge proposal on Launchpad, to inform the developer
20 of what went wrong during the merge of their branch. The merge proposal will
21-also be set back to the ``Needs Review`` status, to avoid having tarmac
22+also be set back to the ``Needs review`` status, to avoid having tarmac
23 attempt to merge the branch again, without having the issues resolved. If
24 no ``comment`` argument is supplied, the ``message`` argument will be used
25 for the comment when posting to Launchpad, instead.
26
27=== modified file 'tarmac/plugins/bundlecommand.py'
28--- tarmac/plugins/bundlecommand.py 2010-12-14 14:44:33 +0000
29+++ tarmac/plugins/bundlecommand.py 2010-12-16 04:03:56 +0000
30@@ -186,7 +186,7 @@
31
32 In this case, the full failure is emailed to the proposal subscribers,
33 a summary of the test failure is posted as a comment and the
34- proposal is then set to "Needs Review" so that Tarmac doesn't attempt
35+ proposal is then set to "Needs review" so that Tarmac doesn't attempt
36 to merge it again without human interaction.
37 '''
38 # Make output into a Result object, and create a tgz of the
39@@ -241,7 +241,7 @@
40
41 proposal.createComment(subject=subject,
42 content=comment)
43- proposal.setStatus(status=u'Needs Review')
44+ proposal.setStatus(status=u'Needs review')
45 proposal.lp_save()
46
47 def get_subscribers_emails(self, proposal):
48
49=== modified file 'tarmac/plugins/tests/test_bundlecommand.py'
50--- tarmac/plugins/tests/test_bundlecommand.py 2010-12-14 14:44:33 +0000
51+++ tarmac/plugins/tests/test_bundlecommand.py 2010-12-16 04:03:56 +0000
52@@ -261,8 +261,8 @@
53
54 # Proposals status is updated.
55 proposal1, proposal2 = self.collected_proposals
56- self.assertEqual(proposal1[1].queue_status, "Needs Review")
57- self.assertEqual(proposal2[1].queue_status, "Needs Review")
58+ self.assertEqual(proposal1[1].queue_status, "Needs review")
59+ self.assertEqual(proposal2[1].queue_status, "Needs review")
60
61 def test_send_report_email(self):
62 """Test send_report_email()."""
63
64=== modified file 'tarmac/tests/__init__.py'
65--- tarmac/tests/__init__.py 2010-11-23 17:18:33 +0000
66+++ tarmac/tests/__init__.py 2010-12-16 04:03:56 +0000
67@@ -132,7 +132,7 @@
68
69 self.proposals = [Thing(
70 self_link=u'http://api.edge.launchpad.net/devel/proposal0',
71- queue_status=u'Needs Review',
72+ queue_status=u'Needs review',
73 commit_message=u'Commitable.',
74 source_branch=self.branches[0],
75 target_branch=self.branches[1],
76
77=== modified file 'tarmac/tests/mock.py'
78--- tarmac/tests/mock.py 2010-12-14 14:44:33 +0000
79+++ tarmac/tests/mock.py 2010-12-16 04:03:56 +0000
80@@ -71,7 +71,7 @@
81 def lp_save(self, *args, **kwargs):
82 pass
83
84- def setStatus(self, status="Needs Review"):
85+ def setStatus(self, status="Needs review"):
86 self.queue_status = status
87
88
89
90=== modified file 'tarmac/tests/test_commands.py'
91--- tarmac/tests/test_commands.py 2010-12-15 16:52:26 +0000
92+++ tarmac/tests/test_commands.py 2010-12-16 04:03:56 +0000
93@@ -176,7 +176,7 @@
94 # Set up an unapproved proposal for the prerequisite
95 b3_proposal = Thing(
96 self_link=u'http://api.edge.launchpad.net/devel/proposal3',
97- queue_status=u'Work in Progress',
98+ queue_status=u'Work in progress',
99 commit_message=u'Commitable.',
100 source_branch=branch3.lp_branch,
101 target_branch=self.branches[1],
102@@ -218,7 +218,7 @@
103 # Set up an unapproved proposal for the prerequisite
104 b3_proposal = Thing(
105 self_link=u'http://api.edge.launchpad.net/devel/proposal3',
106- queue_status=u'Work in Progress',
107+ queue_status=u'Work in progress',
108 commit_message=u'Commitable.',
109 source_branch=branch3.lp_branch,
110 target_branch=self.branches[1],
111@@ -260,7 +260,7 @@
112 # Set up an unapproved proposal for the prerequisite
113 b3_proposal = Thing(
114 self_link=u'http://api.edge.launchpad.net/devel/proposal3',
115- queue_status=u'Work in Progress',
116+ queue_status=u'Work in progress',
117 commit_message=u'Commitable.',
118 source_branch=branch3.lp_branch,
119 target_branch=self.branches[1],
120@@ -277,7 +277,7 @@
121 b3_proposal,
122 Thing(
123 target_branch=self.branches[1],
124- queue_status='Needs Review')]
125+ queue_status='Needs review')]
126
127 self.proposals.append(b3_proposal)
128 self.proposals[1].prerequisite_branch = branch3.lp_branch

Subscribers

People subscribed via source and target branches

to all changes: