From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1G28gX-0006JS-Sm for garchives@archives.gentoo.org; Sun, 16 Jul 2006 15:37:34 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.7/8.13.6) with SMTP id k6GFa0U8024819; Sun, 16 Jul 2006 15:36:00 GMT Received: from aaar.vm.bytemark.co.uk (aaar.vm.bytemark.co.uk [80.68.92.230]) by robin.gentoo.org (8.13.7/8.13.6) with ESMTP id k6GFWbCV001846 for ; Sun, 16 Jul 2006 15:32:37 GMT Received: from qoo.home (bb-87-81-240-59.ukonline.co.uk [87.81.240.59]) (using SSLv3 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by aaar.vm.bytemark.co.uk (Postfix) with ESMTP id CF09BFB6D for ; Sun, 16 Jul 2006 16:32:35 +0100 (BST) Subject: [gentoo-dev] pybugz - python command line interface to bugzilla From: Alastair Tse To: gentoo-dev@lists.gentoo.org Content-Type: multipart/mixed; boundary="=-FdjiWesVaKhzqHdvxMRT" Date: Sun, 16 Jul 2006 16:32:32 +0100 Message-Id: <1153063952.19516.7.camel@localhost> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Reply-to: gentoo-dev@lists.gentoo.org Mime-Version: 1.0 X-Mailer: Evolution 2.6.2 X-Archives-Salt: 9118d5dd-6aab-4f78-8601-af51686f562d X-Archives-Hash: cee8846a715334242b18e1f2bec66d1d --=-FdjiWesVaKhzqHdvxMRT Content-Type: text/plain Content-Transfer-Encoding: 7bit Hi All, As a little weekend project, I wrote a command line interface to bugzilla in Python that is targetted to Gentoo's bugzilla (but also generalisable to other bugzillas with a little code modification). It can do the following: * search bugzilla and output a table of bugs: bugz search * list bug details (incl comments and attachment): bugz get * get attachments: bugz attachment * post attachments: bugz attach * modify bug: bugz modify -c "here is a new comment" --fixed I know there's gentoo-bugger, which is great, but it's in perl and I couldn't figure out how to modify the output to suit my needs. Here's the README attached if you're interested in how it might work for you to become more efficient when dealing with Gentoo's Bugzilla. You can get it either via my portage overlay in: http://overlays.gentoo.org/svn/dev/liquidx/app-admin/pybugz or as a python distutils compat tarball in http://media.liquidx.net/static/pybugz/pybugz-0.5.tar.gz Hope maybe some people might find it useful. Cheers, Alastair --=-FdjiWesVaKhzqHdvxMRT Content-Disposition: attachment; filename=README Content-Type: text/x-readme; name=README; charset=UTF-8 Content-Transfer-Encoding: 7bit PyBugz - Python Bugzilla Interface ---------------------------------- Bugzilla has a very inefficient user interface, so I've written a command line utility to interact with it. This is mainly done to help me with closing bugs on Gentoo Bugzilla by grabbing patches, ebuilds and so on. Author ------ Alastair Tse . Copyright (c) 2006 under GPL-2. Features -------- * Searching bugzilla * Listing details of a bug including comments and attachments * Downloading/viewing attachments from bugzilla * Posting comments, and making changes to an existing bug. * Adding attachments to a bug. Usage/Workflow -------------- PyBugz comes with a command line interface called "bugz". It's operation is similar in style to cvs/svn where a subcommand is required for operation. To explain how it works, I will use a typical workflow for Gentoo development. 1) Searching bugzilla for bugs I can fix, I'll run the command: --------------------------------------------------------------- $ bugz search "version bump" --assigned liquidx@gentoo.org * Using http://bugs.gentoo.org/ .. * Searching for "version bump" ordered by "number" 101968 liquidx net-im/msnlib version bump 125468 liquidx version bump for dev-libs/g-wrap-1.9.6 130608 liquidx app-dicts/stardict version bump: 2.4.7 2) Narrow down on bug #101968, I can execute: --------------------------------------------- $ bugz get 101968 * Using http://bugs.gentoo.org/ .. * Getting bug 130608 .. Title : app-dicts/stardict version bump: 2.4.7 Assignee : liquidx@gentoo.org Reported : 2006-04-20 07:36 PST Updated : 2006-05-29 23:18:12 PST Status : NEW URL : http://stardict.sf.net Severity : enhancement Reporter : dushistov@mail.ru Priority : P2 Comments : 3 Attachments : 1 [ATTACH] [87844] [stardict 2.4.7 ebuild] [Comment #1] dushistov@----.ru : 2006-04-20 07:36 PST ... 3) Now this bug has an attachment submitted by the user, so I can easily pull that attachment in: ----------------------------------------------------------------- $ bugz attachment 87844 * Using http://bugs.gentoo.org/ .. * Getting attachment 87844 * Saving attachment: "stardict-2.4.7.ebuild" 4) If the ebuild is suitable, we can commit it using our normal repoman tools, and close the bug. --------------------------------------------------------------- $ bugz modify 130608 --fixed -c "Thanks for the ebuild. Committed to portage" or if we find that the bug is invalid, we can close it by using: $ bugz modify 130608 --invalid -c "Not reproducable" Other options ------------- There is extensive help in `bugz --help` and `bugz --help` for additional options. bugz.py can be easily adapted for other bugzillas by changing BugzConfig to match the configuration of your target bugzilla. However, I haven't spent much time on using it with other bugzillas out there. If you do have changes that will make it easier, please let me know. --=-FdjiWesVaKhzqHdvxMRT-- -- gentoo-dev@gentoo.org mailing list