Raj
Raj

Reputation: 2920

Svn merge selected folders from trunk into branch

Folks,

A few weeks into our project at SVN revision, say, r100, we realized that we had to create a retrospective branch from revision, say, r10. The idea being that branch off of r10 will be released as V1.0 of the product and trunk will go on to become V2.0

The project directory structure now looks like:

/svn/trunk/ProjectX/
/svn/branches/ProjectX/v1

After creating the branch, we realized that the following folders from the trunk, HEAD revision need to be migrated into the branch:

/svn/trunk/ProjectX/commonStuff

I am trying to do this as follows:

$ cd /svn/branches/ProjectX/v1
$ cd mkdir commonStuff
$ svn add commonStuff
$ svn merge https://repo.address/svn/trunk/ProjectX/commonStuff ./commonStuff

When I run the above command, it usually results in tree conflicts. This baffles me because the commonStuff does not exist in my branch yet.

Am I doing something wrong? Is there a better way to create such a branch?

Thanks for your help and insights.

-Raj

Upvotes: 0

Views: 2143

Answers (1)

Raj
Raj

Reputation: 2920

I followed tips from This post. Since the target directory did not exist in the branch, I used svn copy instead of merge. My steps were:

$ svn copy https://repo.address/svn/trunk/ProjectX/commonStuff https://repo.address/svn/branches/ProjectX/v1/commonStuff
$ svn update

Upvotes: 1

Related Questions