SVN and commit emails

First of all, almost all of the problems I’ve had with SVN have been caused by the scripts used to send commit emails. My favorite problem is when you commit a lot at once and the script simply dies because various parts of the email infrastructure aren’t equipped to deal with “a lot” of message length (i.e., 10s of megabytes or more).

Version 2.0 of the commitmessage python scripts has an option called summaryThreshold which can cope with this. I suggest you install and use it, which I just did.

Now, during the installation process, I had a hickup. I tried to test the new script as follows:

sudo -u www-data ./post-commit /var/lib/svn/REPO 1

and it worked. Great! Then I tried to commit something new, and it hung for a long long time before eventually causing the SVN client to core dump (very classy; my other big complaint about SVN is that the client will often dump core and terrify me when the server is actually doing just fine). I have WebSVN configured for my REPO, so I went to have a look. To my surprise, the “author” category was blank for some of my commits, including the most recent ones. When I tried to invoke the post-commit script manually, it would only succeed if given a revision number for which there is an author.

The SVN FAQ told me about situations where there is no author for a commit. This happens when anonymous commits are allowed, since it’s impossible to tell who the author is. It turns out I had anonymous commits enabled, as I was working with a toy repository. So, if *=rw exists in the access file, meaning anybody can read or write to the repository, then SVN does not keep track of an author. The commit script cannot cope with this. I have no solution other than to enable access control, which is what I really want anyways, so no big deal.


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s