in Version Control

The Post-Commit Hook

One of the least discussed features of Subversion is the post-commit hook, or really any of the built-in hooks that Subversion offers. These hooks are executed at a variety of different times, and the one I’m focusing on is the one that is executed just after you commit changes to the repository.

Keith Casey mentioned to me one day that he could turn on “commit messages” and I inquired as to what this was. He explained that he could have Subversion mail him every time someone committed to a repository. Being someone who works with others, I thought I’d give it a shot.

Implementing the feature was actually not as hard as I thought it might be. I wrote a short script that simply got the last log entry (in verbose mode) and e-mailed it to myself with a nice wrapper. I also set it up to e-mail a member of my team. So far it looks promising; we’ll see if I need to tweak it as time goes on.

As someone who likes user-friendly design, subversion never ceases to please me with its elegance and simplicity, yet its seemingly endless power.

Frustrated with your company’s development practices?

You don't have to be!

No matter what the issues are, they can be fixed. You can begin to shed light on these issues with my handy checklist.

Plus, I'll help you with strategies to approach the issues at the organization level and "punch above your weight."

Powered by ConvertKit