Friday, April 4, 2008

Checkout project from Subversion repository in NetBeans IDE 6.1 Beta

(This post assumes you have installed the Subversion client binary in your windows machine and you have gone through the earlier post Subversion with NetBeans IDE 6.1 Beta)

If you know there is a project stored in subversion repository and you want to work further in that project. I am considering the case when the project is not yet checked out and configured in NetBeans or you want a second copy of the project checked out locally to test some new feature on the project. In these cases you will need to check out the project from Subversion repository.

We have one local subversion repository and a project added to the repository from the last post. Let us use that project and check out that project again and see how it is configured in NetBeans IDE 6.1 Beta.

The Versioning menu has an option of Subversion > Checkout... Click on this option.

NetBeans will show the Checkout dialog box. The repository URL I typed is the URL for my local subversion repository, the same which we created in the last post.


When clicked on Next NetBeans asks about the project to check out for.

I will click the Browse button to see how many folders are there in the repository and what to select for checking out.


I can see my last example project in the repository. I will click on the EquationExample project and will say OK.

I will also check the Scan for NetBeans Projects after checkout check box so the project will get configured in NetBeans automatically after getting checked out of the repository.


NetBeans asks me whether I want the project to be opened in the IDE right now. I will say Open Project.

We can see the project in the Projects panel now. Note the visual hint on the EquationExample name of the project which shows that this project is associated with some version control system.

When I changed some code in the EquationExample.java file it displayed that class with blue color.

I can right click on the updated files and say SUbversion > Commit... to commit my changes back to the repository.

NetBeans will ask the commit message and will commit the file with the message to the repository.


I added one more class CubeEquation.java and you can see it is shown in green color in the Navigation Project panel. When committed the list of files to be committed in the commit message dialog box correctly shows the files which were updated and which are new.

This way I can easily check out a project from Subversion repository and use it in NetBeans.

The NetBeans community docs contain many examples of working with Subversion repository in complete sense. My effort was to provide my experience with NetBeans IDE 6.1 Beta and to show how intuitive is this IDE even if I have not read the complete documentation I am able to explore on my own the ways to use Subversion.

with regards
Tushar Joshi, Nagpur

1 comment:

  1. Very nice and clear example. Can we have multiple SVN Repositories ? if yes then how ?

    When i am trying to configure new SVN Repositories then it shows me previous project.

    Thank & Regards

    ReplyDelete