views:

64

answers:

2

I am following this tutorial that is like the hello world for post-commit

I am using unbuntu 10.04. I installed svnnotify and ran $ which svnnotify which output:

/usr/bin/svnnotify

so I changed the path in the turorial from /usr/local/bin/svnnotify to /usr/bin/svnnotify

I also tried changing the line: #!/bin/sh to #!/bin/bash since bash is the login shell in ubuntu 10.04.

I tried to run it the way the tutorial originally had it, with my changes, and combinations of the two.

Everytime the commit is successful but I get

Warning: post-commit hook failed (exit code 1) with no output.

The original way had output not found

I am very new to linux and shell scripting and have exhausted everything I can think of. What am I doing wrong?

+2  A: 

Get the script working and tested before trying to run as a commit hook. I expect that your problem is something to do with the script, maybe not being marked as executable, environment wrong, etc.. i.e. if you can't get it to run successfully from the command line, this is more of a unix/shell question and doesn't really have anything to do with SVN (yet).

Chris Thornton
A: 

I'm not sure whether this applies in the Linux world, but in the Windows versions of SVN I've used, the code which runs the hook scripts only captures STDERR. If your hook script is only writing messages to STDOUT, that would likely explain the "No Output" warning.

ThatBlairGuy