Commit Graph

56 Commits

Author SHA1 Message Date
Martin Geisler
f9635687a7 bugzilla: show usermap syntax more clearly 2011-04-01 12:05:19 +02:00
Martin Geisler
c285f18e77 bugzilla: use standard section.name notation 2011-04-01 12:03:23 +02:00
Martin Geisler
36682a123f bugzilla: prefix each config option with section 2011-04-01 12:00:57 +02:00
Martin Geisler
584b9eaf34 bugzilla: fix reStructuredText errors introduced in 4e52d7534ab2 2011-04-01 11:59:18 +02:00
Jim Hague
aee30b7a2e bugzilla: add modified XMLRPC mode that uses email to send bug comments.
If Bugzilla has its email interface configured, an email can be used
to update bugs. If the From: address in the email matches a valid user
email, Bugzillas make the update as that user. So comments attached to a
bug appear under the name of the user making the change, and the user
does not receive email about the change, exactly as if they had made
the change via the web interface.

So add a modified XMLRPC mode that uses email to modify bugs. The format
of the mails is documented in the Bugzilla email_in.pl specification.
Briefly, initial non-blank lines in the message body starting
'@<field> = <value> modify bug fields. A blank line signals the end of
the command lines, and the rest of the message is used as bug comment.

Invoke the same Mercurial user to Bugzilla user email mapping
currently used in the MySQL mode.

All other processing - checking the bug numbers, checking user ids, etc.
continues to be done via XMLRPC.
2011-03-30 09:49:45 +01:00
Jim Hague
50d39b606d bugzilla: add XMLRPC interface.
Add support for access to Bugzilla via the XMLRPC interface.

This requires a single username and password used to log in to Bugzilla,
plus the URL of the Bugzilla installation. Commit messages are added to
bugs as before, but security only permits them to be added as the
username used to log in.
2011-03-30 09:49:45 +01:00
Jim Hague
86c71c3e2f bugzilla: localise all MySQL direct access inside access class.
Prepare for the addition of other Bugzilla access methods by localising
direct MySQL database access inside an access class.

Provide a base access class largely to document the methods required for
a class implementing a particular access method.

Rename the 'bugzilla_<version>' classes to 'bzmysql_<version>' to
emphasise that they are doing access via direct manipulation of a
MySQL database.
2011-03-30 09:49:45 +01:00
Jim Hague
2813d6b869 bugzilla: keep bug IDs in set.
Bug IDs are collected into a set, and then silently converted in
filter_real_bug_ids() into a list. For consistency, keep them in
a set throughout and update the docstrings to say that.
2011-03-30 09:49:45 +01:00
Jim Hague
e369f66c45 bugzilla: rename filter_unknown_bug_ids to reflect its actual purpose.
The method really removes from the list of bugs any that already have
comment text referencing the changeset in question. Rename it to
filter_cset_known_bug_ids().
2011-03-30 09:49:45 +01:00
Renato Cunha
b6d6b8775c removed exception args indexing (not supported by py3k)
Py3k removed __getitem__ for exception classes. The correct way of
getting the exception arguments is by using the args method.
2010-07-14 23:03:21 -03:00
Dirkjan Ochtman
1a3040f895 bugzilla: revert unhelpful check-code changes, module is actually called MySQLdb 2010-02-15 09:57:11 +01:00
Matt Mackall
e8e49c5f78 bugzilla: lowercase mysqldb var 2010-01-28 22:45:04 -06:00
Matt Mackall
8d99be19f0 many, many trivial check-code fixups 2010-01-25 00:05:27 -06:00
Matt Mackall
595d66f424 Update license to GPLv2+ 2010-01-19 22:20:08 -06:00
Martin Geisler
70de345b15 hgext: enable extensions without "hgext." prefix in help texts 2009-12-22 00:50:03 +01:00
Martin Geisler
583a0ade5b bugzilla: wrap docstrings at 70 characters 2009-07-26 01:39:47 +02:00
Martin Geisler
49448c8739 bugzilla: wrap example template line 2009-07-23 00:21:46 +02:00
Martin Geisler
87f99d6b85 bugzilla: reformat list of configuration options 2009-07-23 00:20:18 +02:00
Martin Geisler
33d81f4d2a bugzilla: wrapped docstrings at 78 characters 2009-07-07 23:54:42 +02:00
Dirkjan Ochtman
c8e6583765 extensions: change descriptions for hook-providing extensions
Thanks to timeless and Dave Townsend for advice!
2009-06-24 13:42:34 +02:00
Cédric Duval
dbcec5595d extensions: improve the consistency of synopses
Trying as much as possible to consistently:
 - use a present tense predicate followed by a direct object
 - verb referring directly to the functionality provided
   (ie. not "add command that does this" but simple "do that")
 - keep simple and to the point, leaving details for the long help
   (width is tight, possibly even more so for translations)

Thanks to timeless, Martin Geisler, Rafael Villar Burke, Dan Villiom
Podlaski Christiansen and others for the helpful suggestions.
2009-06-22 15:48:08 +02:00
Benoit Boissinot
113cb64fdf bugzilla: use set instead of dict 2009-05-17 03:02:12 +02:00
Martin Geisler
750183bdad updated license to be explicit about GPL version 2 2009-04-26 01:08:54 +02:00
Matt Mackall
2f9b02c62d replace util.sort with sorted built-in
This is marginally faster for small and moderately-sized lists
2009-04-26 16:50:44 -05:00
Matt Mackall
416d312fe5 bugzilla: fix section reading 2009-04-26 16:50:43 -05:00
Martin Geisler
e2222d3c43 replace set-like dictionaries with real sets
Many of the dictionaries created by dict.fromkeys were emulating sets.
These can now be replaced with real sets.
2009-04-22 00:57:28 +02:00
Matt Mackall
371257fd73 ui: fold readsections into readconfig
readconfig now reads only single files
readconfig takes an optional list of sections
readconfig trusts files we're looking for sections in
2009-04-23 15:40:10 -05:00
Martin Geisler
c13aca4884 bugzilla: word-wrap help texts at 70 characters 2009-04-04 23:15:23 +02:00
Jim Correia
78e5b53d7d add --git option to commands supporting --patch (log, incoming, history, tip)
No short -g form, since it would conflict with -g from the graphlog extension.
2009-02-14 22:40:39 +01:00
Jim Hague
14ec6b1413 Bugzilla 2.18 and on use contrib/sendbugmail.pl, not processmail.
During 2.17, Bugzilla ditched the old 'processmail' script. With 2.18
contrib/sendbugmail.pl arrived in its place.

For notification emails to work properly, sendbugmail.pl requires as
its second parameter the Bugzilla user who made the commit. Otherwise
the user will not be recognised as the committer, and will receive
notification emails about the commit regardless of their preference
about being notified on their own commits. This parameter should be given
to processmail also, but wasn't for historical reasons.

Add new config with the local Bugzilla install directory, and provide
defaults for the notify string which should work for most setups.
Still permit notify string to be specified, and for backwards
compatibility with any extant notify strings try first interpolating
notify string with old-style single bug ID argument. Add new 2.18
support version to introduce sendbugmail.pl.

In other words, this update should be backwards-compatible with existing
installations, but offers simplified setup in most cases. And as a bonus
Bugzilla notification emails will be dispatched correctly; notifiers will
not receive an email unless configured to do so.
2009-01-09 22:15:08 +00:00
Jim Hague
463ab45a63 Revise Bugzilla module comments into extension help.
Revise the comments detailing module usage at the start of the Bugzilla
extension into extension help text.

Expand the detail given on extension settings, in an attempt to permit
the user to configure successfully without having to study the extension
code. Show a sample configuration as well.
2008-12-10 16:29:53 +00:00
Jim Hague
791ab1df7d Fix Bugzilla integration to work with new Bugzilla 3.2.
Bugzilla 3.2 changes the type of all MySQL tables it uses from MyISAM
to InnoDB. MyISAM does not support transactions, and performs an implied
commit after each update. InnoDB does support transactions, and so
exposes a bug where changes to the Bugzilla database were not committed,
and so with 3.2 are lost when the database connection closes.
2008-12-09 09:58:13 +00:00
Dirkjan Ochtman
9ef9b3e5db cmdutil: use change contexts for cset-printer and cset-templater 2008-11-14 13:59:25 +01:00
Benoit Boissinot
ea7fe6dacc remove unused variables 2008-10-28 19:25:26 +01:00
Jim Hague
788364de51 Add support for Bugzilla 3.0 series to bugzilla hook.
The only difference is 'fieldid' in table 'fielddefs' got renamed
to 'id' for 3.0.
2008-08-29 20:36:55 +01:00
Matt Mackall
a65ef7bc5d util: add sort helper 2008-06-27 18:28:45 -05:00
Matt Mackall
fbb5127472 use repo[changeid] to get a changectx 2008-06-26 14:35:46 -05:00
Dirkjan Ochtman
2f149e4634 replace usage of os.popen() with util.popen()
To make this possible, I added a mode parameter to both implementations of
util.popen(), defaulting to 'r' (as it does in the Python stdlib).
2008-04-14 14:34:38 +02:00
Joel Rosdahl
5dae3059a0 Expand import * to allow Pyflakes to find problems 2008-03-06 22:23:26 +01:00
Matt Mackall
a849fab9e4 templater: move email function to util 2008-01-31 14:44:19 -06:00
Bryan O'Sullivan
dedbe183d4 Fix typo in bugzilla extension. 2007-05-08 11:51:16 -07:00
Benoit Boissinot
dfdfde18a2 bugzilla: use contexts, simplify 2006-12-26 03:25:13 +01:00
Matt Mackall
296d6a7cb8 Simplify i18n imports 2006-12-14 20:25:19 -06:00
Matt Mackall
f17a4e1934 Replace demandload with new demandimport 2006-12-13 13:27:09 -06:00
Matt Mackall
2623870448 Remove deprecated old-style branch support 2006-12-12 18:16:23 -06:00
Matt Mackall
a3525dd4cb update bugzilla extension to use ui buffers 2006-12-01 01:29:14 -06:00
Matt Mackall
c50c09da0a templates: move changeset templating bits to cmdutils 2006-11-13 13:26:57 -06:00
Alexis S. L. Carvalho
753a94bc88 use ui.readsections in the bugzilla extension 2006-10-17 17:04:26 -03:00
Vadim Gelfer
25b53cf653 bugzilla: allow to map between committer email and bugzilla user name. 2006-05-18 09:23:43 -07:00
Vadim Gelfer
42391c45d8 bugzilla hook: skip empty groups. 2006-05-09 14:39:56 -07:00