JD Isaacks
JD Isaacks

Reputation: 57974

Having trouble with post-commit hook

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

I am using Ubuntu 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.

Every time 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?

Upvotes: 1

Views: 1805

Answers (2)

ThatBlairGuy
ThatBlairGuy

Reputation: 2462

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.

Upvotes: 0

Chris Thornton
Chris Thornton

Reputation: 15817

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).

Upvotes: 2

Related Questions