Subversion hooks eat STDOUT. After running the script, there is no STDOUT. You can't even have a pre-commit script send STDOUT to another process.
However, inside the pre-commit binding, STDOUT still exists and can be redirected. For example, my hook consists of a shell script consisting of several lines of Unix command line utilities. Each command line utility has STDIN and STDOUT, and I can connect from one to the other. But, once this script hook completes execution, STDOUT will not.
Another thing is that it is not possible to bind STDOUT using the hook paradigm. Subversion does not provide any connection. There is a link for STDERR, but only if the hook itself does not work. If you think this is a hook for pre-fixing, I doubt that you intentionally want to fail this hook to give the user a report.
What you can do is use other notification methods. Some people offered email. You can run a post-commit script to create a report and email this report based on the user's email address. I would not do this as a pre-commit trigger because you do not want the transaction to fail because the report did not work.
Some people have suggested that you can map the commit user to the user's email address and email. I would not do this because users simply ignored the message. They already receive dozens, if not hundreds of letters from various processes warning them about one or another.
I would recommend using a product like Hudson for continuous builds, and this report is generated by Hudson and posted to the build page created by Hudson. In this way, the developer can come back and study the report. In fact, Hudson already has various plugins that perform error checking and create all kinds of beautiful reports and graphs (usually work with findbugs or other similar projects).
One of the most interesting plugins is a game in which points are awarded for successful assemblies, bug fixes and warnings, etc. This is a leading board, so developers can compare their score with other developers. I have never used it, but some people from the Hudson user group claim that the developers are very competitive in their ratings.
David W.
source share