Neither "Merge" nor "Integrate Project" are working with SVN

IntelliJ IDEA 9.0.4
MacX OS
JDK 1.6

I want to merge the main line into a branch that I started about 6 months ago - pretty straightforward, right? Nope. Navigated to Version Control->"Merge From" and ... nothing happens. WTF?! You do get this window in the lower frame that has the following links: Refresh, Change, Configure Branches, and "Merge from...". Aside from the fact that I have to click 2 "merge from's" to get to the task I want to accomplish, the branch selection doesn't work even when you specify the revision number. In my case, I entered "4006" and it chose the "1863" version. AND, there's no way that I found to convince it otherwise.

"Integrate Project" has the same problem. I've checked the docs, which are superficial and useless, as well as the demos and tutorials. There's really nothing of any help for SVN.

Does anyone know how to make this work?

4 comments
Comment actions Permalink

In IDEA 10, If you go to your "Changes" interface, and then go to the "Subversion Working Copies Information" tab, for each module/directory you have checked out, you can see the URL that shows your branch version.  (Be sure to click the "Refresh" link at the top to make sure all this info shown is correctly updated.)
(This is the ONLY place in IDEA where I can see whether I'm on a trunk or a branch for each of my modules, which seems really weird to me.  Eclipse shows this for every module right in the project view!)

From there, if you click the "Merge from..." link for a specific module/directory and then pick trunk in the "Select branch" popup, it will think a while, then integrate trunk changes into your branch, asking you to resolve any conflicts if any occur, and then ask you to commit the changes to your branch with a preloaded "Merge from trunk revision xyz" type message.  (It seems to always popup a "Merge from trunk" dialog saying I have "local changes that can potentially intersect with merge changes" message even when I have NO uncommitted changes on my branch, I just select "Continue merge" to continue.)

This is how I do it, anyways.  Then I can click on any of my modules/directories in my project view and "Subversion->Update Directories.." back and forth from the branch to the trunk, and the Version Control update message stuff shows me that only my legitimate branch changes are different between the two, as I'd expect.

Is there some other standard way to do this same operating? (merging trunk changes into my branch.)  Does this do the exact same thing as "Subversion->Integrate Directory..." using Source 1 as the branch and Source 2 as the trunk (or maybe vice-versa?)

It'd be cool to get an official Intellij response to this! (-:

0
Comment actions Permalink

Thanks, Alex. I have not upgraded to 10 yet. Upgrading to 9.0.4 wiped out all of my project and IDE defaults I had, oh so carefully, set up so I'm a little gunshy at this point. Yeah, I find it a little odd that there doesn't seem to be any official response. I surmise that everyone probably gives up and uses GiT, which apparently does work.

0
Comment actions Permalink

IDEA version 10 uses a different directory for your settings than version 9, so it shouldn't harm any of your 9.0.4 settings.  (Your project files on the other hand, that's different, but if your project is all maven stuff, just opening the root pom in version 10 as a new project and saving the project files in a different spot should do the trick.)

(I know what you mean, I recreated my project in 10 from scratch using a separate set of project files during the EAP, so I can always fall back to running 9.0.4 with my old project files whenever I needed to.)

The method I described to merge your trunk changes into your branch should work in version 9.0.4 as well though, I think!
The Changes->Subversion Working Copies Information tab is available where you can "Merge from..." for any of your modules.

0
Comment actions Permalink

Hello,

1) here http://devnet.jetbrains.net/docs/DOC-1203 we have some detailed documentation on feature branches merge in IDEA
Also, in the end of the attached PDF document, you can find links to general information on merge in Subversion

2) please check that you have configured your branches information for IDEA
Subversion uses terms "branch" and "trunk", but it is not set up anywhere (on Subversion level)!
That's why IDEA needs this information to be manually configured.
IDEA tries to automatically guess your configuration, i.e. it takes your working copy URL, and goes to the server in attempt to find directories "branches" and "tags" there, but please go to "Configure Branches" to make sure it is all correct.
!!! In "Branch location" should be folders, _directly under which_ branch/tags folders are in Subversion repository.

If everything is correctly configured (for standard scheme), then, in branch selection popup, you would see first something like:
"Select branch:"
trunk
branches
tags

(suppose you clicked "branches")

then you would see popup:
"branches"
<branches list>
"Refresh branches" (you can use it to refresh the list)

3) IDEA does no attempt to do things together if you have multiple working copies in a project.
You still would have to deal with merge of each copy separately.

4) Concerning local changes prompt: you have the choice when merging - whether to select revisions or merge all that can be merged
(you can select revisions if merge tracking is supported by repository and working copy, i.e. they are 1.5 or higher)
If you have selected a list of revisions to merge, IDEA would check the list of files that are going to be changed, and compare the list with changes that you have, and the warning would be shown only if quantities intersect.
But if you have selected to merge all, this check is not performed. Generally it is not done for the purposes of speed.
In this case, the local changes warning would be shown if you have any local changes

5) Subversion | Integrate Directory and Integrate Project are "low-level" actions, that do the same as Subversion merge command
"Merge From" and "Integrate to Branch" are higher level actions, provided by IDEA for feature branches merge or changes cherry-picking
(please also note that integrate to branch merges changes done in your working copy outside)

0

Please sign in to leave a comment.