Trying to automate my morning ritual of updating multiple subversion working copies by using a powershell script. The svn update is working fine, but it would nice to hook into the SvnUpdateResult to show changes or any conflicts.
I've got as far as specifying the output parameter for the update result, but am not sure how to overcome the ambiguous overloads exception? I am already specifying the parameter types:
try {
Add-Type -Path "C:\Program Files\SharpSVN\SharpSvn.dll"
}
catch [System.BadImageFormatException] {
Write-Host "LFMF: You're probably using 32bit SharpSVN.dll in 64bit powershell ;-)"
}
$paths = @("Project-Trunk", "Project-Branch");
$currentPath = (Get-Location).Path
$svnClient = New-Object SharpSvn.SvnClient
foreach ($path in $paths) {
Write-Host "Updating" $path
$svnLocalPath = Join-Path $currentPath $path;
# Throws: Multiple ambiguous overloads found for "Update" and the argument count: "2".
$svnClient.Update([string]$svnLocalPath, [ref][SharpSvn.SvnUpdateResult]$result)
}
I appreciate I could just use svn client or tortoiseproc, but I'm trying to learn more about powershell.