Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private static void fakeFunction()
- {
- var RootPath = @"d:\";
- var appPath = @"e:\svnversion.exe";
- using (var client = new SharpSvn.SvnClient())
- using (var workingClient = new SvnWorkingCopyClient())
- {
- SvnWorkingCopyVersion workingVersion = null;
- long wVersion;
- if (GetVersionHack(appPath, RootPath, out wVersion)
- /*workingClient.GetVersion(RootPath, out workingVersion)*/)
- {
- //var CurrentRevision = workingVersion.End;
- // This will resolve just fine
- var targetUri = client.GetUriFromWorkingCopy(RootPath);
- var target = SvnTarget.FromUri(targetUri);
- SvnInfoEventArgs info = null;
- if (client.GetInfo(target, out info))
- {
- if (/*workingVersion.End*/wVersion != info.Revision)
- {
- System.Collections.ObjectModel.Collection<SvnLogEventArgs> logEventArgs = null;
- if (client.GetLog(targetUri, out logEventArgs))
- {
- var oldBack = Console.BackgroundColor;
- var oldFor = Console.ForegroundColor;
- Console.BackgroundColor = ConsoleColor.DarkMagenta;
- Console.ForegroundColor = ConsoleColor.White;
- foreach (var l in logEventArgs)
- {
- Console.WriteLine("[{0}-{1}]-{2}", l.Revision, l.Author, l.LogMessage);
- }
- Console.BackgroundColor = oldBack;
- Console.ForegroundColor = oldFor;
- }
- System.Console.WriteLine("Repo not up to date.");
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement