Merge lp:~abentley/bzr-pqm/child_pqm_email into lp:bzr-pqm

Proposed by Aaron Bentley
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: 86
Merged at revision: 86
Proposed branch: lp:~abentley/bzr-pqm/child_pqm_email
Merge into: lp:bzr-pqm
Diff against target: 51 lines (+15/-3)
3 files modified
lpland.py (+1/-1)
pqm_submit.py (+1/-1)
tests/test_pqm_submit.py (+13/-1)
To merge this branch: bzr merge lp:~abentley/bzr-pqm/child_pqm_email
Reviewer Review Type Date Requested Status
Martin Pool (community) Approve
Jelmer Vernooij (community) code Approve
Review via email: mp+93463@code.launchpad.net

Description of the change

This branch fixes the fallback to child_pqm_email, which was broken in the upgrade to config stacks.

To post a comment you must log in.
Revision history for this message
Jelmer Vernooij (jelmer) :
review: Approve (code)
Revision history for this message
Martin Pool (mbp) wrote :

thanks

  vote approve

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lpland.py'
2--- lpland.py 2012-02-02 17:19:07 +0000
3+++ lpland.py 2012-02-16 17:13:41 +0000
4@@ -1,4 +1,4 @@
5-# Copyright (C) 2010 by Canonical Ltd
6+# Copyright (C) 2010-2012 by Canonical Ltd
7 #
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10
11=== modified file 'pqm_submit.py'
12--- pqm_submit.py 2012-02-02 17:19:07 +0000
13+++ pqm_submit.py 2012-02-16 17:13:41 +0000
14@@ -247,7 +247,7 @@
15 mail_to = local_config.get('pqm_email')
16 if not mail_to:
17 submit_branch = Branch.open(submit_location)
18- submit_branch_config = submit_branch.get_config()
19+ submit_branch_config = submit_branch.get_config_stack()
20 mail_to = submit_branch_config.get('child_pqm_email')
21 if mail_to is None:
22 return None
23
24=== modified file 'tests/test_pqm_submit.py'
25--- tests/test_pqm_submit.py 2012-02-02 17:19:07 +0000
26+++ tests/test_pqm_submit.py 2012-02-16 17:13:41 +0000
27@@ -1,4 +1,4 @@
28-# Copyright (C) 2006-2010 by Canonical Ltd
29+# Copyright (C) 2006-2010, 2012 by Canonical Ltd
30 #
31 # This program is free software; you can redistribute it and/or modify
32 # it under the terms of the GNU General Public License as published by
33@@ -472,6 +472,18 @@
34 self.assertContainsRe(call[3], EMAIL)
35
36
37+class TestPqmEmail(TestCaseWithMemoryTransport):
38+
39+ def test_child_pqm_email(self):
40+ local_branch = self.make_branch('local')
41+ local_config = local_branch.get_config_stack()
42+ submit_branch = self.make_branch('submit')
43+ submit_config = submit_branch.get_config()
44+ submit_config.set_user_option('child_pqm_email', 'child@example.org')
45+ result = pqm_submit.pqm_email(local_config, submit_branch.base)
46+ self.assertEqual('child@example.org', result)
47+
48+
49 class TestConfig(TestCaseWithMemoryTransport):
50
51 def test_email_from_environ(self):

Subscribers

People subscribed via source and target branches

to all changes:
to status/vote changes: