Here is another way to delete all sub tree svn:mergeinfo properties but not at the root folder (this is needed for branching to work properly).
From the root of the project do:
svn propdel svn:mergeinfo -R
svn revert .
svn ci -m "Removed mergeinfo"
Here is a way to delete all subtree svn:mergeinfo properties. Run it inside the root of your repository:
svn propget svn:mergeinfo --depth=infinity
| grep -v "^/"
| grep -v "^\."
| cut -d- -f1
| xargs svn propdel svn:mergeinfo
All in one line for easy copy/pasting:
svn propget svn:mergeinfo --depth=infinity | grep -v "^/" | grep -v "^\." | cut -d- -f1 | xargs svn propdel svn:mergeinfo
To preview which files this will effect before you run it, change the last "propdel" to "propget" or remove the last xargs pipe altogether.
As mentioned in this thread:
As I am not confident with blind svn:merge-info
property deletion, I have implemented a tool to analyze the current situation on a working copy and remove as much merge revisions as possible from non-root merge-info properties. After additional human checks and controls, the changes on the working copy can be committed.
Here it is: svn-clean-mergeinfo
Do not hesitate to report any issue about its usage to get it improved.
Subversion 1.10 introduces a new tool dedicated to that task: svn-mergeinfo-normalizer
I know it's been a while, but I ran into a similar problem. I'm using TortoiseSVN 1.6.7. It just so happened that the property was on the root of my working copy. When I viewed the properties on the root and clicked Remove on svn:mergeinfo, it asked me if I want to remove it recursively. This got rid of all of my svn:mergeinfo cockups.
If you're sure you want to mass-remove mergeinfo properties, you can use the following BASH script.
FILES=`svn status |grep "^ M " |sed s/" M "// |tr '\n', ' '`
svn revert $FILES
It gets a list of changed files, filters it to just mergeinfo only changes, strips everything but the actual file path, converts the one-per-line paths into a space delimited list, and the calls revert on that list.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With