Subversion can't merge after a move

对着背影说爱祢 提交于 2019-11-29 03:11:54

To answer your question directly:

Is there a way to make Subversion do the revision management, or am I going to be manually merging this guy’s changes for the next two days?

You should be able to make it a little bit easier on yourself.

One thing that you can do to alleviate some of the pain (assuming a layout as follows)

/branch/foo/src/com
/branch/foo/test/com
/trunk/src/main/java/com
/trunk/src/test/java/com

Before you moved src/com to src/main/java/com and test/com to src/test/java/com you could have done:

cd $TRUNK
svn merge -r N:M http://server/branch/foo .

What you could do now is:

cd $TRUNK
svn merge -r N:M http://server/branch/foo/src/com src/main/java/com
svn merge -r N:M http://server/branch/foo/test/com src/test/java/com

Hope this helps to save you some time.

This sounds like a one-time problem. I suggest you could use svn diff > /to/some/file.patch (or normal diff) to save his changes to a file, then apply it on your moved trunk with patch -p0 < /to/some/file.path.

Anyone tried this software? xMerge

This is plugin to SmartSVN but looks like it do the trick. If anyone is using it I will be grateful if send me review of it.

I just had the same problem and I solved it with git. I didn't want to merge serveral modules with svn merge -r N:M http://server/branch/foo/test/com src/test/java/com for src/main, src/test and resources.

So I used git svn clone file:///some/repo -T trunk -b branches -t tags. Like this I was able to keep git master in sync with svn trunk and merge it with my git branch. When I was done, I merged the git branch to git master and from there to svn trunk.

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