Using bugzilla-tool

Bugzilla-tool is a useful tool for managing bugzilla related activities. You can do many things with it, e.g., create bugreports from local trunk and apply patches to local trunk, land patches automatically. The only thing that you have to use is your command line... The tool is located in the WebKitTools/Scripts directory, but it has some requirements.

Installing the requirements

2 required python libraries

  • Mechanize
  • ClientForm

First you need a directory for your python libs, (if you have it already, skip this)

mkdir ~/PythonLibs
export PYTHONPATH=/home/username/PythonLibs/:.

Installing mechanize without root account and easy_install

You need to checkout mechanize's source:

svn co ~/tmp/mechanize

...and copy mechanize's python libraries into your PythonLibs dir:

cp -r ~/tmp/mechanize/mechanize ~/PythonLibs

You have to do the same for installing ClientForm

svn co ~/tmp/ClientForm
cp ~/tmp/ClientForm/ ~/PythonLib

No additional python libraries are required. Now, you are able to run bugzilla-tool.


I don't want to show every bugzilla command here because it has a very good and clear help, I just want to give a simple overview about it.

Usage: bugzilla-tool [options] COMMAND [ARGUMENTS]

The list of commands:


I classify the commands into two groups as you can see on the image below

  • Commands which can be used by every developer
  • Commands which can only be used by committers and reviewers

Let's see some commands, just for example:

bugzilla-tool apply-patches

The command above applies reviewed patches from the given bug ids to the local repository. You don't need to open the bugzilla in a browser, to download the patch file and apply it manually, the script does everything for you. If you want to apply a specific patch, you can use apply-attachment command with the attachment's id.

bugzilla-tool create-bug

The command creates a bugreport in Bugzilla and files the local changes as an r?-ed patch by default.

bugzilla-tool tree-status

Prints the status list of the buildbots. e.g. “ok : Qt Linux Release”, “FAIL: Tiger Intel Release“, etc. :-)

Every command has several options, you can find these in bugzilla-tool's help.

What is the advantages of the bugzilla-tool:

  • Less administrative work.
  • It puts reviewers name automatically when you land patches.
  • Applying patches to the local directory is easy, fast and safe. (It checks for previous modifications.)
  • It can open/close bugs from just command line.

It automatizes a lot of things, I prefer to use it whenever it is possible.

Eric Seidel (not verified) - 12/15/2009 - 23:09

I'm glad you like it! By "bugzilla-tool create-patches" I think you meant "bugzilla-tool create-bug".

zoltan.horvath - 12/16/2009 - 19:12

You're right Eric! Thanks, I corrected it!

As I experienced it, some people didn't use it, because they couldn't install the requirements easily without root account, and the other reason that they didn't know about the tool. :) Maybe this post helps a little bit.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • No HTML tags allowed
  • Lines and paragraphs break automatically.

More information about formatting options

This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Fill in the blank