Created
August 18, 2012 19:21
-
-
Save zippy1981/3389200 to your computer and use it in GitHub Desktop.
SharpSvn SvnLogEventArgs.LogOrigin demo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.ObjectModel; | |
using SharpSvn; | |
namespace Test.SharpSvn.LogOrigin | |
{ | |
class Program | |
{ | |
static void Main() | |
{ | |
string url = "http://protobuf.googlecode.com/svn/tags/release-2.0.2rc1"; | |
var stopOnCopyArgs = new SvnLogArgs | |
{ | |
StrictNodeHistory = true, | |
Range = new SvnRevisionRange(SvnRevision.Head, SvnRevision.Zero), | |
Limit = 1 | |
}; | |
using (var client = new SvnClient()) | |
{ | |
var target = new Uri(url); | |
var logEvents = new Collection<SvnLogEventArgs>(); | |
client.GetLog(target, stopOnCopyArgs, out logEvents); | |
foreach (var entry in logEvents) | |
{ | |
Console.WriteLine("Log Origin {0}", entry.LogOrigin ?? new Uri("file:///NULL")); | |
Console.WriteLine("Rev: {0} Author: {1} Paths:", entry.Revision, entry.Author); | |
foreach (var path in entry.ChangedPaths) | |
{ | |
Console.WriteLine("\t{0}", path.RepositoryPath); | |
} | |
} | |
Console.Write("Press any key to continue . . ."); | |
Console.ReadKey(true); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment