Sie sind auf Seite 1von 7

CVS

CVS (Concurrent Version – controller System) is an open source tool which can be
used to place and manage the project code in a centralized place to allow various
members of project team to share the code.
Q. Which the version controller system is used by your company?
Ans: In my company different tools are in use for different projects, but in my
project, I am using CVS.
Q. How you are getting the Project.
Ans: Project documentations is generally divided into two category.
1) Project Docs: - It is simple a word docs, which contains functional
specification and technical specification. We get it through email or
shared folder through the intranet. (Sometimes it will not be shared
with developer, if it will not be available)
2) Project Code:- We get it through CVS server.
Q. What do you mean by Knowledge transfer (KT)?
Ans: Explanation of the project.

CVS Server: CVS NT server


CVS Client: WinCVS, Eclipse, NetBeans etc.
Installation of CVS Server:
Step1: Download the CVS NT Server and click on the cvs_nt setup installer.
Step2: Click Next -> Accept license agreement
Step3: Select Installation Directory.
Installation Directory: E:/CVS_NT
Step4: Click Next and Select Full Installation
Step5: Click Next -> Next -> Next -> Install
Configure the CVS Server:
Step1: Select Start -> All Programs -> CVSNT -> Service Control panel
Step2: Click on Stop Button for CVS Service and CVS lock service.
Step3: Select SSL Setting tab, and make sure that SSL certificate file and SSL Private
Key file are pointing to E:/CVS_NT/cvsnt-default.pem. If it is not pointing then
change and click on Apply button.
Step4: Select the Advanced tab and check the following:
-> Check the checkbox- use local server for pserver authentication instead of
domain user.
-> make sure that Temporary directory is pointing to E:/CVS_NT/Temp
-> CVS server port: 2401 (By default)
-> Lock Server port: 2402 (By default)
-> Click on Apply button.
Step5: select the Repository tab where you can create or Remove Repositories.
Step6: Add the Repository as Follows. (Repository is a location/directory in your
system where All Project code will be placed, so that all developer can access from
that location easily)
-> Click on Add button.
-> Provide the below information and click OK:
Location: E:/CvsServerRep
Name: /CvsServerRep
-> It display a Pop-up Message- “E:/CvsServerRep exists, but not a valid CVS
Repository. Do you want to initialize it?” Click on Yes.
(After clicking on Yes button, automatically one CVSROOT named folder will
be placed inside E:/CvsServerRep)
-> Click on Apply button.
Step7: Select Service Status tab and start both the services.
(If CVS Lock service will not be started then from the status bar of your computer
system, which is generally available in right-bottom of system, find CVSNT Lock
Service, select -> Right Click -> Quit)
Step8: Click on OK Button of main windows.

Create the CVS user For CVS Server:


CVS user will be created by Admin. For every developer and project leader one user
account (id + password) will be created, to access/manage CVS Server Repository.
Using their user account all developer and Project leader can perform all operation
like Check-Out, Check-In/Import, Commit, update etc. on CVS Repository.
Note: At the time of CVS server installation, automatically it creates one user
“CVSMANAGER_USER”. It is default user of CVS server and you can set its password
through window user setting.
Step1: Open command prompt as Administrator
Step2: Set CVSROOT using below command.
Set CVSROOT=:sspi:localhost:/CvsServerRep
Step3: Create user
cvs passwd –r administrator –a Deepak
OR
cvs passwd –r CVSMANAGER_USER –a Deepak
Step4: Enter the password: deepak123 and then Click on Enter button
Step5: Verify the password and then Click on Enter button

User creation done, Close the command prompt.


Setup CVS Client:
You can use one of the following as CVS client.
1) WinCVS
2) Eclipse
3) Netbeans Etc.

 Install WinCVS and python (2.4.2)


 Install Eclipse and jdk1.8

Project Initiation: Creating the fresh/new project with required jars, images,
css, basic configuration (Hibernate config, Spring config), code for some
functionalities etc. It will be done only once for each project.

Check-in or Import the Project/module: After project initiation, when


Entire project (either newly created or old) is move to CVS server Repository from
project folder then this process/operation is called Checked-in or Import. It will be
done only once for each project.
(Note: Some member of your project (may be project leader) will be responsible
to initiating the project and Importing into CVS Server Repository.)

Step1: Open WinCVS (In client machine). All developer will install WinCVS in their
system to access CVS Server repository.
Step2: Point the Directory where newly created project is available in your
system. Suppose Project Name: A2ZBank
Project Directory: D:/NewProject
Step3: From the left panel of WinCVS, select project and right click and then select
Import module.
Step4: Import filter window will be displayed and click on Ok button.
Step5: Import setting window will be displayed, in this window
1) Specify Repository Path (Name of Project): A2ZBank
2) Specify CVS Root (Information about user and CVS Server Repository
location where you want to import the project)
 Click on browse Button and click Ok
 Select Protocol: pserver
 Repository Path: / CvsServerRep
 Username: Deepak
 Password: deepak123
 Host: localhost
 Port: 2401
 Enter log message: importing project
3) Click on OK Button.

Now entire project will be moved from developer machine project folder
(D:/NewProject) to CVS server repository (E:/CvsServerRep).

Check-Out the Project/Module:


Once project will be initiated and it will be imported by any team member in to CVS
server repository, as a developer your job will be only to check-out the project,
commit the source file to CVS server and update the source file from CVS server.
Check-out: To move entire project freshly from CVS server to developer machine,
is called Check-out.
Commit: After modifying an individual file, you should move the updated file to
CVS server. Moving one individual file from developer machine to CVS server is
called commit. To commit the file, select it, right click and click on commit.
(After committing a file successfully, automatically its version will be increased.
Ex- From 1.1 to 1.2 or From 1.2 to 1.3)
Update: Getting/moving an individual file from CVS server to developer machine
is called Update. To update the file, select it, right click and click on update.
As a developer, you should not start to work over any file directly because may be
some other team member had modified and committed that file into server and
you are still working on old file. So, whatever the modification will be done by
other member will not be available to your old file and it may cause ‘Conflict’
problem. That’s why to get the modified file into your system, first Update the file
and then use it.

Check-Out the project using WinCVS:


Step1: Create a folder (in developer machine) in which you want to move Project
from CVS Server Repository.
Suppose Directory is: F:/MyProjects
Step2: Open WinCVS
Step3: Point the WinCVS to directory F:/MyProjects
Step4: Select Remote and click on Checkout module
Step5: Checkout setting window will be opened.
1) Specify Module Name (Name of Project): A2ZBank
2) Specify CVS Root (Information about user and CVS Server Repository
location from where you want to move the project)
 Click on browse Button and click Ok
 Select Protocol: pserver
 Repository Path: /CvsServerRep
 Username: Deepak
 Password: deepak123
 Host: localhost
 Port: 2401
 Enter log message: checkout project
 Click on OK button
3) Click on OK Button of Checkout window.
Now entire project will be moved from CVS server repository (E:/CvsServerRep) to
developer machine project folder (F:/MyProjects)

Check-Out the project using Eclipse:


1. Create a CVS Repository:
Step1: Create a folder (in developer machine) in which you want to move Project
from CVS Server Repository.
Suppose Directory is: F:/MyProjects
Step2: Open Eclipse with workspace F:/MyProjects
Step3: Create the CVS Repository in Eclipse as follows:
Click on window -> Perspective -> Open Perspective -> others -> CVS
Repository Exploring -> click on Open
Step4: Right click anywhere in CVS Repository tab (In left side panel of eclipse)
and then select New -> Repository Location-> Provide following information:
Host: localhost
Repository Path: /CvsServerRep
Username: Deepak
Password: deepak123
Connection Type: pserver
Use default port (2401)
Check the box to save the password (If you want to save)
Click on Finish button.

(Now in CVS Repository, expand the Tree, under Head, project will be available.)
2. Check-Out the project from Eclipse CVS Repository to Eclipse project:

Step1: Click on File -> New -> Other


Step2: select CVS -> Project from CVS -> Next
Step3: Use existing repository location -> Next
(if it will ask for password then enter CVS user password like for user
deepak password is deepak123)
Step4: Use existing module -> Select the Module A2ZBank (It will show all the
project which will be available in the CVS server Repository, you just select your
project in which you have to work) -> Next
Step5: Click on Next -> Finish
Step6: Click on Click on window -> Perspective -> Open Perspective -> others ->
Java -> click on Open

Now Project will be available as java project in Eclipse.

Das könnte Ihnen auch gefallen