Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

svn: copy branch to trunk

Tags:

svn

I have an SVN project with a branch I'm working on, and an empty trunk:

myproject/
  branches/
    mybranch/
      {there's stuff here}
  tags/
  trunk/

How can I copy the contents of mybranch into the trunk? TortoiseSVN complains that there's already a trunk directory. I could delete the (empty) trunk from the repository and then do a copy, but that seems wrong somehow...


clarification: I have a trunk which I intentionally left empty. My "mybranch" is all checked in. In the repo-browser, TortoiseSVN gives me a "copy" option but not a merge option.

If merging is the right thing to do, what do I do? Do I check out the empty trunk and then merge into that working copy, then check back in?


update: Merge won't work either; SVN complains the two "branches" (branches/mybranch and trunk) are not ancestrally related.

like image 389
Jason S Avatar asked Jul 21 '10 18:07

Jason S


1 Answers

I'd do what you mentioned, delete the trunk and then copy the branch. It is a little wrong, but it's because you didn't copy to make the branch in the first place.

like image 51
Kirk Kelsey Avatar answered Sep 27 '22 16:09

Kirk Kelsey