SVN / Subclipse: return from branch to trunk

I have a branch that I created from the trunk a while ago. Since I created the branch, I did not touch the trunk. Now I want to go back from the branch to the trunk. This is a very simple case since there isn't much merge. Nothing has changed in the trunk. The branch can completely replace the trunk.

As I see it I have two options:

  • Delete the connector (rename it to something else, delete it later) and rename the branch to that part.
  • Merge the branch into a trunk (move my working copy to a trunk and use the Merge command from the branch).

I'm not sure which option is preferred. It is important for me to maintain the revision context (not interrupt the revision schedule).

Any thoughts?

+2


source to share


3 answers


You really need to use the merge option. The argument to lose revision information as all changes are inside 1 would be negligible, since the merge-tracking routines will retain this information. If you still have a pre-1.5 installation, you can note the change range and branch path in the commit message.

As you haven't changed anything in the trunk, the merge will be hassle-free since you just say:

svn merge branchname <Workingcopy-Path>

      

(Of course, your working copy should be pointing to the trunk)

Replies to your comment



svn 1.4 has no merge tracking, so you should n't rollback

Why you shouldn't rename the branch to trunk:

This is simply not how you should work. In your simple setup, this will work, however, your trunk will be removed and all files will be added again, but you cannot easily track the changed files as in your action all files were added.

If you merged, only the files that you changed in the branch will be changed.

Also, all working instances from the old trunk will be invalidated (since you are working on your own it may not matter), so you need to check them again.

+4


source


In your case, I would prefer the first options. Another way about all the changes you made to the branch is applied as one revision to the trunk. Thus, you lose information on revising those changes. If you move the branch to the old version of the directory, the version information will remain unchanged.



0


source


I think the easiest way (I don't know if it's better to do it) is to use the "svn move" inorder for you to do the first option.

Copying and moving to svn should work like file operations, and these changes are also versioned.

EDIT: My answer was almost like one of the answers to previous threads mentioned by VonC, so you should take a look at this answer

0


source







All Articles