Hooks
From: Gourlay, Colin <cg1_at_ebs.hw.ac.uk>
Date: Tue, 2 Sep 2008 11:02:56 +0100
Hello.
I am attempting to create a hook (pre-commit) that will stop users from committing a specific version of Microsoft Word file.
Specifically looking to block Word version 2007 which happens to have a .docx file extension and force them to commit versions in older versions with a .doc version. This is to ensure that everyone can work with the documents - irrespective of the version they have installed on their desktop.
Subversion version 1.4.4 (r25188) is running on Windows 2003 server - so attempted to put something together with DOS batch files, also tried writing a c# console application - all following the templates as a guide and with partial success, in that I am only obtaining minimal information about the transaction not the file(s) being committed.
Can anyone please help?
Sample code (c#) that I have used follows:
static int Main(string[] args)
string output = p.StandardOutput.ReadToEnd();
System.IO.StreamWriter sw = new System.IO.StreamWriter(@"D:\PreCommit.txt", true, System.Text.Encoding.Default);
if(output.Contains("docx"))
}
Edinburgh Business School is a Charity Registered in Scotland, SC026900
---------------------------------------------------------------------
|
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.