Upload
brianna-emmeline-franklin
View
230
Download
0
Tags:
Embed Size (px)
Citation preview
WinCvs
WinCVS
WinCvs is a window based version control system. Use WinCvs when
You want to save every version of your file you have ever created. CVS stores all the version of the file in a single file in a clever way that only stores the differences between versions.
You are a part of a group of people working on the same project, and you want to prevent overwrite each others' change. CVS solves this by insulating the different developers from each other.
You want to record the history of your file, and you want to easily retrieve the old versions to see exactly the changes made to the file.
Installation
Install the following products; WinCvs CVSNT - required by WinCVS for basic CVS functionality. It may be
included in the WinCVS installer. Python - used by WinCvs for scripting support. Win32 extensions for Python - maybe required by python for some
functionalities. WinMerge - Not required but recommended since it is a good tool for
Diff.
Note: All of the above components are open source and can be installed using their simple instructions.
Server Configuration
Open control panel and click on ‘cvs for NT’. You will see the following window.
Click in this
tab
Click Add to start Conf.
Using server setting dialog window, specify
the location and name of repository
Make sure the CVSNT Service and the CVSNT Lock Service are
running!
Defining Browse LocationClick here to open ‘Browse
for Folder’ window
Select the folder you want to work on. As an example we will
use the ExamSummary folder
Your folder should
appear here
Launch WinCvs and follow the instruction
for proper configuration
Importing a Module
Getting a project under version control is called Importing.
The following pictorial slide will demonstrate how to import a module to the CVS server.
Importing Module
Right click on the folder and select ‘import
module’
If there is any file you do not want, click Edit and select ignore. Then click
OK to continue importing
After verifying the settings, click here
for CVSROOT configuration
Here you need to specify the server
protocol.
This path is the path used as repository
Importing Module
If successful, you should see the files with check marks
Also you should see message similar to this
Checking out a module
To obtain a module from the CVS server for the first time is known as a checkout.
Checking out from the repository gives you a local copy of the module.
To perform checkout, follow the following pictorial slides.
Checking out a module
To checkout a module, right click and select ‘checkout module…’
Make sure the module name is correct
Select the local folder of your
choice
Click OK to perform
Check out
Checking out a module
Make sure the module is checked
out and no error
Editing
The following slides shows you how to edit a file and later check the difference and commit the change.
In addition, you can lock the file so that no other developer can commit a change until you unlock it or check in the file
Editing using WinCvs
Double click on the file you want to edit. In this
case ‘Stat.cs’Just click ok the
default to open in the default editor
Editing
Lets update this program to calculate the average of the five
test scores.
Editing
We add variable to hold the sum and
average
We calculate the sum
and average
here
We display the result in the command
Close the editor and click ok to
save the changes
Viewing the Difference
Click ‘Query’ and select ‘Diff’ to view the difference
Click ‘OK’ to display the ‘diff’
Viewing the Difference
Using WinMerge, you can see changes you
made
Committing the Changes
This sign indicates that the file now
committable.Click here to commit
the changesGood to have a message that describes the
change
Click ‘OK’ to commit
Committing a change
No longer committable
Version number assigned to both the
new and old one.
Locking Files
Two developers can modify the same files at the same time. In order to avoid conflict, CVS provides a locking mechanism.
A file that is locked by one developer can not be committed by another developer.
The following pictorial slide will show you how to lock a file.
Locking a file
Make sure the file you want to lock is
highlighted
Click the trace menu and select ‘reserved edit’. Once
you do that it will remain locked until you unlock it or
you check in the file in which case it is going to
unlock automatically
Locking a file
Lets just attempt to make a change to the same file by a
different user.
Locking a File
We commit the
change we made.
The message we get here indicated that the user is not valid and the file is locked.
Therefore we can not commit until it is released by the
other user.
Other Capabilities
Editors – Allows you to see who is currently editing a file.
Watchers – Notifies when someone intends to change a file.
Update – Allows you to update other peoples change.
References
www.wincvs.org www.cvsnt+march-hare.com www.devguy.com/fp/cfgmgmt/cvs/startup/
#Watching%20Files