Search code examples
pythongitintegrationbugzillapybugz

How to get Gitzilla to work


I have recently set up a bugzilla instance for bug tracking and would like to integrate it with git. I found Gitzilla which seemed to be awesome from its description, but I am now fed up after hours of confusion with it not working. I am running Ubuntu Natty. 1) pybugz is installed and I can access bugs using: bugz --connection my_test get 197 but I'm not sure if Gitzilla requires a default connection to be setup. not sure how? 2) I set up a /etc/gitzillarc

[/home/rewolf/git_repos/myproj/.git]
bugzilla_url:  http://server.domain/bugs/
bugzilla_user: [email protected]
bugzilla_password: coolpass
logfile: /var/log/gitzilla
user_config: allow

3) I setup the symlinks to the git hooks in ~/git_repos/myproj/.git/hooks/ 4) I try to do a commit such as: git commit -a -m "Bug 197: this is rubbish" but nothing special happens and I see absolutely no feedback. The /var/log/gitzilla logfile is empty too (and it has 777 permissions).

I just want to understand how to get it to work, and if anybody could help me I would kiss their feet (maybe not though).


Solution

  • GitZilla author here.

    Git is meant to be distributed where everyone has their own repository. Bugzilla integration makes sense with a single repository as opposed to integrating with everyone's repo.

    The use case is the following:

    • everyone has their own git repository
    • everyone pushes to a "central" repo. It is this central repo that is integrated with bugzilla.
    • the hooks (responsible for the bugzilla activity) get executed on a push.

    Since you're just doing a commit, and not a push, those hooks never execute and the gitzilla log is naturally empty.

    If you want to integrate bugzilla with your own repo (a single developer scenario), you can write your own hooks (post-commit, or even pre-commit - depending on what you're trying to do) using the gitzilla infrastructure.

    However, the easiest and most future proof method would be to set up a "central" repo with the integration provided by GitZilla and clone your personal repo from it.

    Hope that helps. You can get gitzilla answers on [email protected]