~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bugtracker.py

add gettext to all the builtin commands outf usage

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
 
49
49
    bzr commit --fixes <tracker>:<id>
50
50
 
 
51
or::
 
52
 
 
53
    bzr commit --fixes <id>
 
54
 
51
55
where "<tracker>" is an identifier for the bug tracker, and "<id>" is the
52
56
identifier for that bug within the bugtracker, usually the bug number.
 
57
If "<tracker>" is not specified the ``bugtracker`` set in the branch
 
58
or global configuration is used.
53
59
 
54
60
Bazaar knows about a few bug trackers that have many users. If
55
61
you use one of these bug trackers then there is no setup required to
93
99
--fixes`` to mark bugs in that tracker as being fixed by that commit. For
94
100
example::
95
101
 
96
 
    bugzilla_squid_url = http://www.squid-cache.org/bugs
 
102
    bugzilla_squid_url = http://bugs.squid-cache.org
97
103
 
98
104
would allow ``bzr commit --fixes squid:1234`` to mark Squid's bug 1234 as
99
105
fixed.
231
237
 
232
238
 
233
239
tracker_registry.register('gnome',
234
 
    UniqueIntegerBugTracker('gnome', 'http://bugzilla.gnome.org/show_bug.cgi?id='))
 
240
    UniqueIntegerBugTracker('gnome',
 
241
                            'http://bugzilla.gnome.org/show_bug.cgi?id='))
235
242
 
236
243
 
237
244
class URLParametrizedBugTracker(BugTracker):
246
253
    def get(self, abbreviation, branch):
247
254
        config = branch.get_config()
248
255
        url = config.get_user_option(
249
 
            "%s_%s_url" % (self.type_name, abbreviation))
 
256
            "%s_%s_url" % (self.type_name, abbreviation), expand=False)
250
257
        if url is None:
251
258
            return None
252
259
        self._base_url = url
261
268
        return urlutils.join(self._base_url, self._bug_area) + str(bug_id)
262
269
 
263
270
 
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
class URLParametrizedIntegerBugTracker(IntegerBugTracker,
 
272
                                       URLParametrizedBugTracker):
 
273
    """A type of bug tracker that  only allows integer bug IDs.
 
274
 
 
275
    This can be found on a variety of different sites, and thus needs to have
 
276
    the base URL configured.
267
277
 
268
278
    Looks for a config setting in the form '<type_name>_<abbreviation>_url'.
269
279
    `type_name` is the name of the type of tracker (e.g. 'bugzilla' or 'trac')