We have a script to delete the svn:mergeinfo property from all folders inside a Subversion working copy, but not the working copy root directory itself. It's currently an NAnt build script invoked via a separate batch file, so I'm trying to replace it with a simpler PowerShell script. I've had three attempts at it, ranging from the naïve to the slightly more sophisticated. All three fail my criteria, outputting the line property 'svn:mergeinfo' deleted from '.'.
Checking the SVN properties of the working copy root indicates that the svn:mergeinfo property has indeed been removed from this folder which is not what I want. Each version is designed to be run from the working copy root.
Attempt 1:
# I understand why this one fails, it's a poor attempt.
Get-ChildItem -Recurse | svn propdel svn:mergeinfo -R $_
Attempt 2:
# This one correctly lists everything except the working copy root, but
# still removes the svn:mergeinfo property from the working copy root.
Get-ChildItem -Recurse -Exclude $pwd | svn propdel svn:mergeinfo -R $_
Attempt 3:
# Again, this one works fine until the svn propdel is added.
Get-ChildItem | ForEach-Object { ls -R $_ } | svn propdel svn:mergeinfo -R $_
Any thoughts on where the flaw in my logic is?