views:

43

answers:

2

I want to copy the exact data/files from /trunk to /branches/xyz How can i do that?

I tried to use merge from /trunk to branches/xyz but now sure whats going wrong some changes are alwasy missing in branch/xyz. How to find which revision is missing in /brances/xyz

+2  A: 

To simply copy a branch, use the SVN copy command to copy from /trunk to /branches/xyz. It will take an exact copy of the trunk as it was when you do the copy (it doesn't actually copy anything until you change a file - copy-on-write methodology.)

svn copy svn://localhost/repository/trunk svn://localhost/repository/branches/xyz

(substitute svn://localhost/repository with your repository URL.)

If you try to do a merge to create the copy, you'll only merge the changes in the range of revisions you select, possibly explaining the missing files.

To re-merge everything that's missing once the branch has been copied, you can use merge tracking in Subversion 1.5+. As long as your repository is using the 1.5+ format (it will be unless you upgraded from 1.4 and haven't run svnadmin upgrade) you can merge everything committed into the trunk from the date the branch was created, and Subversion will only merge what it hasn't already.

Andy Shellam
+1  A: 

When stuff's missing it often means you got your start/end revision range wrong.

On the trunk, merge range 0 - HEAD as your revision range to make sure you get everything included.

In SVN you're not just merging the "latest" content because you're merging from branch A to branch B, you're always merging a range of revisions from branch A to branch B.

Brian