On 4/16/07, Tiago Melo <tiago.java@gmail.com> wrote:
> I'm newbie in SVN and I'm using Subclipse v.1.2.0. I have the following
> scenario here at my company:
>
> - The trunk is the main line of development and I have developers working at
> it.
> - For every major system changes we generate a branch, which is just copy of
> the trunk directory.
>
> After finish working on the branch, we want to merge all the changes on the
> branch back to the trunk. I've created the following test scenario:
>
> - The trunk has just one class called TrunkClass.java.
> - The branch has two classes: TrunkClass.java (which was obtained from the
> copy of the trunk directory) and BranchClass.java.
>
> I've done some changes at TrunkClass.java from the trunk. I've also done
> some changes at TrunkClass.java from the branch. I want to merge these
> changes from the branch back to the trunk. So after doing the merge we would
> end up with the class BranchClass.java added at the trunk directory and the
> changes made at TrunkClass.java from the branch would be merged with the
> changes at the same class from the trunk, right? No! In fact, the
> BranchClass.java was added to the trunk, but we've lost the changes that
> we've done at TrunkClass.java from the trunk! This class was replaced with
> the one from the branch!
>
> When doing the merge, I'm selecting the trunk's url at the FROM field with
> HEAD revision and I'm selecting the branch's url at TO field with HEAD
> revision.
>
> Once again, all that I want to do is to generate a branch based on the
> trunk, do some changes at the branch and then merge this changes back to the
> trunk.
>
> Does anybody can help me saying what is going wrong at the merge process
> that I'm doing?
By supplying the trunk as the From location and the branch as the To
location you are telling Subversion to merge the differences. This
would mean removing the changes that happened on trunk. What you want
is a WC from trunk. Then specify the branch URL as the from and to
location. Then use the button to select the revision range from trunk
you want to merge. This should include all revisions except the one
where the branch was created. This tells Subversion to apply the
changes made on the branch to the working copy.
--
Thanks
Mark Phippard
http://markphip.blogspot.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subclipse.tigris.org
For additional commands, e-mail: users-help@subclipse.tigris.org
Received on Mon Apr 16 19:31:26 2007