~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bugtracker.py

  • Committer: Andrew Bennetts
  • Date: 2010-10-13 00:26:41 UTC
  • mto: This revision was merged to the branch mainline in revision 5498.
  • Revision ID: andrew.bennetts@canonical.com-20101013002641-9tlh9k89mlj1666m
Keep docs-plain working.

Show diffs side-by-side

added added

removed removed

Lines of Context:
231
231
 
232
232
 
233
233
tracker_registry.register('gnome',
234
 
    UniqueIntegerBugTracker('gnome',
235
 
                            'http://bugzilla.gnome.org/show_bug.cgi?id='))
 
234
    UniqueIntegerBugTracker('gnome', 'http://bugzilla.gnome.org/show_bug.cgi?id='))
236
235
 
237
236
 
238
237
class URLParametrizedBugTracker(BugTracker):
247
246
    def get(self, abbreviation, branch):
248
247
        config = branch.get_config()
249
248
        url = config.get_user_option(
250
 
            "%s_%s_url" % (self.type_name, abbreviation), expand=False)
 
249
            "%s_%s_url" % (self.type_name, abbreviation))
251
250
        if url is None:
252
251
            return None
253
252
        self._base_url = url
262
261
        return urlutils.join(self._base_url, self._bug_area) + str(bug_id)
263
262
 
264
263
 
265
 
class URLParametrizedIntegerBugTracker(IntegerBugTracker,
266
 
                                       URLParametrizedBugTracker):
267
 
    """A type of bug tracker that  only allows integer bug IDs.
268
 
 
269
 
    This can be found on a variety of different sites, and thus needs to have
270
 
    the base URL configured.
 
264
class URLParametrizedIntegerBugTracker(IntegerBugTracker, URLParametrizedBugTracker):
 
265
    """A type of bug tracker that can be found on a variety of different sites,
 
266
    and thus needs to have the base URL configured, but only allows integer bug IDs.
271
267
 
272
268
    Looks for a config setting in the form '<type_name>_<abbreviation>_url'.
273
269
    `type_name` is the name of the type of tracker (e.g. 'bugzilla' or 'trac')