0

I have a subversion repository on my Linux machine that is set up to export a new build of a project every time a new commit occurs using a post-commit hook. I would really like to be able to provide an output message to the committer containing some status information once the hook completes. Is it possible to redirect the output of the hook to come after the standard commit messages?

For example:

owner@dev-machine:/working/dir$ svn commit
Sending FILE1
Sending FILE2
Transmissing file data ...
Committed revision 13.
Exporting project...
Successfully exported to mysite.com

The addition of the last two lines is the functionality I'm looking for.

0

According to the documentation, the only way to output anything to the client from post-commit is to write to standard error and then exit with a non-zero status. However, this will result in output like the following:

Committed revision 200.

Warning: post-commit hook failed (exit code 1) with output:
Exporting project...
Successfully exported to mysite.com 
  • Well, that's a bummer, but thanks for the workaround! – Salis Apr 13 '10 at 3:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.