Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to svn-merge a directory into a branch where it originally didn't exist

Tags:

merge

svn

Suppose the following structure on an svn server:

-svn-|
     |-trunk --- |
     |           | - dirA
     |           | - dirB
     |
     |-branches -|
                 | - foo - |
                           | - dirA

At a revision X, the foo branch was created from the trunk. Some time later at revision Y, directory dirB was created in the trunk. Now, at revision Z, i want to integrate dirB (rev Z) into the foo branch.

I tried:

md dirB
svn add dirB
svn merge --dry-run --force ssh://server/svn/trunk/dirB dirB

and

svn merge -rY:Z--dry-run --force ssh://server/svn/trunk/dirB dirB

and also

cd dirB
svn merge --dry-run --force ssh://server/svn/trunk/dirB .

Everytime I get

Summary of conflicts:
  Tree conflicts: 34

How to do this merge?

like image 469
Philipp Avatar asked Nov 11 '10 16:11

Philipp


1 Answers

Make sure that you're in working copy dirA

cd branches/foo/dirA

Merge dirB into foo/dirA

svn merge ssh://server/svn/trunk/dirB .


EDIT:
Branches are created using svn cp:

svn cp ssh://server/svn/trunk/dirB ssh://server/svn/branches/foo/dirB -m"dirB branch created"
like image 68
zellus Avatar answered Oct 17 '22 19:10

zellus