From 8468034ed937ce466241ee25d062c45850e5dac8 Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Wed, 5 Dec 2007 10:04:59 +0100 Subject: [PATCH] * debian/control: bumped python-launchpad-bugs requirement to newest version and made it a Recommends. All scripts in ubuntu-dev-tools using it fail gracefully if it's not installed. * hugdaylist: - make use of text connector. - commentary in wiki output. --- debian/changelog | 10 +++++++++- debian/control | 4 ++-- hugdaylist | 51 +++++++++++++++++++++++------------------------- 3 files changed, 35 insertions(+), 30 deletions(-) diff --git a/debian/changelog b/debian/changelog index 10b7432..115f952 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,13 @@ ubuntu-dev-tools (0.23) UNRELEASED; urgency=low + [ Daniel Holbach ] + * debian/control: bumped python-launchpad-bugs requirement to newest version + and made it a Recommends. All scripts in ubuntu-dev-tools using it fail + gracefully if it's not installed. + * hugdaylist: + - make use of text connector. + - commentary in wiki output. + [ Ryan Kavanagh ] * Updated requestsync(1) to reflect the addition of the -k and removed a runon in DESCRIPTION. @@ -35,7 +43,7 @@ ubuntu-dev-tools (0.23) UNRELEASED; urgency=low arguments. * More *roff fixes. - -- Siegfried-Angel Gevatter Pujals (RainCT) Fri, 23 Nov 2007 22:07:58 +0100 + -- Daniel Holbach Wed, 05 Dec 2007 09:57:41 +0100 ubuntu-dev-tools (0.22) hardy; urgency=low diff --git a/debian/control b/debian/control index edf5b76..c9ab65f 100644 --- a/debian/control +++ b/debian/control @@ -13,8 +13,8 @@ Standards-Version: 3.7.2 Package: ubuntu-dev-tools Architecture: all Section: devel -Depends: ${python:Depends}, ${misc:Depends}, binutils, devscripts, sudo, python-launchpad-bugs (>= 0.2.14), reportbug (>= 3.39ubuntu1), python-debian -Recommends: bzr, pbuilder +Depends: ${python:Depends}, ${misc:Depends}, binutils, devscripts, sudo, python-launchpad-bugs (>= 0.2.25), reportbug (>= 3.39ubuntu1), python-debian +Recommends: bzr, pbuilder, python-launchpad-bugs (>= 0.2.5) Conflicts: devscripts (<< 2.10.7ubuntu5) Replaces: devscripts (<< 2.10.7ubuntu5) XB-Python-Version: ${python:Versions} diff --git a/hugdaylist b/hugdaylist index 42b2fe2..25e4f94 100755 --- a/hugdaylist +++ b/hugdaylist @@ -19,12 +19,11 @@ import string try: import launchpadbugs.connector as Connector - import launchpadbugs.bughelper_error as ConnectorErrors BugList = Connector.ConnectBugList() - Bug = Connector.ConnectBug() + Bug = Connector.ConnectBug(method="Text") except: print >> sys.stderr, \ - "You need python-launchpad-bugs (>= 0.2.9) installed to use hugdaylist." + "You need python-launchpad-bugs (>= 0.2.25) installed to use hugdaylist." sys.exit(1) @@ -49,40 +48,38 @@ def check_args(): return (howmany, url) -def filter_unsolved(bugs): - result = set() - - for b in bugs: - bug = Bug(int(b)) - if bug.status != 'Fix Committed' and \ - 'ubuntu-main-sponsors' not in [str(s) for s in bug.subscribers] and \ - 'ubuntu-universe-sponsors' not in [str(s) for s in bug.subscribers] and \ - (bug.assignee in ['motu','desktop-bugs'] or not bug.assignee): - result.add(b) - return result +def filter_unsolved(b): + bug = Bug(int(b)) + return filter(lambda a: (a.affects.lower().count('ubuntu')) and \ + a.status != 'Fix Committed' and \ + (a.assignee in ['motu','desktop-bugs'] or \ + not a.assignee), bug.infotable) and \ + 'ubuntu-main-sponsors' not in [str(s) for s in bug.subscribers] and \ + 'ubuntu-universe-sponsors' not in [str(s) for s in bug.subscribers] def main(): (howmany, url) = check_args() - try: - l = BugList(url).filter(func=[filter_unsolved]) - except ConnectorErrors.LPUrlError: - print "Couldn't load «%s»." % url - sys.exit(1) - except KeyboardInterrupt: - sys.exit(1) # User aborted, no need to print a backtrace + bl = BugList(url) + l = filter(filter_unsolved, bl) - if not l.bugs: + if not l: print "BugList of %s is empty." % url sys.exit(0) if howmany == -1: - howmany = len(l.bugs) - - print "|| Bug || Subject || Triager ||" + howmany = len(l) - for i in list(l.bugs)[:howmany]: - print '|| [%s %s] || %s || ||' % \ + print """ +## || This task is done || somebody || || +## || This task is assigned || somebody || || +## || This task isn't || ... || || +## || This task is blocked on something || somebody || || + +|| Bug || Subject || Triager ||""" + + for i in list(l)[:howmany]: + print '|| [%s %s] || %s || ||' % \ (i.url, i.bugnumber, i.summary)