0

I have several SVN projects link between each other. All my projects are structured that way (example):

- Project1 (folder)
    - branches
         - v1.1
         - v1.2
    - tags
    - trunk

In eclipse, I just have to checkout SVN project and with a plugin, I can switch branch to trunk and trunk to branch and it switch automatically to the right folder. Eclipse SVN Branch

In IntelliJ, for example, I work in a branch. When I want to switch to the trunk, I can do that, but my project is still located at the folder of the branch. IntelliJ SVN Branch

My goal is, don't import the project per branch/trunk in IntelliJ (like in Eclipse) and see on which branch/ trunk I am working. Can you help me?

Thanks a lot.

alroc
  • 27,574
  • 6
  • 51
  • 97
scorpDev
  • 1
  • 3

1 Answers1

0

In Subversion, switching of a branch is done within a working copy. See e.g. http://svnbook.red-bean.com/en/1.8/svn.ref.svn.c.switch.html or Svn switch from trunk to branch. If you want to have both a branch and the trunk checked out at the same time, you need to have 2 working copies.

IntelliJ follows these concepts, and as you noted, allows switching a branch within the working copy. But in the case of 2 working copies linked to trunk and a branch, it is better to have 2 separate projects in IntelliJ.

Seems the plugin for Eclipse you mention does not do switch but instead navigates to a folder and probably switches some context. While you can checkout the entire structure as a single working copy and import it as a single project to IntelliJ, there will be no way to switch between them in this way, AFAIK.

The best approach I can suggest is to have each branch checked out as a separate working copy, and imported as a separate module to IntelliJ project, and make changes in the corresponding module when needed. To see what module tracks wich branch - use Subversion Working Copies tab.

Dmitrii Smirnov
  • 7,073
  • 1
  • 19
  • 29