Bugzilla CLI client and XML-RPC binding and VCS plugins
=======================================================

Provides a CLI program and Python library for interacting with the
Bugzilla_ bug tracking system, and plugins for version control
systems that enable interaction with Bugzilla installations.

Requires Python_ 2.7 and works with Bugzilla_ 4.0 or later.

The Bazaar_ plugin requires Bazaar 2.0 or later.

``bugzilla``
------------

Command-line application for interacting with Bugzilla servers.
The following subcommands are available:

:assign:              Assign bugs to the given user.
:block:               Show or update block list of given bugs.
:cc:                  Show or update CC List.
:comment:             List comments or file a comment on the given bugs.
:config:              Show or update configuration.
:depend:              Show or update dependencies of given bugs.
:desc:                Show the description of the given bug(s).
:dump:                Print internal representation of bug data.
:fields:              List valid values for bug fields.
:help:                Show help.
:history:             Show the history of the given bugs.
:info:                Show detailed information about the given bugs.
:list:                Show a one-line summary of the given bugs.
:new:                 File a new bug.
:products:            List the products of a Bugzilla instance.
:search:              Search for bugs matching given criteria.
:status:              Set the status of the given bugs.
:time:                Show or adjust times and estimates for the given bugs.


``bzlib``
---------

Library providing access to Bugzilla instances through the XML-RPC
interface.  Supports bug creation, bug information and comment
retrieval, updating bug fields and appending comments to bugs.

Bazaar_ plugin
--------------

This plugin, when enabled for Bugzilla bugtrackers, marks bugs fixed on
those trackers when ``bzr commit`` is invoked with the ``--fixes`` argument.
It also adds a comment to the bug that includes the branch location, the
commit message, the list of changed files and other details about the commit.


.. _Bazaar: http://bazaar.canonical.com/
.. _Bugzilla: http://www.bugzilla.org/
.. _Python: http://python.org/


Installation
============

Install via ``pip`` or ``easy_install``::

  pip install bugzillatools
    -or-
  easy_install bugzillatools

Local install (make sure ``~/.local/bin`` is on your ``PATH``::

  python setup.py install --user

Global install (run as root)::

  python setup.py install

Note that global install or some manual moving of files is
required for the Bazaar plugin to be detected by Bazaar.


Configuration
=============

A configuration file is looked for at ``~/.bugzillarc``.  Its format is
INI-like; the following configuration objects are understood:

``core``
--------

``server``
  Name of the default server

``alias``
---------

Option names are aliases; their values are the replacement.

``server.<name>``
-----------------

Define a server.  bugzillatools supports multiple servers; the
``--server=<name>`` argument can be used to select a server.

``url``
  Base URL of the Bugzilla server.
``user``
  Bugzilla username.
``password``
  Bugzilla password
``assign_status``
  When the ``assign`` command is used, if the current status of a bug
  is in the first list, the status will be updated to the second item.
  The format is: ``<oldstatus>[,<oldstatus>]* <newstatus>``.  An
  appropriate value for the default Bugzilla workflow might be:
  ``"UNCONFIRMED,CONFIRMED IN_PROGRESS"``.
``default_product``
  If provided and if the provided string corresponds to the name of a
  product on this server, use that product as the default.  The user
  will still be prompted to confirm.


Example ``.bugzillarc``
-----------------------

::

  [core]
  server = example

  [server.example]
  url = http://bugzilla.example.com
  user = user@example.com
  password = sekrit

  [alias]
  fix = status --status RESOLVED --resolution FIXED
  wfm = status --status RESOLVED --resolution WORKSFORME
  confirm = status --status CONFIRMED
