~toddy/bzr/bzr.i18n

« back to all changes in this revision

Viewing changes to bzrlib/bugtracker.py

  • Committer: Tobias Toedter
  • Date: 2007-12-30 18:52:13 UTC
  • mfrom: (2438.1.708 +trunk)
  • Revision ID: t.toedter@gmx.net-20071230185213-7xiqpbtshmnsf073
Merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
"""
40
40
 
41
41
 
 
42
_bugs_help = \
 
43
"""When making a commit, metadata about bugs fixed by that change can be
 
44
recorded by using the --fixes option. For each bug marked as fixed, an
 
45
entry is included in the 'bugs' revision property stating '<url> <status>'.
 
46
Support for Launchpad's central bug tracker is built in. For other bug
 
47
trackers, configuration is required in advance so that the correct URL
 
48
can be recorded.
 
49
 
 
50
In addition to Launchpad, Bazaar directly supports the generation of
 
51
URLs appropriate for Bugzilla and Trac. If your project uses a different
 
52
bug tracker, it is easy to add support for it by writing a plugin, say.
 
53
If you use Bugzilla or Trac, then you only need to set a configuration
 
54
variable which contains the base URL of the bug tracker. These options
 
55
can go into ``bazaar.conf``, ``branch.conf`` or into a branch-specific
 
56
configuration section in ``locations.conf``.  You can set up these values
 
57
for each of the projects you work on.
 
58
 
 
59
Note: As you provide a short name for each tracker, you can specify one or
 
60
more bugs in one or more trackers at commit time if you wish.
 
61
 
 
62
bugzilla_<tracker_abbreviation>_url
 
63
-----------------------------------
 
64
 
 
65
If present, the location of the Bugzilla bug tracker referred to by
 
66
<tracker_abbreviation>. This option can then be used together with ``bzr commit
 
67
--fixes`` to mark bugs in that tracker as being fixed by that commit. For
 
68
example::
 
69
 
 
70
    bugzilla_squid_url = http://www.squid-cache.org/bugs
 
71
 
 
72
would allow ``bzr commit --fixes squid:1234`` to mark Squid's bug 1234 as
 
73
fixed.
 
74
 
 
75
trac_<tracker_abbrevation>_url
 
76
------------------------------
 
77
 
 
78
If present, the location of the Trac instance referred to by
 
79
<tracker_abbreviation>. This option can then be used together with ``bzr commit
 
80
--fixes`` to mark bugs in that tracker as being fixed by that commit. For
 
81
example::
 
82
 
 
83
    trac_twisted_url = http://www.twistedmatrix.com/trac
 
84
 
 
85
would allow ``bzr commit --fixes twisted:1234`` to mark Twisted's bug 1234 as
 
86
fixed.
 
87
 
 
88
bugtracker_<tracker_abbrevation>_url
 
89
------------------------------------
 
90
 
 
91
If present, the location of a generic bug tracker instance referred to by
 
92
<tracker_abbreviation>. The location must contain an ``{id}`` placeholder,
 
93
which will be replaced by a specific bug ID. This option can then be used
 
94
together with ``bzr commit --fixes`` to mark bugs in that tracker as being
 
95
fixed by that commit. For example::
 
96
 
 
97
    bugtracker_python_url = http://bugs.python.org/issue{id}
 
98
 
 
99
would allow ``bzr commit --fixes python:1234`` to mark bug 1234 in Python's
 
100
Roundup bug tracker as fixed, or::
 
101
 
 
102
    bugtracker_cpan_url = http://rt.cpan.org/Public/Bug/Display.html?id={id}
 
103
 
 
104
for CPAN's RT bug tracker.
 
105
"""
 
106
 
 
107
 
42
108
def get_bug_url(abbreviated_bugtracker_name, branch, bug_id):
43
109
    """Return a URL pointing to the canonical web page of the bug identified by
44
110
    'bug_id'.
65
131
                                                   branch)
66
132
 
67
133
    def help_topic(self, topic):
68
 
        return textwrap.dedent("""\
69
 
        Bazaar provides the ability to store information about bugs being fixed
70
 
        as metadata on a revision.
71
 
 
72
 
        For each bug marked as fixed, an entry is included in the 'bugs'
73
 
        revision property stating '<url> <status>'.
74
 
        """)
 
134
        return _bugs_help
75
135
 
76
136
 
77
137
tracker_registry = TrackerRegistry()