Subversion. Easy merge for feature branches

Feature branches have simple life cycle, they usually consume trunk changes and are merged back into trunk after the work is completed.

In IntelliJ IDEA 9.0.3 EAP, take all trunk changes into feature branch and reintegrate back into trunk using new “Merge from…” action:

You can merge all changes in one shot or select a subset of them. Changelist with merged changes is created and offered for commit.

This entry was posted in New Features and tagged , . Bookmark the permalink.

17 Responses to Subversion. Easy merge for feature branches

  1. Peter Niederwieser says:

    Users would benefit more if you fixed some of the many open issues in IDEA’s Subversion integration. Due to all the problems I’ve had, I nowadays mostly use Subversion from the command-line (except for trivial stuff like update and check-in).

  2. Chris Altman says:

    I agree with Peter. I’m trying very hard to get company backing behind purchasing licenses for IntelliJ and phpStorm. However, there are some very serious issues that need to be resolved before these products can be considered as enterprise applications. It’s hard enough to get people to try new tools, it’s even worse when there are things in the new tools that will make them step backward in their development cycle.

    In particular, please fix the remote deployment syncing with svn commands.

  3. WhiteChrys says:

    Agreed. I posted a major SVN issue (WI-981) 5 months ago and it keeps getting pushed back.

  4. ian says:

    for the record, SVN integration works really nicely in IDEA for me (9.0.3+)

    ClearCase, not so much – refactorings don’t work too well. That may not be Jetbrains fault, since we use a highly customized Clearcase setup.

  5. Larry Gerndt says:

    Even with 9.0.2, SVN integration works beautifully for me. I’ve been astounded at how extensively IDEA implemented implemented Subversion support. Every kind of operation I ever needed turned out to be there, and I found it without even having to read any help. Very well done, IDEA.

    One outstanding feature that really impressed me was “Integrate to branch…”.

  6. Ronny Løvtangen says:

    I have to agree with Peter.
    9.0.3 effectively breaks Subversion integration for all Mac and Linux users. To be able to work around the issues, user have to find http://youtrack.jetbrains.net/issue/IDEA-56464

  7. Roman says:

    There’s an open-source command-line tool for automated branching: http://savana.codehaus.org/

    I’m eager to check out “Change-list with merged changes is created and offered for commit.”, hoping to finally get the before-commit branch code-review tool I was looking for.

    Downloading 9.0.3 …

  8. Adam says:

    I have a question about this merge functionality – does it require any specific SVN version on the server side as we are still stuck on 1.4 on the server?

  9. Andy says:

    I understand JetBrains needs to keep pushing out new features to justify new releases and make money. But in a perfect world where money didnt matter, I could see JetBrains fixing all the bugs and making the product better instead of feature ridden. It’s like Microsoft with Office – how many new features can you (or do you) really want to add to Word or Excel? I mean, enough with the features. Let’s make this thing run like the fastest stable thing out there. However I do love the IDE so nice work.

  10. Sachin says:

    I can attest that SVN integration works great in IDEA. There will always be bugs in any product that you buy in any market. Even Toyota had an accelerator that got stuck to the floor every now and then. Atta boy IDEA.

  11. Jeppe says:

    When I try to merge from trunk to my feature branch using the instructions above, Idea complains saying “Merge start wasn’t found”.

    What to do? I used Idea’s “create branch” SVN option from I created the branch. What did I miss?

    Thanks.

  12. Irina says:

    @Jeppe Please create a ticket (I think it’s better since I need more details)
    and please describe what is your copy URL and what is source branch URL, and what settings you have in configure branches

    IDEA must 1) know from settings what is your branch URL and how to translate its contents into source URLS (i.e. /root/trunk/subfolder into /root/branches/branch/subfolder)
    2) IDEA goes down the history and tries to find the revision when either trunk was copied to branch (or its parent) or vice versa, branch to trunk

    Thank you

  13. James Crow says:

    I use Version Control -> Integrate… with source 1 & source 2 populated as a release branch of our code to merge changes back to the development trunk. This works fine but feel that using the “Merge From” feature would be easier to use.

    However, it says the branch will no longer be available after I perform the merge which is fine for feature branches but not for release branches. Is there any way around this or do I need to keep using integrate?

  14. Vladimir Konkov says:

    I’ve the same issue as James Crow.
    How can I merge bug fixes from relese branch to trunk without closing branch?

    Currently I do that by command line… :(

  15. Randell Benavidez says:

    I’m experiencing this very same problem in PhpStorm 3.0.2 #111.296.

  16. Thorsten says:

    Same here with PS-117.65 – really annoing…

  17. Irina Chernushina (JetBrains) says:

    @James, @Vladimir, @Randell, @Thorsten

    It is Subversion limitation, please read here (in the end of subtopic:)

    http://svnbook.red-bean.com/en/1.7/svn-book.html#svn.branchemerge.basicmerging.reintegrate

    Quotation:

    “… Once a –reintegrate merge is done from branch to trunk, the branch is no longer usable for further work. It’s not able to correctly absorb new trunk changes, nor can it be properly reintegrated to trunk again. For this reason, if you want to keep working on your feature branch, we recommend destroying it and then re-creating it from the trunk:

    $ svn delete http://svn.example.com/repos/calc/branches/my-calc-branch
    -m “Remove my-calc-branch, reintegrated with trunk in r391.”
    Committed revision 392.

    $ svn copy http://svn.example.com/repos/calc/trunk
    http://svn.example.com/repos/calc/branches/my-calc-branch
    -m “Recreate my-calc-branch from trunk@HEAD.”
    Committed revision 393.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>