I am currently writing a script in Powershell that allows copying a folder in a SVN repository to another while preserving the history. An example of such command is:
svnadmin.exe dump $FromRepoPath `
| svndumpfilter.exe include --drop-empty-revs --renumber-revs --preserve-revprops $Folder `
| svnadmin.exe load --ignore-uuid $ToRepoPath
This causes an very high memory usage in Powershell. It appears that Powershell first executes svnadmin.exe and buffers the stdout from SVN admin, then executes svndumpfilter and buffers that output and finally executes svnadmin.exe.
I can work around it by creating a seperate batch file:
@echo off
svnadmin.exe dump %1 | svndumpfilter.exe include --drop-empty-revs --renumber-revs --preserve-revprops %2 | svnadmin.exe load --ignore-uuid %3
And then calling it from Powershell:
cmd.exe /c "SvnHelper.cmd $FromRepoPath $Folder $ToRepoPath"
But this feels like a nasty and unnecessary workaround.
Is there any way to tell Powershell to pass-through directly when piping instead of buffering it?