|
Written by Chintan Rajyaguru
|
|
Wednesday, 10 May 2006 |
|
One of the most commonly used version control system is CVS and one of the most commonly used IDE is eclipse (Rational Application Developer - RAD, in my case). Surprisingly, Google isn't much of a help when you do searches like "rad cvs," "rad setting up cvs," "ibm rational application developer setting up cvs" etc. so I thought I would document the process I follow: In most cases cvs repository resides on a server. To use cvs from within Rational Application Developer (or eclipse IDE), you first need to setup the repository and then share your project(s) using that repository. Let's review the process step by step:
Setup repository Prerequisites: - You must have a cvs username and password
- You must know the host name, repository location, port number (if default port is not used)
Process: - Go to the CVS repository view of RAD
- Go to Window > Open Perspective and choose Other
- From the resulting window, select CVS Repository Exploring and click Ok

- Right click in the CVS Repositories view (a tab in the left panel) and select New > Repository Location
- In the Add CVS Repository window, enter Host, Repository path, User, Password, Connection type and port information as shown
 - Let us discuss the above entries quickly
- The hostname is the remote server on which cvs is installed. The value should be the ip address of the machine or the machine name. In the example, I have used a fully qualified machine name. The cvs admin should be able to give you the hostname
- Repository path. This is the directory designated as cvs documents root. The cvs admin should be able to give you the repository path. Any file that is under version control will be somewhere under the repository - /var/cvs/myrepository in case of the example
- Username and password are typically assigned by the cvs administrator. Because cvs has a weird way of generating passwords, most of the time passwords are not changeable by the developer
- In most cases default port should work. If not, obtain it from the cvs admin
- The checkboxes in the example simply
- Validate the connection and notify you if the wizard can't connect to the server
- Save the password so you don't have to enter every time you check in or check out something
Adding project to the repository The steps above simply connect RAD to the cvs repository. The project in the workspace are not part of the cvs repository yet. To add a project in cvs, follow these steps: - Right click the project you want to add and select Team > Share Project


- Select Use existing repository location radio button, choose the repository you created earlier and click Next
- Enter Module Name is the most important screen in adding the project to the repository. Select Use specified module name and enter the path of the module relative to the repository location. Remember the following
- The path should NOT start with a slash (/)
- The path is relative to the cvs repository path (you entered repository path when you setup the repository). For example, let's assume the repository is at /var/cvs/myrepository. You have an application called myapp, which has 3 projects MyAppEJB, MyAppWeb and MyAppEAR. You should put projects in the repository like this:
- /var/cvs/myrepository/src/myapp/MyAppEAR
- /var/cvs/myrepository/src/myapp/MyAppEJB
- /var/cvs/myrepository/src/myapp/MyAppWeb
When you are in RAD, you only see MyAppEAR, MyAppEJB and MyAppWeb. You don't see src and myapp directories. While sharing the EAR project in RAD, you should enter src/myapp/MyAppEAR - The path INCLUDES the name of the project you are adding. Notice in the example above that the path includes the name of the project MyAppEAR

Start using From this point on, you shouldn't use another cvs client to work with cvs. You can directly work with cvs right from RAD. Simply right click the file (or package) and select Team > - Commit - to send your changes to cvs
- Add to version control - to add a new file to cvs
- Update - to get latest version from cvs
- Restore from repository - to loose your changes and get the latest file from cvs
|
 | LIST OF COMMENTS .... |
|
 | 1. Written by Guest/Visitor Monday, 31 July 2006 | | Thanks for the comprehensive notes.
I wondered if you knew of any good references for 'RAD CVS Error messages'? Trying to commit and receive the following error message:
The server reported an error while committing.
Thanks,
lex | | |
 | 2. Written by Guest/Visitor Saturday, 05 August 2006 | | I have seen this behavior from RAD before. I keep a Tortoise CVS client. When I get RAD error, I do the same thing in Tortoise, which gives more details on error. In your case see if your file has a sticky tag. If you remove the sticky tag, the RAD error might go away. | | |
 | 3. Written by Guest/Visitor Friday, 06 October 2006 | | I dont have CVS Repository Exploring View In my RAD and i have only Team Synchronising View.What should i do? | | |
 | 4. Written by Guest/Visitor Friday, 06 October 2006 | | Go to Window - Open Perspective - Other
From the popup window make sure that the "Show all" check box is checked at the bottom. You should see the CVS Repository Exploring "Perspective" now in the list. | | |
 | 5. Written by Guest/Visitor Tuesday, 07 November 2006 | | Hi chintan,
Ur article is good, but i have a difficulties in RAD with cvs, my cvs connection is lost everytime(can see the cylinder img in the folder icon of project) how to resolve this ,plz help me by sending remedies to my mail id asmdt at yahoo dot com... thank u in advance | | |
 | 6. Written by Guest/Visitor Wednesday, 17 January 2007 | | Good Article.
I just have a strange issue with CVS using thro' RAD.
I use the following:
cvs -d:pserver:username:password@domain:2401/repositorypath checkout -rHEAD package
I get an error while I use it in RAD.. i.e., error=2
If I execute the same CVS command on command prompt it works fine. Any extra settings required for it to work on RAD? | | |
 | 7. Written by Guest/Visitor Wednesday, 25 July 2007 | | When I try to create a new repository location I get "I/O error occured Connection refused". | | |
 | 8. Written by Guest/Visitor Monday, 24 December 2007 | | A very good article. Thanks a lot. BTW, when I try to add a folder to CVS it errors our saying - cannot add a cvs directory. | | |
 | 9. Written by Guest/Visitor Wednesday, 02 April 2008 | | Hello, iam getting one error while doing this process.
"Cannot connect to host". cvs is installed in one system.That system IP address is 10.10.10.246.
So, in host field i gave 10.10.10.246.
and what i have to give in Repository path? | | |
|
|
Last Updated ( Tuesday, 16 May 2006 )
|