Merge lp:~lifeless/hydrazine/staging into lp:hydrazine

Proposed by Robert Collins
Status: Merged
Merged at revision: 64
Proposed branch: lp:~lifeless/hydrazine/staging
Merge into: lp:hydrazine
Diff against target: 60 lines (+7/-13)
2 files modified
feed-pqm (+6/-12)
hydrazine/__init__.py (+1/-1)
To merge this branch: bzr merge lp:~lifeless/hydrazine/staging
Reviewer Review Type Date Requested Status
hydrazine-core Pending
Review via email: mp+23210@code.launchpad.net

Description of the change

This branch:
 - makes it possible to use hydrazine against staging
 - fixes the bug where a project with no approved merges blows up feed-pqm

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'feed-pqm'
2--- feed-pqm 2010-03-29 05:21:17 +0000
3+++ feed-pqm 2010-04-12 04:49:14 +0000
4@@ -17,11 +17,11 @@
5
6 import datetime
7 import os
8-import subprocess
9 import sys
10
11+from bzrlib.email_message import EmailMessage
12 from bzrlib.config import GlobalConfig
13-from bzrlib.email_message import EmailMessage
14+from bzrlib import gpg
15 from bzrlib.smtp_connection import SMTPConnection
16
17 import hydrazine
18@@ -105,18 +105,11 @@
19 except KeyError:
20 my_email = launchpad.me.preferred_email_address.email
21 print "EMAIL environment variable not set, using %s" % my_email
22- child = subprocess.Popen(
23- ['gpg', '--clearsign', '-a'],
24- stdin=subprocess.PIPE,
25- stdout=subprocess.PIPE)
26- signed_message = child.communicate(
27- raw_message)[0]
28- if child.returncode != 0:
29- print "gpg child failed"
30-
31+ config = GlobalConfig()
32+ signer = gpg.GPGStrategy(config)
33+ signed_message = signer.sign(raw_message.encode('utf8'))
34 message = EmailMessage(my_email, PQM_ADDRESS, mp.commit_message,
35 signed_message)
36- config = GlobalConfig()
37 SMTPConnection(config).send_email(message)
38
39 print "Sent!"
40@@ -138,6 +131,7 @@
41 all_mps = list(project.getMergeProposals(status=['Approved']))
42 if all_mps == []:
43 print "Nothing approved to merge?"
44+ return
45 while True:
46 mp = all_mps[i]
47 show_mp(mp)
48
49=== modified file 'hydrazine/__init__.py'
50--- hydrazine/__init__.py 2010-03-02 05:39:02 +0000
51+++ hydrazine/__init__.py 2010-04-12 04:49:14 +0000
52@@ -11,7 +11,7 @@
53 EDGE_SERVICE_ROOT,
54 )
55
56-service_root = EDGE_SERVICE_ROOT
57+service_root = os.environ.get('LAUNCHPAD_API', EDGE_SERVICE_ROOT)
58
59
60 def trace(s):

Subscribers

People subscribed via source and target branches

to all changes: