x
Loading
 Loading
Hello, Guest | Login | Register

Making the Most of Commit Hooks with Subversion

If you’re already using Subversion for version control, extend it with commit hooks to make it a more integrated part of your development workflow.

You may well have already encountered Subversion: a centralised version control system which arose from CVS but which loses many of the bugs and awkwardnesses in CVS. If you’re not familiar with the idea, version control systems allow you to keep multiple drafts or versions of files, in a space-efficient way.

They’re just about essential if you have a project with more than one person working on it, and very useful even for solo projects. As well as allowing you to revert changes if you decide that you preferred an earlier version of something, they also act as an ad-hoc backup system.

In this article, I’m going to assume that you already use or have used Subversion, and am going to talk about improving the way in which you use it — by making use of commit hooks.

What are commit hooks?

So, what then are these commit hooks and why might you use them? Well, the process of using Subversion (or most other similar version control systems) once it’s set up goes roughly like this:

  1. User checks out a local version of the project (whatever that project may be — code, text, binary files, anything else you can keep as a file).
  2. User makes their own local changes.
  3. User commits their changes back to the repository.

It’s at that stage three that commit hooks come in. A commit hook is a script that is triggered by a repository event. The hooks I’m going to…

Please log in to view this content.

Not Yet a Member?

Register with LinuxMagazine.com and get free access to the entire archive, including:

  • Hands-on Content
  • White Papers
  • Community Features
  • And more.
Already a Member?
Log in!
Username

Password

Remember me

Forgotten your password?
Forgotten your username?
Read More
  1. The Party of Gno
  2. Intro to CUDA
  3. Helpful Tools for Software Developers
  4. The Github Hall of Fame
  5. Book'em, Github.
Featured Products
Follow linuxdlsazine