Merge lp:~james-w/bughugger/fix-api-usage into lp:bughugger

Proposed by James Westby
Status: Merged
Merged at revision: not available
Proposed branch: lp:~james-w/bughugger/fix-api-usage
Merge into: lp:bughugger
Diff against target: 49 lines (+9/-3)
3 files modified
debian/changelog (+4/-0)
plugins/PluginCollectIt.py (+2/-1)
plugins/PluginDuplicate.py (+3/-2)
To merge this branch: bzr merge lp:~james-w/bughugger/fix-api-usage
Reviewer Review Type Date Requested Status
Brian Murray Approve
Review via email: mp+22536@code.launchpad.net

Description of the change

Hi,

The LP API has changed to use attributes rather than methods
for setting the status and duplicates.

This change allows it to work with the new API form (which is
also permitted by the old API, so there aren't any compatibility
worries).

Thanks,

James

To post a comment you must log in.
Revision history for this message
Leonard Richardson (leonardr) wrote :

Though I don't have authority to approve this branch, I've reviewed it and confirmed that there are no other compatibility issues in the current bughugger.

Revision history for this message
Brian Murray (brian-murray) wrote :

Thanks for doing this!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2010-03-15 23:14:54 +0000
+++ debian/changelog 2010-03-31 14:24:24 +0000
@@ -1,7 +1,11 @@
1bughugger (10.03) UNRELEASED; urgency=low1bughugger (10.03) UNRELEASED; urgency=low
22
3 [ Brian Murray ]
3 * bin/bughugger: make releases in a json data file a list too4 * bin/bughugger: make releases in a json data file a list too
45
6 [ James Westby ]
7 * Fix two plugins to work with the LP 1.0 API.
8
5 -- Brian Murray <brian@ubuntu.com> Mon, 15 Mar 2010 16:13:09 -07009 -- Brian Murray <brian@ubuntu.com> Mon, 15 Mar 2010 16:13:09 -0700
610
7bughugger (10.02) lucid; urgency=low11bughugger (10.02) lucid; urgency=low
812
=== modified file 'plugins/PluginCollectIt.py'
--- plugins/PluginCollectIt.py 2010-02-03 02:17:01 +0000
+++ plugins/PluginCollectIt.py 2010-03-31 14:24:24 +0000
@@ -31,8 +31,9 @@
31 for bug_task in bug_tasks:31 for bug_task in bug_tasks:
32 # not for each task of a bug but the list of tasks passed to the Plugin32 # not for each task of a bug but the list of tasks passed to the Plugin
33 comment = "Thank you for taking the time to report this bug and helping to make Ubuntu better. Please execute the following command, as it will automatically gather debugging information, in a terminal:\n\napport-collect %s\n\nThis will help us to find and resolve the problem. Bear in mind that you may need to install the python-launchpadlib package from the universe repository. Additionally, when prompted to give apport-collect permissions for Launchpad you will need to give it at least the ability to \"Change Non-Private\" data as it will be adding information to your bug report. Thanks in advance!" % (bug_task.bug.id)33 comment = "Thank you for taking the time to report this bug and helping to make Ubuntu better. Please execute the following command, as it will automatically gather debugging information, in a terminal:\n\napport-collect %s\n\nThis will help us to find and resolve the problem. Bear in mind that you may need to install the python-launchpadlib package from the universe repository. Additionally, when prompted to give apport-collect permissions for Launchpad you will need to give it at least the ability to \"Change Non-Private\" data as it will be adding information to your bug report. Thanks in advance!" % (bug_task.bug.id)
34 bug_task.transitionToStatus(status="Incomplete")
35 bug_task.bug.newMessage(content=comment, subject="Request for information")34 bug_task.bug.newMessage(content=comment, subject="Request for information")
35 bug_task.status = "Incomplete"
36 bug_task.lp_save()
3637
37 @property38 @property
38 def hide(self):39 def hide(self):
3940
=== modified file 'plugins/PluginDuplicate.py'
--- plugins/PluginDuplicate.py 2010-02-03 02:17:01 +0000
+++ plugins/PluginDuplicate.py 2010-03-31 14:24:24 +0000
@@ -59,11 +59,12 @@
59 if bug_task.bug.duplicates:59 if bug_task.bug.duplicates:
60 print "Skipping bug LP: #%s as it has duplicates itself" % (bug_task.bug.id)60 print "Skipping bug LP: #%s as it has duplicates itself" % (bug_task.bug.id)
61 continue61 continue
62 bug_task.transitionToStatus(status="Confirmed")
63 bug_task.bug.newMessage(content=comment, subject="Marking as a duplicate")62 bug_task.bug.newMessage(content=comment, subject="Marking as a duplicate")
6463
65 master_bug = self.launchpad.bugs[master]64 master_bug = self.launchpad.bugs[master]
66 bug_task.bug.markAsDuplicate(duplicate_of=master_bug)65 bug_task.bug.duplicate_of = master_bug
66 bug_task.status = "Confirmed"
67 bug_task.lp_save()
67 68
68 @property69 @property
69 def hide(self):70 def hide(self):

Subscribers

People subscribed via source and target branches

to all changes: