SVN merge reintegrate missing ranges but nothing to merge

自作多情 提交于 2019-12-05 05:11:14

I just ran into something similar, where the issue was that trunk had had two cancelling revisions (i.e., rev 20865 on trunk undid rev 20857). So when I first merged from trunk to branch, it didn't have anything to merge for this pair of revisions, but didn't include them in the mergeinfo for the files in question. Then when I tried to merge back from branch to trunk, it objected that these two revisions were missing.

My solution (after manually verifying that the revisions cancelled for the files in question) was to merge each of the two revisions to branch explicitly (via svn merge ^/trunk -c 20857, and svn merge ^/trunk -c 20865), commit, and then merge the branch back to trunk. The second time, it went smoothly. This was with Subversion 1.8.0 (r1490375).

I was able to get around a similar problem earlier using merge with --record-only to mark the changes as properly merged on the branch, but it's probably safer to merge the actual files (just in case there's a change that doesn't quite cancel).

Looks like a bug in the way Subversion 1.8 handles mergeinfo for cancelling changes to me.

This seemed to work for me, but I can't claim to understand it or vouch that it's the best way to resolve my problem.

First, it's important that your branch has all the latest commits to trunk. So sync it up (do a merge from trunk to branch).

Then you can essentially force a reintegrate by doing this in the trunk directory: svn merge http://svn.e.com/repos/trunk/@REV http://svn.e.com/repos/branches/lih/ . --dry-run (but replace REV with the latest revision #).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!