On Wed, Jan 5, 2011 at 11:30 AM, <eric.b...@barclayscapital.com> wrote:
> I'm working on porting a fairly extensive set of CVS hooks to SVN. Okay. Stop right there. When ever someone mentions "a fairly extensive set" of hooks, I start to think maybe most of what they want shouldn't necessarily be hooks. When hooks are running, the client is sitting there waiting for the results. I've been at one place where it wasn't unusual for a commit to take almost a minute for reformatting, testing, etc. Those were a group of very frustrated developers. Besides, how can you even run your tests? The hooks execute on the Subversion server, yet the working directory is on the client There's no communication between the server and client until the hooks are complete. > The issue that I'm having now is that my pre-commit hook, which runs a Perl script > that performs tests based on Test::Builder and Test::More, never show their stderr > on the console. I see it in the svn web server logs, but not on the console. The problem is that Subversion swallow STDOUT and STDERR from the hooks, and Subversion won't display STDERR unless the hook script returns a non-zero exit value, and only then, it displays it on the developer's console. That may be your problem. Do you have continuous build server like Hudson (http://hudson-ci.org)? Even if you don't need to compile code, you can use something like Hudson for running your tests. Hudson can checkout the project from the Subversion repository, run tests, and then report back the results. Moving your testing to Hudson will simplify your life and help keep a running record of your test results. Hudson won't interfere with Test::Builder and Test::More, and you'll be able to keep the test results of all of your check ins in one easy to find place. -- David Weintraub qazw...@gmail.com