How to handle SVN merge after I moved some directories in a branch?

Suppose I have the following:

trunk/ |-+ d1/ | |-- bar.c | \-- foo.c \-+ d2/ \-- baz.txt 

I do svn cp trunk branch and commit.

Now I am doing some cleaning in branch .

 $ svn mkdir src $ svn mv d1 src/ $ svn commit $ edit src/d1/foo.c $ svn commit 

This leaves me with the following in branch

 branch/ |-+ d2/ | \-- baz.txt \-+ src/ \-+ d1/ |-- bar.c \-- foo.c 

Meanwhile, some changes have occurred in trunk (editing foo.c and bar.c ).

Now, philosophically, I want the branch directory structure to be reflected in the trunk , and I want the changes I made to its files to be there too. But I also want the changes that occurred in the trunk when I was working. So I want to combine the contents of trunk/d1/foo.c and branch/src/d1/foo.c

Merging in either direction ( trunk to branch or branch to trunk ) gives me a ton of tree conflicts. Is there a better way to continue than running svn info in every conflict and resolving issues carefully and manually?

+4
source share
2 answers

@lvmisooners answer is out of date now; for comments on this blog, the entire article is not related to SVN 1.5.

In general, they often merge from the trunk to the branch. Then in the end - expand the branch into the trunk and never use this branch again, for http://svnbook.red-bean.com/en/1.7/svn.branchmerge.advanced.html Actually, you can reuse the branch if You will follow Maintaining the reintegrated branch on this page.

0
source

Source: https://habr.com/ru/post/1396668/


All Articles