简体   繁体   中英

error reintegrating branch to trunk with Tortoise and SVN

Im trying to reintegrate a branch into the trunk and it keeps telling me a revision in the trunk is missing from the branch, but when i try to merge the revision to the branch, it shows nothing needed to be merged. I am using VisualSVN in vs2010, but even just going directly to the source folders and using Tortoise i get the same error.

error: 在此处输入图片说明

merge log when i try to go back and merge the already merged revision (this is a pic from the branch, trying to merge revision from the trunk) 在此处输入图片说明

This is the revision log of the branch: 在此处输入图片说明

and this is the revision log from the trunk: 在此处输入图片说明

There are two ways I have resolved this:

(1) In your trunk, make a white space change to the file in question and commit it to trunk. Then merge this change into your branch. This should force the mergeInfo property on your branch for this file to update it's ending range to the latest revision.

This will only work when the MergeInfo of the file in question doesn't have a gap in it:

/trunk/[path to file on HD]:750-763.

This will force the mergeinfo to look like this after you get an update from trunk:

/trunk/[path to file on HD]:750-791.

If there is a gap it won't work:

/trunk/[path to file on HD]:750-755, 766-788.

It will just update the last range, 766-788 to 766-791, still skipping the revision in question. In this case you will have to do option 2.

(2) I would only suggest doing this if you are 100% sure the missing revisions are in fact in your branch and the file in question is identical in both the trunk and branch. Otherwise this could cause changes to be lost upon reintegrating your branch back to your trunk.

In your local copy of your branch, navigate to the folder/file in question, right click, select properties in the tortoise svn menu. Highlight the "svn:mergeinfo" property and click "Edit".

Since you know the change is already in your branch, change the range of the merged revisions from your trunk to force it to include the missing revision:

/trunk/[path to file on HD]:750-755, 764, 766-788.

Commit this mergeinfo property change to your branch. When you go to reintegrate this branch back into trunk, you should no longer have any errors.

If there are changes to the file between your trunk and branch, you're going to have to add the differences to your branch when you commit so you don't remove them from your trunk when you reintegrate your branch.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM