Setting up Subversion in IntelliJ IDEA
This tutorial will guide you through setting up IntelliJ IDEA to work with Subversion. The new version of IntelliJ IDEA (version 7) has some remarkable improvements and new features concerning version control.We will start from creating a new project, import it into version control, and then checking it out again. If you want to set up Subversion for an existing project in that has already been imported, you can start at Checking out the Project.
Checking in the Project
The first thing you will need to do, is to create a new project in IntelliJ. For this example I named my project myproject.

Now you need to open the Version Control menu and select Import into Subversion…. Click on the + to add a repository. You will be prompted to enter the location to your Subversion repository. In this example, it will be:
http://localhost/svn

When the repository has been successfully added, right click on the repository. Select New and then Remote Folder…. Enter your project’s name (in this case it will be myproject) and click on OK.
Select the folder you have just created and click on Import. You will be prompted to select the project directory to import into Subversion. Select the base directory of the project you have just created and click on OK. It is always important to add a message when you commit to Subversion as this will help you later on when you need to create patches or revert to a previous version of the project. As my message, I entered initial import:

If you are prompted for a password, enter the username and password you set up when installing Subversion. I always select Save credentials which saves some time in entering your password each time.
As this was the initial import, we need to check it out of version control again to start working on it. When you check it out, IntelliJ will automatically set up the version control for the project. Note that the version control will only be set up with a checked out version and not with the project you have created on your hard drive. This means that any changes you make to the original project (the one we created in the first step) will not be versioned. In the next step we will delete the project that we have created and do a fresh checkout from Subversion. You may also just check it out to a different directory, but this may cause confusion so rather rename the original directory.
Close the project in IntelliJ and delete the project files (myproject is the base directory of the project):
rm -rf [your_project_location]/myproject
Checking out the Project
All the previous steps were necessary only for checking in a new project. If you want to start with an existing project from Subversion, you can follow the following steps:
Create a directory for your project (the project name in this case is myproject):
mkdir [your_project_location]/myproject
In IntelliJ, select Version Control from the menu and select Checkout from Version Control > Subversion. Expand the repository we added in the previous section and select the project directory (in this case myproject). Click on Checkout.
You will be asked to select the directory to where the project should be checked out to. Select the directory we created in the previous step and click on OK. The project will be checked out to the directory you have specified.
You will also be prompted to open the newly checked out project. If you open the project, you will notice a Changes tab at the bottom of the screen. From this tab you can commit your changes to Subversion, view the difference between different versions, add different changelists (handy for special configurations), create patches, revert to specific versions, shelve your changes, etc.