R – Unable to merge between branches in SVN due to “Invalid character ‘[]’ found in range list”

mergesvntortoisesvn

I encounter this issue pretty consistently when trying to merge a branch back into the trunk in TorstoiseSVN 1.5. Update and commit to both branch and trunk have no issue, its not until I try to merge that I get the:

Invalid character '[]' found in range list 

Sometimes it occurs only using one merge method, primarily "merge a range of revisions", which then I get around by doing a "Reintegrate a branch", its a real problem when both methods return that error effectively preventing me from merging at all.

In this context what is the range list referring to and how do invalid characters get in there?

Best Answer

The subversion code which raises that error can be inspected here. It seems to be code for parsing the svn:mergeinfo property. In other words, you have an invalid svn:mergeinfo property somewhere.

In case you have trouble finding it: use the svn command line client to list all mergeinfo properties in the project recursively like this:

svn -R propget svn:merginfo http://my.server/my/svn/project

Now examine the output and look for suspicous mergeinfo lines containing '[]' like the error states. Once you've found the files or folders with the problematic mergeinfo, you can use TortoiseSVN to fix it.

Finally the best part: blame the person responsible for the issue and go hit them with something :-) Subversion versions property changes just like file content, so the evil change will show up in the change log for the file or folder.