I am using SharpSvn DLL in PowerShell. I've got as far as updating the working local copy, but how to print the modification in the command line, the way the svn update
command works?
$es = New-Object 'System.Collections.Generic.Dictionary[string [SharpSvn.SvnUpdateResult]]
$result = New-Object -TypeName SharpSvn.SvnUpdateResult -ArgumentList $es, 0
$svnClient = New-Object SharpSvn.SvnClient
[boolean] $stat = $svnClient.Update([string]$localDir, [ref]$result)
if ($stat -eq "True") {
Write-Host " ..Done" -ForegroundColor Green
if ($result.HasRevision) {
Write-Host -NoNewLine ' Revision: '
Write-Host $result.Revision
}
There is a piece of code which I found online, but it didn't helped.
SvnUpdateArgs ua = new SvnUpdateArgs();
ua.Notify += delegate(object sender, SvnNotifyEventArgs e)
{
Console.Write(e.Action);
Console.WriteLine(e.FullPath);
};
ua = New-Object SharpSvn.SvnUpdateArgs();