Getting an SVN post-commit update hook to work

14 Oct

I’ve ALWAYS encountered some form of trouble while trying to set up a post-commit hook, and the list of prerequisites are seemingly endless when you’re trying one solution at a time off the google pages.


Therefore, here’s a list of things to check off!

  1. The post-commit file must be executable. ( chmod +x post-commit )
  2. The post-commit script should begin with the shell command. ( #!/bin/sh or #!/bin/bash )
  3. The path to the svn executable should be absolute. ( /usr/bin/svn update )
  4. If authentication is required, make sure username, password and non-interactive flags are set. ( –username USERNAME –password PASSWORD –non-interactive)
  5. Make sure the destination directory is writable by root.

Leave a Reply

Fill in your details below or click an icon to log in: 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

%d bloggers like this: