[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Mono post-commit silent failures

From: Karl Fogel <kfogel_at_red-bean.com>
Date: 2007-11-28 20:51:47 CET

Kevin <hellosticky@gmail.com> writes:
> Hi, I have post-commit scripts in python and perl without issue, now
> writing one in C# using mono as so:
>
> #!/bin/sh
>
> echo `date` >> /tmp/out.txt
> /usr/local/bin/mono /var/www/svn/svneverything/hooks/test.exe >>
> /tmp/out.txt 2>&1
> echo `date` >> /tmp/out.txt
>
> Then I have a simple C# file test.cs:
>
> using System;
>
> public class Program
> {
> public static void Main(String[] args)
> {
> Console.WriteLine("here");
> }
> }
>
> I compiler with:
>
>> gmcs test.cs
>
> If I tail /tmp/out.txt during a commit, I see the first echo date,
> then nothing and then the second echo date. If I just run manually
> using ./post-commit.cs, it works fine, printing the date, then "here,"
> and the date.
>
> If I do for example /usr/local/bin/mono -help >> /tmp/out.txt 2>&1
>
> It works, printing the mono help information, so clearly I can execute
> /usr/local/bin/mono.
>
> I have two questions that I would greatly appreciate help on:
>
> 1. Does anyone know why this is not working from a remote commit
> (through apache by the way)
> 2. Where can I look for error or diagnostic information to understand
> the root cause of the problem? I am redirecting stderr and still don't
> see anything!

Try writing to a file in /tmp, just to make sure it's running? And if
you run your mono program in a scrubbed environment, does it still
work? See http://subversion.tigris.org/faq.html#hook-debugging.

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Nov 28 20:54:41 2007

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.