Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Subversive » Simple instructions for merging from branch to trunk?
Simple instructions for merging from branch to trunk? [message #508670] Tue, 19 January 2010 19:13 Go to next message
David M. Karr is currently offline David M. KarrFriend
Messages: 800
Registered: July 2009
Senior Member
I'm using Eclipse 3.5.1 and the Subversive plugin. I do things with the plugin every day, but I almost never have to do a merge. I now have to merge the changes I've made in two separate projects (same branch, however) back to the trunk. I cannot find clear step-by-step instructions for doing this. The doc page on the "SVN merge dialog" is not helpful at all.

In one of the two projects, I also have some changes in checked out files that I can't check in, but I still have to merge the checked-in changes on the branch back to the trunk.

Can someone give me, or find, reasonable instructions for how to do this?
Re: Simple instructions for merging from branch to trunk? [message #508812 is a reply to message #508670] Wed, 20 January 2010 07:56 Go to previous messageGo to next message
Jörg Thönnes is currently offline Jörg ThönnesFriend
Messages: 229
Registered: July 2009
Senior Member
Hi David,

we are using Subversion 1.5 (with merge tracking via the "svn:merge" property) and the version
20091207 of Subversive (from weekly builds). Based on this, we already did some merges from branch
to trunk. If that fits your scenarion, I could provide you with some instructions.

Cheers, Jörg

On 01/19/10 20:13, David M. Karr wrote:
> I'm using Eclipse 3.5.1 and the Subversive plugin. I do things with the
> plugin every day, but I almost never have to do a merge. I now have to
> merge the changes I've made in two separate projects (same branch,
> however) back to the trunk. I cannot find clear step-by-step
> instructions for doing this. The doc page on the "SVN merge dialog" is
> not helpful at all.
>
> In one of the two projects, I also have some changes in checked out
> files that I can't check in, but I still have to merge the checked-in
> changes on the branch back to the trunk.
>
> Can someone give me, or find, reasonable instructions for how to do this?
Re: Simple instructions for merging from branch to trunk? [message #509061 is a reply to message #508670] Thu, 21 January 2010 10:04 Go to previous messageGo to next message
Igor Burilo is currently offline Igor BuriloFriend
Messages: 435
Registered: July 2009
Senior Member
Hello David,

I would advice you at first to read about merging in SVN, here are links in
SVN book, Branching and Merging chapter:
http://svnbook.red-bean.com/nightly/en/svn.branchmerge.html or here're
basics of mergeing:
http://svnbook.red-bean.com/nightly/en/svn.branchmerge.basic merging.html
All merge actions you can accomplish in Subversive with Merge
dialog(Team/Merge).

> I'm using Eclipse 3.5.1 and the Subversive plugin. I do things with the
> plugin every day, but I almost never have to do a merge. I now have to
> merge the changes I've made in two separate projects (same branch,
> however) back to the trunk. I cannot find clear step-by-step instructions
> for doing this. The doc page on the "SVN merge dialog" is not helpful at
> all.
>
> In one of the two projects, I also have some changes in checked out files
> that I can't check in, but I still have to merge the checked-in changes on
> the branch back to the trunk.
>
> Can someone give me, or find, reasonable instructions for how to do this?
Re: Simple instructions for merging from branch to trunk? [message #510793 is a reply to message #509061] Thu, 28 January 2010 16:29 Go to previous messageGo to next message
David M. Karr is currently offline David M. KarrFriend
Messages: 800
Registered: July 2009
Senior Member
Let me try some specific questions, then.

In the "Merge" dialog, there is a "revisions" panel with a radio button set and a checkbox. The radio button choices are "All", "Start from Copy", and "Revisions". Can you explain what these choices are for, and their significance?
Re: Simple instructions for merging from branch to trunk? [message #510816 is a reply to message #508812] Thu, 28 January 2010 17:26 Go to previous messageGo to next message
David M. Karr is currently offline David M. KarrFriend
Messages: 800
Registered: July 2009
Senior Member
Just curious, by using that weekly build version of Subversive, are you able to get around the problem I've seen with the useless "Attempt to add tree conflict that already exists" error from merge attempts?
Re: Simple instructions for merging from branch to trunk? [message #510933 is a reply to message #510816] Fri, 29 January 2010 08:50 Go to previous messageGo to next message
Igor Burilo is currently offline Igor BuriloFriend
Messages: 435
Registered: July 2009
Senior Member
Hello David,

This is SVN error but not Subversive, so please try to google it. In short:
Subversion is complaining because after you did a merge which generated a
conflict, you then did the same merge again. SVN tried to add a conflict but
noticed that the conflict has already been created by the previous merge
operation. So it correctly outputs a warning. If you do a merge operation
and you are not happy with the result, then before trying something else you
should first revert the local changes.

> Just curious, by using that weekly build version of Subversive, are you
> able to get around the problem I've seen with the useless "Attempt to add
> tree conflict that already exists" error from merge attempts?
Re: Simple instructions for merging from branch to trunk? [message #510942 is a reply to message #510793] Fri, 29 January 2010 09:18 Go to previous messageGo to next message
Igor Burilo is currently offline Igor BuriloFriend
Messages: 435
Registered: July 2009
Senior Member
Hello David,

"Revisions" specifies revision range to be used in merge:
'Revisions' option allows to specify specific revisions, e.g. 12-23, 45.
You can select revisions by using revisions picker.
'All' option specifies that you want to merge all revisions. In SVN 1.5 and
higher it will be taken into account merge tracking.
'Start from copy' option: if you make merge from trunk to branch, the merge
will operate on revisions starting from revision where branch was created.
In SVN 1.5 and higher it will be taken into account merge tracking.

> Let me try some specific questions, then.
>
> In the "Merge" dialog, there is a "revisions" panel with a radio button
> set and a checkbox. The radio button choices are "All", "Start from
> Copy", and "Revisions". Can you explain what these choices are for, and
> their significance?
Re: Simple instructions for merging from branch to trunk? [message #511052 is a reply to message #510933] Fri, 29 January 2010 16:20 Go to previous messageGo to next message
David M. Karr is currently offline David M. KarrFriend
Messages: 800
Registered: July 2009
Senior Member
Igor Burilo wrote on Fri, 29 January 2010 03:50
Hello David,

This is SVN error but not Subversive, so please try to google it. In short:
Subversion is complaining because after you did a merge which generated a
conflict, you then did the same merge again. SVN tried to add a conflict but
noticed that the conflict has already been created by the previous merge
operation. So it correctly outputs a warning. If you do a merge operation
and you are not happy with the result, then before trying something else you
should first revert the local changes.



Yeah, I've already "googled" this very much. I'm aware of what the message means. However, I get this message after I do a fresh checkout of the branch I want to merge to, and then request a merge from another branch to what I just checked out. I clearly only requested a merge once.

Our server is running SVN 1.3.1, and I have no control over upgrading it. Apparently, a possible workaround for me is to install a SVN client that uses a SVN version before 1.6, which apparently ignores this tree conflict message from the server. Unfortunately, because of changes in the data format used in SVN 1.6, I can't use that SVN < 1.6 version on a project that I checked out with SVN 1.6. I think I may have to do the initial checkout with the SVN < 1.6 version, then do the merge, then delete the project that I checked out, then go back into Eclipse (which uses SVN 1.6) and do the checkout again. What a mess.

Fortunately, or unfortunately, I've been spared from having to go through this at this time, because I concluded that I only really had one file to merge, and I needed to ignore the file in the "destination" branch, so I just manually copied the file over without using the merge facility. Since we're using a SVN version prior to when merge tracking was implemented, there's no loss there.
Re: Simple instructions for merging from branch to trunk? [message #511322 is a reply to message #511052] Mon, 01 February 2010 09:15 Go to previous messageGo to next message
Igor Burilo is currently offline Igor BuriloFriend
Messages: 435
Registered: July 2009
Senior Member
Hello David,

It seems that in your situation it's the simplest way is to 'merge' file
manually like you did.

> Igor Burilo wrote on Fri, 29 January 2010 03:50
>> Hello David,
>>
>> This is SVN error but not Subversive, so please try to google it. In
>> short:
>> Subversion is complaining because after you did a merge which generated a
>> conflict, you then did the same merge again. SVN tried to add a conflict
>> but noticed that the conflict has already been created by the previous
>> merge operation. So it correctly outputs a warning. If you do a merge
>> operation and you are not happy with the result, then before trying
>> something else you should first revert the local changes.
>
>
> Yeah, I've already "googled" this very much. I'm aware of what the message
> means. However, I get this message after I do a fresh checkout of the
> branch I want to merge to, and then request a merge from another branch to
> what I just checked out. I clearly only requested a merge once.
>
> Our server is running SVN 1.3.1, and I have no control over upgrading it.
> Apparently, a possible workaround for me is to install a SVN client that
> uses a SVN version before 1.6, which apparently ignores this tree conflict
> message from the server. Unfortunately, because of changes in the data
> format used in SVN 1.6, I can't use that SVN < 1.6 version on a project
> that I checked out with SVN 1.6. I think I may have to do the initial
> checkout with the SVN < 1.6 version, then do the merge, then delete the
> project that I checked out, then go back into Eclipse (which uses SVN 1.6)
> and do the checkout again. What a mess.
>
> Fortunately, or unfortunately, I've been spared from having to go through
> this at this time, because I concluded that I only really had one file to
> merge, and I needed to ignore the file in the "destination" branch, so I
> just manually copied the file over without using the merge facility. Since
> we're using a SVN version prior to when merge tracking was implemented,
> there's no loss there.
Re: Simple instructions for merging from branch to trunk? [message #546691 is a reply to message #509061] Tue, 13 July 2010 19:09 Go to previous messageGo to next message
NikoNikoSuru is currently offline NikoNikoSuruFriend
Messages: 2
Registered: July 2010
Junior Member
This answer is not helpfull, sorry.
The problem is the atrocious usability of the merge dialog.
It is simpler to accomplish this task through the command line that with this merge dialiog.

Which URL is the source ? Is it URL 1 or URL 2 ?
Which URL is the destination ? Is it URL 1 or URL 2 ?
The documentation is just completely unhelpful, and is dealing with URL 1 and URL 2 without ever explaining what is the role of each URL ?

I have a branch called fox-1.0 starting from a tag called FOX-1.0. I want to merge the changes I've made in branch fox-1.0 into the trunk.

This is just an extremely simple elementary need to merge the changes made in a release branch into the trunk.

Please provide explanations to do so.
Re: Simple instructions for merging from branch to trunk? [message #546822 is a reply to message #546691] Wed, 14 July 2010 10:12 Go to previous messageGo to next message
Jörg Thönnes is currently offline Jörg ThönnesFriend
Messages: 229
Registered: July 2009
Senior Member
Dear Nicolas,

On 07/13/10 21:09, Nicolas Dasriaux wrote:
> I have a branch called fox-1.0 starting from a tag called FOX-1.0. I
> want to merge the changes I've made in branch fox-1.0 into the trunk.

Instruction if the trunk is checked-out as Eclipse project (for Subversion 1.5 and higher):

1. Go to the trunk project

2. Update to the latest revision, otherwise the check-in of the merge will fail since it modifies
the root folder property svn:mergeinfo for merge tracking

3. In Java Package Explorer, select the trunk project, right-click, Team->Merge

4. Use "URL" tab, this provides the merge source, the destination is the currently selected project

5. Either enter the fox-1.0 branch URL by hand or use "Browse..."

6. For selected revisions only, use the Revisions field and use "Browse..."

7. Now you can select your revisions, e.g. by applying a filter by "Author" (you) or "Comment" (e.g.
"ticket 123*" or "Path" (never tried, not sure how it works)

8. Select the revision and say OK

9. Revision ranges to do not seem to work reliable, use "Preview" for a rough check

10. If changes are missing, transform range in a list of single revisions (this is a pain, admitted)

11. Press OK

12. Now a separate "SVN Merging" synchronization is created

13. If there are no conflicts, accept all changes and deal with the details in your changed workspace.

14. If there are conflicts, used "Edit as conflict" (otherwise you get the ">>>" / "<<<" markers in
your code) and finally "Mark as merged"

15. Go to the trunk Synchronize view and check workspace modifications

16. Finally commit at the top-level (root-folder) to get the svn:mergeinfo properties checked in.
(If this fails, some other person may have checked-in something already and you have to update the
trunk).

Cheers, Jörg
Re: Simple instructions for merging from branch to trunk? [message #547437 is a reply to message #546822] Fri, 16 July 2010 19:25 Go to previous message
NikoNikoSuru is currently offline NikoNikoSuruFriend
Messages: 2
Registered: July 2010
Junior Member
Thank you for the answer, it helped me solve the last bits of problem I had.

Actually I finally succeeded on my own with the help of Tortoise SVN using the Revision Graph feature which is much more visual, and gives you a better view of what you are actually doing.

I finally inferred from what I did with Tortoise SVN to make an interpretation of the Subversive merge dialog.
Even after succeeding in doing more or less what you described in your answer, I still think there are UI usability issues with this dialog.

I don't know if you're working on the development of this UI, but I'd like to use this opportunity to try to provide feedback to the community. I think that Subversive is very promising compared to Subclipse. The thing is, what is good makes you want for more. And, actually, the merge part needs to be improved. I used Subclipse for merge before, and I think the UI is better, at least as far as merge is concerned.

Instead of complaining (yes, I know, I'm a difficult user), I'll try to provide suggestions, and for this, I'll use the flow of your crystal clear explanations.

> Instruction if the trunk is checked-out as Eclipse project (for Subversion 1.5 and higher):

> 1. Go to the trunk project

> 2. Update to the latest revision, otherwise the check-in of the merge will fail since it modifies
the root folder property svn:mergeinfo for merge tracking

> 3. In Java Package Explorer, select the trunk project, right-click, Team->Merge

> 4. Use "URL" tab, this provides the merge source, the destination is the currently selected project

I figured this with much pain.

Your explanation is much better than the UI itself. In fact, it contains potential better captions for the UI fields.

Why not change the field label from the fuzzy and generic "URL" name to the much more explicit "Merge Source URL" ? And again, why not have a "Merge Target" or "Merge Destination" read only text area (on something like that). It could remind the target of the merge and provide feedback to the user so that he knows what he is actually doing. It could show the name of the project and the relative path to the target.

By the way, the text on the top level white pane is convoluted and syntactically too complicated. After succeeding to merge, I'm still not sure of what it means. But I'm not a native speaker, so...

> 5. Either enter the fox-1.0 branch URL by hand or use "Browse..."

> 6. For selected revisions only, use the Revisions field and use "Browse..."

> 7. Now you can select your revisions, e.g. by applying a filter by "Author" (you) or "Comment" (e.g. "ticket 123*" or "Path" (never tried, not sure how it works)

> 8. Select the revision and say OK

> 9. Revision ranges to do not seem to work reliable, use "Preview" for a rough check

I used it, but I didn't notice. Obviously, this has to work.

> 10. If changes are missing, transform range in a list of single revisions (this is a pain, admitted)

Saying this is a pain is the definition of an understatement. Wink

> 11. Press OK

> 12. Now a separate "SVN Merging" synchronization is created

> 13. If there are no conflicts, accept all changes and deal with the details in your changed workspace.

> 14. If there are conflicts, used "Edit as conflict" (otherwise you get the ">>>" / "<<<" markers in your code) and finally "Mark as merged"

I had to fight with that. But I did merge with SVN command line quite a lot of time before. So I was used to these ">>>" / "<<<" markers. I'll try to use "Edit as conflict" and "Mark as merged" next time.

> 15. Go to the trunk Synchronize view and check workspace modifications

> 16. Finally commit at the top-level (root-folder) to get the svn:mergeinfo properties checked in. (If this fails, some other person may have checked-in something already and you have to update the
trunk).

[Updated on: Fri, 16 July 2010 19:30]

Report message to a moderator

Previous Topic:Project decorations missing for subversive
Next Topic:[Solved] Missing svn updates in console window after Helios upgrade
Goto Forum:
  


Current Time: Thu Mar 28 14:27:31 GMT 2024

Powered by FUDForum. Page generated in 0.05904 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top