Skip to content

bzr commit emails

2009 January 27
by Lionel Porcheron

When I started to use bzr, I did not find an easy way to have commit emails. I have the following setup running for more than one year now without any problem.

Get the latest revision of bzr-hookless-email :
bzr branch lp:bzr-hookless-email

Upgrading to the latest revision, will be very simple. Just go in the directory where you have your branch, and bzr pull.

Now, you need to have a cron “inspecting” your repository. I will advice to setup a /etc/cron.d/bzr-hookless-mail like this:

*/5 * * * * root /srv/bzr/bzr-hookless-mail/bzr_hookless_email.py -e mymail@example.com -r /srv/bzr

This cron will check every 5min if there is a new revision in /srv/bzr. if there is a new revision, the diff will be send to mymail@example.com.

You will receive a mail like this:

------------------------------------------------------------
revno: 121
committer: Lionel Porcheron branch nick: test
timestamp: Thu 2008-09-25 12:17:06 +0200
message:
my commit message
modified:
scripts/my_script.py
[full diff]

2 Responses Post a comment
  1. January 27, 2009

    When you wrote “commit messages”, I at first thought you meant the log messages themselves. Now I realize you were just talking about commit emails. (Which maybe you realized too, because your example commit message contains the string “my commit message”, clearly not intending to be self-referential :-) ).

  2. January 27, 2009

    Hi Karl. Thanks for pointing that. I have updated the title to be more clear.

Leave a Reply

Note: You may use basic HTML in your comments. Your email address will not be published.

Subscribe to this comment feed via RSS