Rev 5436: (vila) Tweak tools/check-newsbug.py and do some light editing in in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Mon Sep 20 17:15:29 BST 2010
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 5436 [merge]
revision-id: pqm at pqm.ubuntu.com-20100920161526-3r87u084xg7d3pd6
parent: pqm at pqm.ubuntu.com-20100920145731-g0nb7fth1nrppoxf
parent: v.ladeuil+lp at free.fr-20100920120538-1xxzn8zcc2lr1cz8
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Mon 2010-09-20 17:15:26 +0100
message:
(vila) Tweak tools/check-newsbug.py and do some light editing in
doc/developers/ppa.txt. (Vincent Ladeuil)
modified:
doc/developers/ppa.txt ppa.txt-20080722055539-606u7t2z32t3ae4w-1
tools/check-newsbugs.py checknewsbugs.py-20090128204947-lsdwd8nlswm1yrwv-1
=== modified file 'doc/developers/ppa.txt'
--- a/doc/developers/ppa.txt 2010-09-13 02:03:04 +0000
+++ b/doc/developers/ppa.txt 2010-09-20 12:05:38 +0000
@@ -7,13 +7,13 @@
Background
----------
-We build Ubuntu ``.deb`` packages for Bazaar as an important part of the release
-process. These packages are hosted in a few `Personal Package Archives (PPA)`__ on
-Launchpad.
+We build Ubuntu ``.deb`` packages for Bazaar as an important part of the
+release process. These packages are hosted in a few `Personal Package
+Archives (PPA)`__ on Launchpad.
__ https://help.launchpad.net/PPAQuickStart
-As of June 2010, there are three PPAs:
+As of September 2010, there are four PPAs:
<https://launchpad.net/~bzr/+archive/ppa>
Final released versions and updates.
=== modified file 'tools/check-newsbugs.py'
--- a/tools/check-newsbugs.py 2010-06-01 16:46:47 +0000
+++ b/tools/check-newsbugs.py 2010-09-20 12:05:38 +0000
@@ -5,9 +5,16 @@
import getopt, re, sys
try:
from launchpadlib.launchpad import Launchpad
+ from lazr.restfulclient import errors
except ImportError:
print "Please install launchpadlib from lp:launchpadlib"
sys.exit(1)
+try:
+ import hydrazine
+except ImportError:
+ print "Please install hydrazine from lp:launchpadlib"
+ sys.exit(1)
+
options, args = getopt.gnu_getopt(sys.argv, "l", ["launchpad"])
options = dict(options)
@@ -61,16 +68,42 @@
f.close()
-lp = Launchpad.login_anonymously('bzr-check-newsbugs', 'edge', version='1.0')
+def print_bug_url(bugno):
+ print '<URL:http://pad.lv/%s>' % (bugno,)
+launchpad = hydrazine.create_session()
bugnos = read_news_bugnos(args[1])
for bugno, section in bugnos:
- bug = lp.bugs[bugno]
+ try:
+ bug = launchpad.bugs[bugno]
+ except errors.HTTPError, e:
+ if e.response.status == 401:
+ print_bug_url(bugno)
+ # Private, we can't access the bug content
+ print '%s is private and cannot be accessed' % (bugno,)
+ continue
+ raise
+
found_bzr = False
+ fix_released = False
for task in bug.bug_tasks:
- if task.bug_target_name == "bzr":
+ parts = task.bug_target_name.split('/')
+ if len(parts) == 1:
+ project = parts[0]
+ distribution = None
+ else:
+ project = parts[0]
+ distribution = parts[1]
+ if project == "bzr":
found_bzr = True
- if task.status != "Fix Released":
- report_notmarked(bug, task, section)
+ if not fix_released and task.status == "Fix Released":
+ # We could check that the NEWS section and task_status are in
+ # sync, but that would be overkill. (case at hand: bug #416732)
+ fix_released = True
+
if not found_bzr:
+ print_bug_url(bugno)
print "Bug %d was mentioned in NEWS but is not marked as affecting bzr" % bugno
+ elif not fix_released:
+ print_bug_url(bugno)
+ report_notmarked(bug, task, section)
More information about the bazaar-commits
mailing list