~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bugtracker.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-12-20 04:20:19 UTC
  • mfrom: (3062.2.13 fast-plan-merge2)
  • Revision ID: pqm@pqm.ubuntu.com-20071220042019-wsij5vgvhgw4qhdt
Annotate merge can do cherrypicks (abentley)

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
"""When making a commit, metadata about bugs fixed by that change can be
44
44
recorded by using the --fixes option. For each bug marked as fixed, an
45
45
entry is included in the 'bugs' revision property stating '<url> <status>'.
46
 
(The only ``status`` value currently supported is ``fixed.``)
47
46
Support for Launchpad's central bug tracker is built in. For other bug
48
47
trackers, configuration is required in advance so that the correct URL
49
48
can be recorded.
50
49
 
51
50
In addition to Launchpad, Bazaar directly supports the generation of
52
51
URLs appropriate for Bugzilla and Trac. If your project uses a different
53
 
bug tracker, it is easy to add support for it.
 
52
bug tracker, it is easy to add support for it by writing a plugin, say.
54
53
If you use Bugzilla or Trac, then you only need to set a configuration
55
54
variable which contains the base URL of the bug tracker. These options
56
55
can go into ``bazaar.conf``, ``branch.conf`` or into a branch-specific
171
170
    """A style of bug tracker that exists in one place only, such as Launchpad.
172
171
 
173
172
    If you have one of these trackers then register an instance passing in an
174
 
    abbreviated name for the bug tracker and a base URL. The bug ids are
175
 
    appended directly to the URL.
 
173
    abbreviated name for the bug tracker and a base URL.
176
174
    """
177
175
 
178
176
    def __init__(self, abbreviated_bugtracker_name, base_url):
188
186
 
189
187
    def _get_bug_url(self, bug_id):
190
188
        """Return the URL for bug_id."""
191
 
        return self.base_url + bug_id
 
189
        return urlutils.join(self.base_url, bug_id)
192
190
 
193
191
 
194
192
tracker_registry.register(
199
197
    'debian', UniqueIntegerBugTracker('deb', 'http://bugs.debian.org/'))
200
198
 
201
199
 
202
 
tracker_registry.register('gnome',
203
 
    UniqueIntegerBugTracker('gnome', 'http://bugzilla.gnome.org/show_bug.cgi?id='))
204
 
 
205
 
 
206
200
class URLParametrizedIntegerBugTracker(IntegerBugTracker):
207
201
    """A type of bug tracker that can be found on a variety of different sites,
208
202
    and thus needs to have the base URL configured.