Remove unnecessary svn:mergeinfo properties

Solution 1:

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"

Solution 2:

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.

Solution 3:

As mentioned in this thread:

  • Most empty mergeinfo ("blank") can be caused by working copy to working copy copies/moves where the source item has no explicit mergeinfo. Using propdel can be the solution unless you are using a 1.6 SVN: since 1.5.5 these WC-to-WC copies no longer create empty mergeinfo on the destination
  • an earlier svn move (rename) restructuring operation can also propagate mergeinfo, instead of leaving them at the root directory
  • there is a potential memory issue, tracked by case 3393 which will be fixed in an upcoming 1.6.2 version and back-ported in 1.5