Rev 3331: Add gnome to list of known bugtrackers (James Westby, Andrew Cowie) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Thu Apr 3 09:01:32 BST 2008
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 3331
revision-id:pqm at pqm.ubuntu.com-20080403080121-tbx3clqp8wqe776c
parent: pqm at pqm.ubuntu.com-20080403062941-5vieqlkyjxxp460c
parent: ian.clatworthy at canonical.com-20080403050207-82p1ldts2wqv07y4
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Thu 2008-04-03 09:01:21 +0100
message:
Add gnome to list of known bugtrackers (James Westby, Andrew Cowie)
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/bugtracker.py bugtracker.py-20070410073305-vu1vu1qosjurg8kb-1
bzrlib/tests/test_bugtracker.py test_bugtracker.py-20070410073305-vu1vu1qosjurg8kb-2
------------------------------------------------------------
revno: 3329.1.1
revision-id:ian.clatworthy at canonical.com-20080403050207-82p1ldts2wqv07y4
parent: pqm at pqm.ubuntu.com-20080403035509-qsxozetmg702c4p0
parent: jw+debian at jameswestby.net-20080329132910-mbadf1n5fpdxc7g8
committer: Ian Clatworthy <ian.clatworthy at canonical.com>
branch nick: ianc-integration
timestamp: Thu 2008-04-03 15:02:07 +1000
message:
Add gnome to list of known bugtrackers (James Westby, Andrew Cowie)
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/bugtracker.py bugtracker.py-20070410073305-vu1vu1qosjurg8kb-1
bzrlib/tests/test_bugtracker.py test_bugtracker.py-20070410073305-vu1vu1qosjurg8kb-2
------------------------------------------------------------
revno: 3270.5.3
revision-id:jw+debian at jameswestby.net-20080329132910-mbadf1n5fpdxc7g8
parent: jw+debian at jameswestby.net-20080316153001-qn5x229fak3edzs8
committer: James Westby <jw+debian at jameswestby.net>
branch nick: gnome_bugtracker
timestamp: Sat 2008-03-29 13:29:10 +0000
message:
No longer add an extra class to accomoadate gnome.
This changes the requirement of UniqueIntegerBugTracker to have a /
at the end of the base URL if it is needed.
modified:
bzrlib/bugtracker.py bugtracker.py-20070410073305-vu1vu1qosjurg8kb-1
bzrlib/tests/test_bugtracker.py test_bugtracker.py-20070410073305-vu1vu1qosjurg8kb-2
------------------------------------------------------------
revno: 3270.5.2
revision-id:jw+debian at jameswestby.net-20080316153001-qn5x229fak3edzs8
parent: jw+debian at jameswestby.net-20080316144418-0xdtv9wgdu2y7tl2
committer: James Westby <jw+debian at jameswestby.net>
branch nick: gnome_bugtracker
timestamp: Sun 2008-03-16 15:30:01 +0000
message:
Rename the class after review comments from John.
modified:
bzrlib/bugtracker.py bugtracker.py-20070410073305-vu1vu1qosjurg8kb-1
------------------------------------------------------------
revno: 3270.5.1
revision-id:jw+debian at jameswestby.net-20080316144418-0xdtv9wgdu2y7tl2
parent: pqm at pqm.ubuntu.com-20080313004030-mff9aq1jfg13n0qi
committer: James Westby <jw+debian at jameswestby.net>
branch nick: gnome_bugtracker
timestamp: Sun 2008-03-16 14:44:18 +0000
message:
Add gnome to the list of known bugtrackers.
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/bugtracker.py bugtracker.py-20070410073305-vu1vu1qosjurg8kb-1
bzrlib/tests/test_bugtracker.py test_bugtracker.py-20070410073305-vu1vu1qosjurg8kb-2
=== modified file 'NEWS'
--- a/NEWS 2008-04-03 06:29:41 +0000
+++ b/NEWS 2008-04-03 08:01:21 +0000
@@ -22,6 +22,11 @@
as this is what bzr branch lp:bzr-svn will give you. (James Westby,
Andrew Cowie)
+ * UniqueIntegerBugTracker now appends bug-ids instead of joining
+ them to the base URL. Plugins that register bug trackers may
+ need a trailing / added to the base URL if one is not already there.
+ (James Wesby, Andrew Cowie)
+
FEATURES:
* Added mail-mode GNU Emacs mail package as a mail_client.
@@ -29,6 +34,9 @@
IMPROVEMENTS:
+ * ``bzr commit --fixes`` now recognises "gnome" as a tag by default.
+ (James Westby, Andrew Cowie)
+
* Diff is now more specific about execute-bit changes it describes
(Chad Miller)
=== modified file 'bzrlib/bugtracker.py'
--- a/bzrlib/bugtracker.py 2008-01-03 02:17:12 +0000
+++ b/bzrlib/bugtracker.py 2008-03-29 13:29:10 +0000
@@ -171,7 +171,8 @@
"""A style of bug tracker that exists in one place only, such as Launchpad.
If you have one of these trackers then register an instance passing in an
- abbreviated name for the bug tracker and a base URL.
+ abbreviated name for the bug tracker and a base URL. The bug ids are
+ appended directly to the URL.
"""
def __init__(self, abbreviated_bugtracker_name, base_url):
@@ -187,7 +188,7 @@
def _get_bug_url(self, bug_id):
"""Return the URL for bug_id."""
- return urlutils.join(self.base_url, bug_id)
+ return self.base_url + bug_id
tracker_registry.register(
@@ -198,6 +199,10 @@
'debian', UniqueIntegerBugTracker('deb', 'http://bugs.debian.org/'))
+tracker_registry.register('gnome',
+ UniqueIntegerBugTracker('gnome', 'http://bugzilla.gnome.org/show_bug.cgi?id='))
+
+
class URLParametrizedIntegerBugTracker(IntegerBugTracker):
"""A type of bug tracker that can be found on a variety of different sites,
and thus needs to have the base URL configured.
=== modified file 'bzrlib/tests/test_bugtracker.py'
--- a/bzrlib/tests/test_bugtracker.py 2007-11-27 19:27:40 +0000
+++ b/bzrlib/tests/test_bugtracker.py 2008-04-03 05:02:07 +0000
@@ -81,6 +81,12 @@
self.assertEqual('http://bugs.debian.org/1234',
tracker.get_bug_url('1234'))
+ def test_gnome_registered(self):
+ branch = self.make_branch('some_branch')
+ tracker = bugtracker.tracker_registry.get_tracker('gnome', branch)
+ self.assertEqual('http://bugzilla.gnome.org/show_bug.cgi?id=1234',
+ tracker.get_bug_url('1234'))
+
def test_trac_registered(self):
"""The Trac bug tracker should be registered by default and generate
Trac bug page URLs when the appropriate configuration is present.
@@ -122,16 +128,18 @@
class TestUniqueIntegerBugTracker(TestCaseWithMemoryTransport):
- def test_joins_id_to_base_url(self):
+ def test_appends_id_to_base_url(self):
"""The URL of a bug is the base URL joined to the identifier."""
- tracker = bugtracker.UniqueIntegerBugTracker('xxx', 'http://bugs.com')
- self.assertEqual('http://bugs.com/1234', tracker.get_bug_url('1234'))
+ tracker = bugtracker.UniqueIntegerBugTracker('xxx',
+ 'http://bugs.com/foo')
+ self.assertEqual('http://bugs.com/foo1234', tracker.get_bug_url('1234'))
def test_returns_tracker_if_abbreviation_matches(self):
"""The get() method should return an instance of the tracker if the
given abbreviation matches the tracker's abbreviated name.
"""
- tracker = bugtracker.UniqueIntegerBugTracker('xxx', 'http://bugs.com')
+ tracker = bugtracker.UniqueIntegerBugTracker('xxx',
+ 'http://bugs.com/')
branch = self.make_branch('some_branch')
self.assertIs(tracker, tracker.get('xxx', branch))
@@ -139,7 +147,8 @@
"""The get() method should return None if the given abbreviated name
doesn't match the tracker's abbreviation.
"""
- tracker = bugtracker.UniqueIntegerBugTracker('xxx', 'http://bugs.com')
+ tracker = bugtracker.UniqueIntegerBugTracker('xxx',
+ 'http://bugs.com/')
branch = self.make_branch('some_branch')
self.assertIs(None, tracker.get('yyy', branch))
@@ -147,18 +156,21 @@
"""A UniqueIntegerBugTracker shouldn't consult the branch for tracker
information.
"""
- tracker = bugtracker.UniqueIntegerBugTracker('xxx', 'http://bugs.com')
+ tracker = bugtracker.UniqueIntegerBugTracker('xxx',
+ 'http://bugs.com/')
self.assertIs(tracker, tracker.get('xxx', None))
self.assertIs(None, tracker.get('yyy', None))
def test_check_bug_id_only_accepts_integers(self):
"""A UniqueIntegerBugTracker accepts integers as bug IDs."""
- tracker = bugtracker.UniqueIntegerBugTracker('xxx', 'http://bugs.com')
+ tracker = bugtracker.UniqueIntegerBugTracker('xxx',
+ 'http://bugs.com/')
tracker.check_bug_id('1234')
def test_check_bug_id_doesnt_accept_non_integers(self):
"""A UniqueIntegerBugTracker rejects non-integers as bug IDs."""
- tracker = bugtracker.UniqueIntegerBugTracker('xxx', 'http://bugs.com')
+ tracker = bugtracker.UniqueIntegerBugTracker('xxx',
+ 'http://bugs.com/')
self.assertRaises(
errors.MalformedBugIdentifier, tracker.check_bug_id, 'red')
More information about the bazaar-commits
mailing list