changeset 9054:84be8a8cc8b0

bugzilla: wrapped docstrings at 78 characters
author Martin Geisler <mg@lazybytes.net>
date Tue, 07 Jul 2009 23:54:42 +0200
parents 6d0b5d76e76d
children 8da4e1d5bef2
files hgext/bugzilla.py
diffstat 1 files changed, 42 insertions(+), 50 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/bugzilla.py	Tue Jul 07 23:54:42 2009 +0200
+++ b/hgext/bugzilla.py	Tue Jul 07 23:54:42 2009 +0200
@@ -7,77 +7,69 @@
 
 '''hooks for integrating with the Bugzilla bug tracker
 
-This hook extension adds comments on bugs in Bugzilla when changesets
-that refer to bugs by Bugzilla ID are seen. The hook does not change
-bug status.
+This hook extension adds comments on bugs in Bugzilla when changesets that
+refer to bugs by Bugzilla ID are seen. The hook does not change bug status.
 
-The hook updates the Bugzilla database directly. Only Bugzilla
-installations using MySQL are supported.
+The hook updates the Bugzilla database directly. Only Bugzilla installations
+using MySQL are supported.
 
-The hook relies on a Bugzilla script to send bug change notification
-emails. That script changes between Bugzilla versions; the
-'processmail' script used prior to 2.18 is replaced in 2.18 and
-subsequent versions by 'config/sendbugmail.pl'. Note that these will
-be run by Mercurial as the user pushing the change; you will need to
-ensure the Bugzilla install file permissions are set appropriately.
+The hook relies on a Bugzilla script to send bug change notification emails.
+That script changes between Bugzilla versions; the 'processmail' script used
+prior to 2.18 is replaced in 2.18 and subsequent versions by
+'config/sendbugmail.pl'. Note that these will be run by Mercurial as the user
+pushing the change; you will need to ensure the Bugzilla install file
+permissions are set appropriately.
 
 Configuring the extension:
 
     [bugzilla]
 
-    host       Hostname of the MySQL server holding the Bugzilla
-               database.
+    host       Hostname of the MySQL server holding the Bugzilla database.
     db         Name of the Bugzilla database in MySQL. Default 'bugs'.
     user       Username to use to access MySQL server. Default 'bugs'.
     password   Password to use to access MySQL server.
     timeout    Database connection timeout (seconds). Default 5.
-    version    Bugzilla version. Specify '3.0' for Bugzilla versions
-               3.0 and later, '2.18' for Bugzilla versions from 2.18
-               and '2.16' for versions prior to 2.18.
+    version    Bugzilla version. Specify '3.0' for Bugzilla versions 3.0 and
+               later, '2.18' for Bugzilla versions from 2.18 and '2.16' for
+               versions prior to 2.18.
     bzuser     Fallback Bugzilla user name to record comments with, if
                changeset committer cannot be found as a Bugzilla user.
-    bzdir      Bugzilla install directory. Used by default notify.
-               Default '/var/www/html/bugzilla'.
+    bzdir      Bugzilla install directory. Used by default notify. Default
+               '/var/www/html/bugzilla'.
     notify     The command to run to get Bugzilla to send bug change
-               notification emails. Substitutes from a map with 3
-               keys, 'bzdir', 'id' (bug id) and 'user' (committer
-               bugzilla email). Default depends on version; from 2.18
-               it is "cd %(bzdir)s && perl -T contrib/sendbugmail.pl
-               %(id)s %(user)s".
+               notification emails. Substitutes from a map with 3 keys,
+               'bzdir', 'id' (bug id) and 'user' (committer bugzilla email).
+               Default depends on version; from 2.18 it is "cd %(bzdir)s &&
+               perl -T contrib/sendbugmail.pl %(id)s %(user)s".
     regexp     Regular expression to match bug IDs in changeset commit
-               message. Must contain one "()" group. The default
-               expression matches 'Bug 1234', 'Bug no. 1234', 'Bug
-               number 1234', 'Bugs 1234,5678', 'Bug 1234 and 5678' and
-               variations thereof. Matching is case insensitive.
+               message. Must contain one "()" group. The default expression
+               matches 'Bug 1234', 'Bug no. 1234', 'Bug number 1234', 'Bugs
+               1234,5678', 'Bug 1234 and 5678' and variations thereof.
+               Matching is case insensitive.
     style      The style file to use when formatting comments.
-    template   Template to use when formatting comments. Overrides
-               style if specified. In addition to the usual Mercurial
-               keywords, the extension specifies:
+    template   Template to use when formatting comments. Overrides style if
+               specified. In addition to the usual Mercurial keywords, the
+               extension specifies:
                    {bug}       The Bugzilla bug ID.
-                   {root}      The full pathname of the Mercurial
-                               repository.
-                   {webroot}   Stripped pathname of the Mercurial
-                               repository.
-                   {hgweb}     Base URL for browsing Mercurial
-                               repositories.
+                   {root}      The full pathname of the Mercurial repository.
+                   {webroot}   Stripped pathname of the Mercurial repository.
+                   {hgweb}     Base URL for browsing Mercurial repositories.
                Default 'changeset {node|short} in repo {root} refers '
                        'to bug {bug}.\\ndetails:\\n\\t{desc|tabindent}'
-    strip      The number of slashes to strip from the front of {root}
-               to produce {webroot}. Default 0.
-    usermap    Path of file containing Mercurial committer ID to
-               Bugzilla user ID mappings. If specified, the file
-               should contain one mapping per line,
-               "committer"="Bugzilla user". See also the [usermap]
+    strip      The number of slashes to strip from the front of {root} to
+               produce {webroot}. Default 0.
+    usermap    Path of file containing Mercurial committer ID to Bugzilla user
+               ID mappings. If specified, the file should contain one mapping
+               per line, "committer"="Bugzilla user". See also the [usermap]
                section.
 
     [usermap]
-    Any entries in this section specify mappings of Mercurial
-    committer ID to Bugzilla user ID. See also [bugzilla].usermap.
-    "committer"="Bugzilla user"
+    Any entries in this section specify mappings of Mercurial committer ID to
+    Bugzilla user ID. See also [bugzilla].usermap. "committer"="Bugzilla user"
 
     [web]
-    baseurl    Base URL for browsing Mercurial repositories. Reference
-               from templates as {hgweb}.
+    baseurl    Base URL for browsing Mercurial repositories. Reference from
+               templates as {hgweb}.
 
 Activating the extension:
 
@@ -90,9 +82,9 @@
 
 Example configuration:
 
-This example configuration is for a collection of Mercurial
-repositories in /var/local/hg/repos/ used with a local Bugzilla 3.2
-installation in /opt/bugzilla-3.2.
+This example configuration is for a collection of Mercurial repositories in
+/var/local/hg/repos/ used with a local Bugzilla 3.2 installation in
+/opt/bugzilla-3.2.
 
     [bugzilla]
     host=localhost