~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bugtracker.py

  • Committer: Jelmer Vernooij
  • Date: 2011-02-24 16:09:47 UTC
  • mto: (5582.10.69 weave-fmt-plugin)
  • mto: This revision was merged to the branch mainline in revision 5688.
  • Revision ID: jelmer@samba.org-20110224160947-e7kqclxnjif28v5q
merge bzr.dev.

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', 'http://bugzilla.gnome.org/show_bug.cgi?id='))
 
234
    UniqueIntegerBugTracker('gnome',
 
235
                            'http://bugzilla.gnome.org/show_bug.cgi?id='))
235
236
 
236
237
 
237
238
class URLParametrizedBugTracker(BugTracker):
246
247
    def get(self, abbreviation, branch):
247
248
        config = branch.get_config()
248
249
        url = config.get_user_option(
249
 
            "%s_%s_url" % (self.type_name, abbreviation))
 
250
            "%s_%s_url" % (self.type_name, abbreviation), expand=False)
250
251
        if url is None:
251
252
            return None
252
253
        self._base_url = url
261
262
        return urlutils.join(self._base_url, self._bug_area) + str(bug_id)
262
263
 
263
264
 
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.
 
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.
267
271
 
268
272
    Looks for a config setting in the form '<type_name>_<abbreviation>_url'.
269
273
    `type_name` is the name of the type of tracker (e.g. 'bugzilla' or 'trac')