Merge lp:~abentley/launchpad/processmail-packagebranch into lp:launchpad/db-devel

Proposed by Aaron Bentley
Status: Merged
Merged at revision: not available
Proposed branch: lp:~abentley/launchpad/processmail-packagebranch
Merge into: lp:launchpad/db-devel
Diff against target: None lines
To merge this branch: bzr merge lp:~abentley/launchpad/processmail-packagebranch
Reviewer Review Type Date Requested Status
Paul Hummer (community) Approve
Review via email: mp+11450@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Aaron Bentley (abentley) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

= Summary =
Fix bug #426779

== Proposed fix ==
Allow SELECT on seriessourcepackagebranch for the processmail user

== Pre-implementation notes ==
No preimplementation was done.

== Implementation details ==

== Tests ==
bin/test test_codehandler -t test_process_packagebranch

== Demo and Q/A ==
Using staging
 - create a merge proposal involving a package branch
 - send an email to the merge proposal's address
 - observe that the email is shown as a comment on the merge proposal's
   page.

= Launchpad lint =

Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.

Linting changed files:
  lib/lp/code/mail/tests/test_codehandler.py
  database/schema/security.cfg
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkqn3cwACgkQ0F+nu1YWqI1eIACfT4PQojfyzQnVG89aFvdiyjwf
UEkAn05Ee2dikF5ChKmUjL29fCR+/lk8
=xLtz
-----END PGP SIGNATURE-----

Revision history for this message
Paul Hummer (rockstar) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'database/schema/security.cfg'
2--- database/schema/security.cfg 2009-08-24 20:19:36 +0000
3+++ database/schema/security.cfg 2009-09-09 16:23:55 +0000
4@@ -1467,6 +1467,7 @@
5 public.mergedirectivejob = SELECT, INSERT
6 public.staticdiff = SELECT, INSERT, UPDATE
7 public.sourcepackagename = SELECT
8+public.seriessourcepackagebranch = SELECT
9
10
11 [mlist-sync]
12
13=== modified file 'lib/lp/code/mail/tests/test_codehandler.py'
14--- lib/lp/code/mail/tests/test_codehandler.py 2009-07-30 19:44:08 +0000
15+++ lib/lp/code/mail/tests/test_codehandler.py 2009-09-09 16:23:55 +0000
16@@ -152,6 +152,19 @@
17 # if the message has not been created, this raises SQLObjectNotFound
18 message = MessageSet().get('<my-id>')
19
20+ def test_process_packagebranch(self):
21+ """Processing an email related to a package branch works.."""
22+ mail = self.factory.makeSignedMessage('<my-id>')
23+ target_branch = self.factory.makePackageBranch()
24+ bmp = self.factory.makeBranchMergeProposal(
25+ target_branch=target_branch)
26+ email_addr = bmp.address
27+ self.switchDbUser(config.processmail.dbuser)
28+ self.code_handler.process( mail, email_addr, None)
29+ self.assertIn(
30+ '<my-id>', [comment.message.rfc822msgid
31+ for comment in bmp.all_comments])
32+
33 def test_processBadAddress(self):
34 """When a bad address is supplied, it returns False."""
35 mail = self.factory.makeSignedMessage('<my-id>')

Subscribers

People subscribed via source and target branches

to status/vote changes: