If you try to reintegrate your branch to trunk and you see errors like this from TortoiseSVN:
Click on the error text and press CTRL + A, CTRL + C to copy all the text.
Paste the text into the here-string of this PowerShell script:
@"
Command: Reintegrate merge http://svn.cloudcorp.com/branches/myproject into C:\Users\iain\Documents\Repositories\CloudCorp\trunk
Error: Reintegrate can only be used if revisions 18089 through 18612 were previously
Error: merged from http://svn.corp.skyscanner.local/svn/SkyScannerDatabase/trunk to
Error: the reintegrate source, but this is not the case:
Error:
Error: branches/myproject/userdata/usermanagementservice
Error:
Error: Missing ranges:
Error: /trunk/userdata/usermanagementservice:18365,18404
Error:
Error: branches/myproject/userdata/auto_create_db.sql
Error:
Error: Missing ranges:
Error: /trunk/userdata/auto_create_db.sql:18406
Error:
Error:
Error: branches/myproject/userdata/create_audit_tables_triggers_uds.sql
Error:
Error: Missing ranges:
Error: /trunk/userdata/create_audit_tables_triggers_uds.sql:18406
"@ -split "`n" |
? { $_ -match ('Error: +branches') } |
% { $_.Substring($_.IndexOf('userdata')) } |
% { "svn propdel svn:mergeinfo $_" }
The script extracts the relative paths of files with problem mergeinfo and outputs a list of commands to fix each one.
You may have to change the 'userdata'
value to suit your repository structure.
Execute the script to output the commands you need to remove the problem mergeinfos.
In this example, the script would produce this output:
svn propdel svn:mergeinfo userdata/usermanagementservice
svn propdel svn:mergeinfo userdata/auto_create_db.sql
svn propdel svn:mergeinfo userdata/create_audit_tables_triggers_uds.sql
At the command prompt you can navigate to the branch base (myproject) and execute the commands to delete the problem mergeinfos.
You should see output like this:
property 'svn:mergeinfo' deleted from 'userdata\usermanagementservice'.
property 'svn:mergeinfo' deleted from 'userdata\auto_create_db.sql'.
property 'svn:mergeinfo' deleted from 'userdata\create_audit_tables_triggers_uds.sql'.
As in Gray's answer, now you should commit the changes to the branch and try to reintegrate again. This time it should work!