tags:

views:

94

answers:

2

I'm using subeclipse plugin for eclipse for SVN. My project looks like this :

ProjectName\
- branches
- special_
- tags
- trunk

I have currently checked out project from special_ and I've modified and added one class, how can I merge the code which I updated/added to trunk ? I'll take anything into consideration

alt text

A: 

First, if the class is in a new file, you should "svn add" it. This is a local change.

Then, you commit everything. Don't forget to review every file, and to get a peer review.

Pavel Radzivilovsky
@Pavel Radzivilovsky I checkouted project from special_ I commit the changes svn add as you say and it works fine .. how do I make that same change to apply to trunk(to merge the following code to trunk as well)
London
+3  A: 

So you want to merge your change from special_ to trunk? I believe you will want to proceed like this.

  1. (Make sure that you have committed all of your changes to special_.)

  2. Team --> Switch to another branch/tag/revision... your working copy to trunk (the target of your merge operation), and resolve any conflicts that come up at this point.

  3. Team --> Merge opens a dialog where you will be performing the merge operation. Change the "From" URL to reference special_ (the source of your merge operation, i.e. what you want to merge into your working copy). "From Revision" should point to the revision in special_ where you want your merge operation to "start" from - typically the revision that was last merged in from special_ to trunk (or perhaps the head revision in your case, if you really want to merge just that latest change of yours).

  4. Set "To Revision" to point to the latest revision in special_ (= the head revision).

  5. At this point you are ready to perform the merge - Dry run command lets you preview what will happen during the merge, and Merge will perform the actual merge.

  6. Once the merge operation has been completed, you need to make sure that all changes that were performed against your working copy are ok, and resolve all conflicts.

  7. When you're done with resolving conflicts and reviewing the changes, commit the changes to trunk in a single commit operation. For your own convenience, it is strongly recommended that you add a commit message where you specifically state what this commit is for ( = merging revisions from X to Y from special_ to trunk, etc.).

Hope this helps.

Tommi