You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Kevin <he...@gmail.com> on 2007/11/28 13:47:23 UTC
Mono post-commit silent failures
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!
Thanks!
Kevin
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Mono post-commit silent failures
Posted by Karl Fogel <kf...@red-bean.com>.
Karl Fogel <kf...@red-bean.com> writes:
> Kevin <he...@gmail.com> writes:
>> Hi Karl, thanks for the quick response, I changed my command to spawn
>> from a sudo (and made the necessary NOPASSWD lines in /etc/sudoers)
>> and everything worked. It is unfortunate that Apache or the OS has
>> such poor diagnostics -- I didn't see errors anywhere in any logs!
>>
>> Thanks for your help.
>
> Don't just tell me -- tell the list! :-)
Oops -- sorry, everyone. Due to pilot error, I thought Kevin had
replied only to me, when in fact he *did* copy the list too.
-Karl
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Mono post-commit silent failures
Posted by Karl Fogel <kf...@red-bean.com>.
Kevin <he...@gmail.com> writes:
> Hi Karl, thanks for the quick response, I changed my command to spawn
> from a sudo (and made the necessary NOPASSWD lines in /etc/sudoers)
> and everything worked. It is unfortunate that Apache or the OS has
> such poor diagnostics -- I didn't see errors anywhere in any logs!
>
> Thanks for your help.
Don't just tell me -- tell the list! :-)
Thanks,
-Karl
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Mono post-commit silent failures
Posted by Kevin <he...@gmail.com>.
Hi Karl, thanks for the quick response, I changed my command to spawn
from a sudo (and made the necessary NOPASSWD lines in /etc/sudoers)
and everything worked. It is unfortunate that Apache or the OS has
such poor diagnostics -- I didn't see errors anywhere in any logs!
Thanks for your help.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Mono post-commit silent failures
Posted by Karl Fogel <kf...@red-bean.com>.
Kevin <he...@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