My hook post-commit template calls my postcommitlog.exe to create a MyFile_LOG.txt and write to it the 3 arguments. The repository and the transaction is passed from the postcommit template.
The problem is that, after committing a file in TurtoiseSVN, there is no log created. It looks like either I do not have the permission to create a file on the repository or there is an error in my code.
My code works locally, when I Debug it and pass random arguments to it, a log file is created on my local machine. But its not working on the SVN hook.
THE TEMPLATE
\\myserver\e$\Repositories\CONRAD\hooks\postcommitlog.exe %1 %2
MY PROGRAM
using System;
using System.IO;
namespace postcommitlog
{
internal class Program
{
private static void Main(string[] args)
{
string repositories = args[0];
string transaction = args[1];
const string LOG_PATH = @"\\myserver\e$\Repositories\CONRAD\hooks\MyFile_LOG.txt";
FileInfo fileInfo = new FileInfo(LOG_PATH);
File.AppendAllText(LOG_PATH, "Repositories " + args[0]
+ "\t Transaction " + args[1] + "\t Date " + DateTime.Now.ToString("MMM ddd d HH:mm yyyy") + Environment.NewLine);
}
}
}