Show More
@@ -7,77 +7,69 b'' | |||||
7 |
|
7 | |||
8 | '''hooks for integrating with the Bugzilla bug tracker |
|
8 | '''hooks for integrating with the Bugzilla bug tracker | |
9 |
|
9 | |||
10 | This hook extension adds comments on bugs in Bugzilla when changesets |
|
10 | This hook extension adds comments on bugs in Bugzilla when changesets that | |
11 |
|
|
11 | refer to bugs by Bugzilla ID are seen. The hook does not change bug status. | |
12 | bug status. |
|
|||
13 |
|
12 | |||
14 | The hook updates the Bugzilla database directly. Only Bugzilla |
|
13 | The hook updates the Bugzilla database directly. Only Bugzilla installations | |
15 |
|
|
14 | using MySQL are supported. | |
16 |
|
15 | |||
17 | The hook relies on a Bugzilla script to send bug change notification |
|
16 | The hook relies on a Bugzilla script to send bug change notification emails. | |
18 |
|
|
17 | That script changes between Bugzilla versions; the 'processmail' script used | |
19 |
|
|
18 | prior to 2.18 is replaced in 2.18 and subsequent versions by | |
20 |
|
|
19 | 'config/sendbugmail.pl'. Note that these will be run by Mercurial as the user | |
21 | be run by Mercurial as the user pushing the change; you will need to |
|
20 | pushing the change; you will need to ensure the Bugzilla install file | |
22 |
|
|
21 | permissions are set appropriately. | |
23 |
|
22 | |||
24 | Configuring the extension: |
|
23 | Configuring the extension: | |
25 |
|
24 | |||
26 | [bugzilla] |
|
25 | [bugzilla] | |
27 |
|
26 | |||
28 | host Hostname of the MySQL server holding the Bugzilla |
|
27 | host Hostname of the MySQL server holding the Bugzilla database. | |
29 | database. |
|
|||
30 | db Name of the Bugzilla database in MySQL. Default 'bugs'. |
|
28 | db Name of the Bugzilla database in MySQL. Default 'bugs'. | |
31 | user Username to use to access MySQL server. Default 'bugs'. |
|
29 | user Username to use to access MySQL server. Default 'bugs'. | |
32 | password Password to use to access MySQL server. |
|
30 | password Password to use to access MySQL server. | |
33 | timeout Database connection timeout (seconds). Default 5. |
|
31 | timeout Database connection timeout (seconds). Default 5. | |
34 | version Bugzilla version. Specify '3.0' for Bugzilla versions |
|
32 | version Bugzilla version. Specify '3.0' for Bugzilla versions 3.0 and | |
35 |
|
|
33 | later, '2.18' for Bugzilla versions from 2.18 and '2.16' for | |
36 |
|
|
34 | versions prior to 2.18. | |
37 | bzuser Fallback Bugzilla user name to record comments with, if |
|
35 | bzuser Fallback Bugzilla user name to record comments with, if | |
38 | changeset committer cannot be found as a Bugzilla user. |
|
36 | changeset committer cannot be found as a Bugzilla user. | |
39 | bzdir Bugzilla install directory. Used by default notify. |
|
37 | bzdir Bugzilla install directory. Used by default notify. Default | |
40 |
|
|
38 | '/var/www/html/bugzilla'. | |
41 | notify The command to run to get Bugzilla to send bug change |
|
39 | notify The command to run to get Bugzilla to send bug change | |
42 | notification emails. Substitutes from a map with 3 |
|
40 | notification emails. Substitutes from a map with 3 keys, | |
43 |
|
|
41 | 'bzdir', 'id' (bug id) and 'user' (committer bugzilla email). | |
44 |
|
|
42 | Default depends on version; from 2.18 it is "cd %(bzdir)s && | |
45 |
|
|
43 | perl -T contrib/sendbugmail.pl %(id)s %(user)s". | |
46 | %(id)s %(user)s". |
|
|||
47 | regexp Regular expression to match bug IDs in changeset commit |
|
44 | regexp Regular expression to match bug IDs in changeset commit | |
48 | message. Must contain one "()" group. The default |
|
45 | message. Must contain one "()" group. The default expression | |
49 |
|
|
46 | matches 'Bug 1234', 'Bug no. 1234', 'Bug number 1234', 'Bugs | |
50 |
|
|
47 | 1234,5678', 'Bug 1234 and 5678' and variations thereof. | |
51 |
|
|
48 | Matching is case insensitive. | |
52 | style The style file to use when formatting comments. |
|
49 | style The style file to use when formatting comments. | |
53 | template Template to use when formatting comments. Overrides |
|
50 | template Template to use when formatting comments. Overrides style if | |
54 |
s |
|
51 | specified. In addition to the usual Mercurial keywords, the | |
55 |
|
|
52 | extension specifies: | |
56 | {bug} The Bugzilla bug ID. |
|
53 | {bug} The Bugzilla bug ID. | |
57 | {root} The full pathname of the Mercurial |
|
54 | {root} The full pathname of the Mercurial repository. | |
58 |
|
|
55 | {webroot} Stripped pathname of the Mercurial repository. | |
59 |
{ |
|
56 | {hgweb} Base URL for browsing Mercurial repositories. | |
60 | repository. |
|
|||
61 | {hgweb} Base URL for browsing Mercurial |
|
|||
62 | repositories. |
|
|||
63 | Default 'changeset {node|short} in repo {root} refers ' |
|
57 | Default 'changeset {node|short} in repo {root} refers ' | |
64 | 'to bug {bug}.\\ndetails:\\n\\t{desc|tabindent}' |
|
58 | 'to bug {bug}.\\ndetails:\\n\\t{desc|tabindent}' | |
65 | strip The number of slashes to strip from the front of {root} |
|
59 | strip The number of slashes to strip from the front of {root} to | |
66 |
|
|
60 | produce {webroot}. Default 0. | |
67 | usermap Path of file containing Mercurial committer ID to |
|
61 | usermap Path of file containing Mercurial committer ID to Bugzilla user | |
68 |
|
|
62 | ID mappings. If specified, the file should contain one mapping | |
69 | should contain one mapping per line, |
|
63 | per line, "committer"="Bugzilla user". See also the [usermap] | |
70 | "committer"="Bugzilla user". See also the [usermap] |
|
|||
71 | section. |
|
64 | section. | |
72 |
|
65 | |||
73 | [usermap] |
|
66 | [usermap] | |
74 | Any entries in this section specify mappings of Mercurial |
|
67 | Any entries in this section specify mappings of Mercurial committer ID to | |
75 |
|
|
68 | Bugzilla user ID. See also [bugzilla].usermap. "committer"="Bugzilla user" | |
76 | "committer"="Bugzilla user" |
|
|||
77 |
|
69 | |||
78 | [web] |
|
70 | [web] | |
79 | baseurl Base URL for browsing Mercurial repositories. Reference |
|
71 | baseurl Base URL for browsing Mercurial repositories. Reference from | |
80 |
|
|
72 | templates as {hgweb}. | |
81 |
|
73 | |||
82 | Activating the extension: |
|
74 | Activating the extension: | |
83 |
|
75 | |||
@@ -90,9 +82,9 b' Activating the extension:' | |||||
90 |
|
82 | |||
91 | Example configuration: |
|
83 | Example configuration: | |
92 |
|
84 | |||
93 | This example configuration is for a collection of Mercurial |
|
85 | This example configuration is for a collection of Mercurial repositories in | |
94 |
|
|
86 | /var/local/hg/repos/ used with a local Bugzilla 3.2 installation in | |
95 |
|
|
87 | /opt/bugzilla-3.2. | |
96 |
|
88 | |||
97 | [bugzilla] |
|
89 | [bugzilla] | |
98 | host=localhost |
|
90 | host=localhost |
General Comments 0
You need to be logged in to leave comments.
Login now