NetBeans IDE 6.5 Beta no longer needs Subversion client installed on Windows XP machine. I got this information in the New and Noteworthy page and since then was excited to try out the NetBeans downloading feature of the Subversion Client 1.5 for Windows from the Update Center.
When you do not have Subversion client installed...
After creating a sample application and choosing the Import into Subversion repository... option, NetBeans IDE 6.5 Beta now shows a dialog box indicating that it could not find Subversion client installed and offers two ways to proceed.
NetBeans IDE 6.5 Beta Offers bundled client
Either choose to download the bundled Subversion 1.5 binaries for Windows from the Update Center or Install the SVN 1.5 Command Line client. It also recommends to choose the first bundled option.
After choosing the bundled Subversion option it shows the license agreement for downloading and installing the bundled Subversion Client.
Accepting the license starts the download in the background. We can see the progress of the download in the status bar of the IDE.
It installs the component smoothly and then asks to restart the IDE. Clicking the restart button makes the IDE shut down and start again. This time before the splash screen it shows an Update banner for some time and then the usual Splash screen.
We still need to create our own repository if we want to keep the project in local repository. If we have a remote Subversion server than we can directly use the server. The point is now NetBeans IDE 6.5 Beta is ready to work with Subversion repositories.
We will choose a local already created repository (through TortoiseSVN) for this example.
Rest all the dialog boxes for showing the list of files to be committed and asking the commit comment will be shown and the files will be committed to the Subversion repository.
Here we can see the project successfully committed to the local subversion repository. NetBeans IDE 6.5 Beta has taken a good step by providing the bundled Subversion client which makes installation and use of Subversion even more easier now.
with regards
Tushar Joshi, Nagpur
Wednesday, August 13, 2008
NetBeans IDE 6.5 Beta - Auto Download for Subversion Client 1.5 in Windows
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
Tuesday, April 1, 2008
Subversion with NetBeans IDE 6.1 Beta - Source in Control
(This article expects some knowledge of Subversion source control and check-in checkout process used in version control systems)
Maintaining source code of our projects in a version control software is very important for the maintenance of the project. In large projects the projects are hosted on a server bases source control repository. NetBeans support Subversion, one of the popular source control server softwares.
Subversion allows us to create local repositories also to store our projects and manage the versions on local machine. Let us look how to install Subversion, its client TortoiseSVN and then use it to store our project locally in a source control repository.
We will need two important software binary installers. Subversion the repository server binary and TortoiseSVN a windows shell client for Subversion.
I will copy the svn-win32-1.4.6.zip file which I downloaded into C: drive and will ask my 7Zip shell extension menu to extract the file right into the C: drive.

I will need the Subversion binaries to be in my windows path so NetBeans can find them and use them. I will copy the path of Subversion binaries.
This path must be set into the PATH environmental variable in windows. To set the PATH environmental variable I will right click the My Computer icon, select Properties, select Advanced tab and click the Environmental Variables button. 
This will show me a dialog box for Environmental Variables. Here I will click the PATH variable and will choose the Edit button to add one more entry for the Subversion path. The paths in windows are separated with semicolons; so I will remember to add a semicolon before the path.
To check whether my Subversion binaries are really available in the windows executable path I will open a command prompt and type svn --version. This command will show me details of the installed subversion. 
Note that Subversion is installed just be copying the ZIP file and extracting the archive. Then the bin path is added in the windows PATH environmental variable. To create a new repository for my local use I will use the TortoiseSVN windows shell extension client. The local repository can also be created through a command line without using the TortoiseSVN client but through TortoiceSVN it becomes easier.
I will create a new folder named svnrepo in C: drive. Then I will right click on the folder choose the TortoiseSVN > Create repository here... option and the repository will be made for me.
Tortoise will ask which type of repository is wanted and I will keep the default Native filesystem (FSFS).
Now I am ready to use the subversion version control system in my NetBeans IDE projects. Let us open the project in NetBeans and right click on the project name.
We can see the versioning option has option of Import into Subversion Repository... By choosing this option we will tell NetBeans that we want to store our project in a repository.
NetBeans will ask where to keep the project, i.e. the path for the repository. There are many ways to describe the paths for Subversion repository and they depend upon how the repository is set and on what protocol it is available. As we are using the repository locally we will have to use the FILE protocol.
So I will type file:///C:/svnrepo as my path for the local repository.
I must specify the message for checking in the project into subversion repository.
NetBeans shows all the files that will be checked in the repository when the wizard completes. I will click the finish button and the project will be added to the local subversion repository. NetBeans shows a visual clue attached to the project icon showing this project is now under version control.
The project when right clicked now shows a Subversion option menu and Subversion sub-menu shows options to Update and Commit the files into the repository.
As soon as there is a change in the files of the project the files are shown in different color and the visual clue is shown with the icon of the file. 
When we are done with the updates we right click the file and say Subversion > Commit and NetBeans offers dialog box where we have to type the commit message and then the file updates are stored in the source control repository.
This is how NetBeans makes it easy to manage the project in a local source control repository. There are many more features of the Subversion repository we shall explore one by one through future posts on this blog.
with regards
Tushar Joshi, Nagpur