Mercurial > hg
comparison hgext/bugzilla.py @ 9203:e4dbd49b88a9
bugzilla: reformat list of configuration options
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Thu, 23 Jul 2009 00:20:18 +0200 |
parents | 84be8a8cc8b0 |
children | 8d59e43854d9 |
comparison
equal
deleted
inserted
replaced
9202:82de0bb056d7 | 9203:e4dbd49b88a9 |
---|---|
18 prior to 2.18 is replaced in 2.18 and subsequent versions by | 18 prior to 2.18 is replaced in 2.18 and subsequent versions by |
19 'config/sendbugmail.pl'. Note that these will be run by Mercurial as the user | 19 'config/sendbugmail.pl'. Note that these will be run by Mercurial as the user |
20 pushing the change; you will need to ensure the Bugzilla install file | 20 pushing the change; you will need to ensure the Bugzilla install file |
21 permissions are set appropriately. | 21 permissions are set appropriately. |
22 | 22 |
23 Configuring the extension: | 23 The extension is configured through three different configuration sections. |
24 | 24 These keys are recognized in the [bugzilla] section: |
25 [bugzilla] | 25 |
26 | 26 host |
27 host Hostname of the MySQL server holding the Bugzilla database. | 27 Hostname of the MySQL server holding the Bugzilla database. |
28 db Name of the Bugzilla database in MySQL. Default 'bugs'. | 28 |
29 user Username to use to access MySQL server. Default 'bugs'. | 29 db |
30 password Password to use to access MySQL server. | 30 Name of the Bugzilla database in MySQL. Default 'bugs'. |
31 timeout Database connection timeout (seconds). Default 5. | 31 |
32 version Bugzilla version. Specify '3.0' for Bugzilla versions 3.0 and | 32 user |
33 later, '2.18' for Bugzilla versions from 2.18 and '2.16' for | 33 Username to use to access MySQL server. Default 'bugs'. |
34 versions prior to 2.18. | 34 |
35 bzuser Fallback Bugzilla user name to record comments with, if | 35 password |
36 changeset committer cannot be found as a Bugzilla user. | 36 Password to use to access MySQL server. |
37 bzdir Bugzilla install directory. Used by default notify. Default | 37 |
38 '/var/www/html/bugzilla'. | 38 timeout |
39 notify The command to run to get Bugzilla to send bug change | 39 Database connection timeout (seconds). Default 5. |
40 notification emails. Substitutes from a map with 3 keys, | 40 |
41 'bzdir', 'id' (bug id) and 'user' (committer bugzilla email). | 41 version |
42 Default depends on version; from 2.18 it is "cd %(bzdir)s && | 42 Bugzilla version. Specify '3.0' for Bugzilla versions 3.0 and later, '2.18' |
43 perl -T contrib/sendbugmail.pl %(id)s %(user)s". | 43 for Bugzilla versions from 2.18 and '2.16' for versions prior to 2.18. |
44 regexp Regular expression to match bug IDs in changeset commit | 44 |
45 message. Must contain one "()" group. The default expression | 45 bzuser |
46 matches 'Bug 1234', 'Bug no. 1234', 'Bug number 1234', 'Bugs | 46 Fallback Bugzilla user name to record comments with, if changeset committer |
47 1234,5678', 'Bug 1234 and 5678' and variations thereof. | 47 cannot be found as a Bugzilla user. |
48 Matching is case insensitive. | 48 |
49 style The style file to use when formatting comments. | 49 bzdir |
50 template Template to use when formatting comments. Overrides style if | 50 Bugzilla install directory. Used by default notify. Default |
51 specified. In addition to the usual Mercurial keywords, the | 51 '/var/www/html/bugzilla'. |
52 extension specifies: | 52 |
53 {bug} The Bugzilla bug ID. | 53 notify |
54 {root} The full pathname of the Mercurial repository. | 54 The command to run to get Bugzilla to send bug change notification emails. |
55 {webroot} Stripped pathname of the Mercurial repository. | 55 Substitutes from a map with 3 keys, 'bzdir', 'id' (bug id) and 'user' |
56 {hgweb} Base URL for browsing Mercurial repositories. | 56 (committer bugzilla email). Default depends on version; from 2.18 it is "cd |
57 Default 'changeset {node|short} in repo {root} refers ' | 57 %(bzdir)s && perl -T contrib/sendbugmail.pl %(id)s %(user)s". |
58 'to bug {bug}.\\ndetails:\\n\\t{desc|tabindent}' | 58 |
59 strip The number of slashes to strip from the front of {root} to | 59 regexp |
60 produce {webroot}. Default 0. | 60 Regular expression to match bug IDs in changeset commit message. Must |
61 usermap Path of file containing Mercurial committer ID to Bugzilla user | 61 contain one "()" group. The default expression matches 'Bug 1234', 'Bug no. |
62 ID mappings. If specified, the file should contain one mapping | 62 1234', 'Bug number 1234', 'Bugs 1234,5678', 'Bug 1234 and 5678' and |
63 per line, "committer"="Bugzilla user". See also the [usermap] | 63 variations thereof. Matching is case insensitive. |
64 section. | 64 |
65 | 65 style |
66 [usermap] | 66 The style file to use when formatting comments. |
67 Any entries in this section specify mappings of Mercurial committer ID to | 67 |
68 Bugzilla user ID. See also [bugzilla].usermap. "committer"="Bugzilla user" | 68 template |
69 | 69 Template to use when formatting comments. Overrides style if specified. In |
70 [web] | 70 addition to the usual Mercurial keywords, the extension specifies:: |
71 baseurl Base URL for browsing Mercurial repositories. Reference from | 71 |
72 templates as {hgweb}. | 72 {bug} The Bugzilla bug ID. |
73 | 73 {root} The full pathname of the Mercurial repository. |
74 Activating the extension: | 74 {webroot} Stripped pathname of the Mercurial repository. |
75 {hgweb} Base URL for browsing Mercurial repositories. | |
76 | |
77 Default 'changeset {node|short} in repo {root} refers ' | |
78 'to bug {bug}.\\ndetails:\\n\\t{desc|tabindent}' | |
79 | |
80 strip | |
81 The number of slashes to strip from the front of {root} to produce | |
82 {webroot}. Default 0. | |
83 | |
84 usermap | |
85 Path of file containing Mercurial committer ID to Bugzilla user ID mappings. | |
86 If specified, the file should contain one mapping per line, | |
87 "committer"="Bugzilla user". See also the [usermap] section. | |
88 | |
89 The [usermap] section is used to specify mappings of Mercurial committer ID to | |
90 Bugzilla user ID. See also [bugzilla].usermap. "committer"="Bugzilla user" | |
91 | |
92 Finally, the [web] section supports one entry: | |
93 | |
94 baseurl | |
95 Base URL for browsing Mercurial repositories. Reference from templates as | |
96 {hgweb}. | |
97 | |
98 Activating the extension:: | |
75 | 99 |
76 [extensions] | 100 [extensions] |
77 hgext.bugzilla = | 101 hgext.bugzilla = |
78 | 102 |
79 [hooks] | 103 [hooks] |
82 | 106 |
83 Example configuration: | 107 Example configuration: |
84 | 108 |
85 This example configuration is for a collection of Mercurial repositories in | 109 This example configuration is for a collection of Mercurial repositories in |
86 /var/local/hg/repos/ used with a local Bugzilla 3.2 installation in | 110 /var/local/hg/repos/ used with a local Bugzilla 3.2 installation in |
87 /opt/bugzilla-3.2. | 111 /opt/bugzilla-3.2. :: |
88 | 112 |
89 [bugzilla] | 113 [bugzilla] |
90 host=localhost | 114 host=localhost |
91 password=XYZZY | 115 password=XYZZY |
92 version=3.0 | 116 version=3.0 |
99 baseurl=http://dev.domain.com/hg | 123 baseurl=http://dev.domain.com/hg |
100 | 124 |
101 [usermap] | 125 [usermap] |
102 user@emaildomain.com=user.name@bugzilladomain.com | 126 user@emaildomain.com=user.name@bugzilladomain.com |
103 | 127 |
104 Commits add a comment to the Bugzilla bug record of the form: | 128 Commits add a comment to the Bugzilla bug record of the form:: |
105 | 129 |
106 Changeset 3b16791d6642 in repository-name. | 130 Changeset 3b16791d6642 in repository-name. |
107 http://dev.domain.com/hg/repository-name/rev/3b16791d6642 | 131 http://dev.domain.com/hg/repository-name/rev/3b16791d6642 |
108 | 132 |
109 Changeset commit comment. Bug 1234. | 133 Changeset commit comment. Bug 1234. |