Subversion workflow with IDEA

Hi,

What's the best Subversion work flow when I create a new project with IDEA? I mean, should I create the project first, create the modules, and then import the project, etc. or should I first create the repository structure, etc.? After importing the project, do you check it out to the current directory? Do you check in .iml and etc. files?

Also, what directory structure do you use on Subversion (trunk/branches/tags) or ...? Which directories do you checkout?

I'll be thankful if someone could explain in some detail a suitable and best-practice Subversion/IDEA work flow.

-Altu

2 comments

I don't know if this is best-practice, but it works well for me (I'm
using Idea ver. 6.x):
- create Idea project first
- do some development without version control (could be hours, or days)
- create another folder with trunk/branches/tags
- copy project to trunk folder
- cleanup copied project before importing: remove folders and files
generated by project build (classes, exploded, war/jar files, etc.)
- remove .iws file, but make sure that Run/Debug 'Share configuration'
is checked on (which means that these configurations are stored in the
.ipr file)
- import project into repository, I use TortoiseSVN for that
- checkout trunk from repository into yet another folder, again using
TortoiseSVN
- open checked-out project in Idea
- before doing anything else, in project settings - version control, set
default module version control to Subversion
- from now on, I use Idea for VC operations

The only problem I have, is with top level files (including .ipr). I
usually create multi-module projects. Modules are handled well by Idea
build-in Subversion support. However I have to manually commit .ipr file
using TortoiseSVN. The same is true if you want to keep under version
control top level Ant build file.

By removing .iws file I can easily open my Windows project on Linux (or
even on Mac).

Good luck,
Tom

Altu wrote:

Hi,

What's the best Subversion work flow when I create a new project with IDEA? I mean, should I create the project first, create the modules, and then import the project, etc. or should I first create the repository structure, etc.? After importing the project, do you check it out to the current directory? Do you check in .iml and etc. files?

Also, what directory structure do you use on Subversion (trunk/branches/tags) or ...? Which directories do you checkout?

I'll be thankful if someone could explain in some detail a suitable and best-practice Subversion/IDEA work flow.

-Altu


0

I prefer to work with the project in SCM ASAP.

And i've found that the maven support is now sophisticated enough (at least with version 6), using maven reloaded, so that you don't even really need to checkin iml files, that is if all your dependencies are maven controlled

0

Please sign in to leave a comment.