First of all I'm not sure this is even possible, however I need to know how it can be done and if not why not?
I want to create a C# application that runs at the appropriate time during the commit process of a subversion repository (pre-commit I believe) that will then add another file to be committed.
For example, I make changes to Program.cs, and Main.cs, but NOT AssemblyInfo.cs. I want to be able to force a change to AssemblyInfo.cs or any file for that matter.
I wrote a console application using SharpSVN that fired on post-commit, which then replaced a file, but this caused an increment in the revision number. Obviously that's not ideal.
I then found SvnLookClient within SharpSVN that runs on pre-commit and have started writing something, but hit a dead end when I realised CopyFromPath didn't mean what I expected:
using (SvnLookClient client = new SvnLookClient())
{
SvnLookOrigin o = new SvnLookOrigin(@"\\server\repository");
SvnChangedArgs changedArgs = new SvnChangedArgs();
Collection<SvnChangedEventArgs> changeList;
client.GetChanged(o, changedArgs, out changeList);
}
Alternatively, I will settle for doing this outside of C#, but ideally I'd like to do it in a C# console application so that I can also tell my repository server to perform other tasks like running in database scripts, etc.