260 likes | 266 Views
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.
E N D
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 in this tab Click Using server setting dialog window, specify the location and name of repository Make sure the CVSNT Service and the CVSNT Lock Service are running! Open control panel and click on ‘cvs for NT’. You will see the following window. Click Add to start Conf.
Defining Browse Location Click here to open ‘Browse for Folder’ window Launch WinCvs and follow the instruction for proper configuration Your folder should appear here Select the folder you want to work on. As an example we will use the ExamSummary folder
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 After verifying the settings, click here for CVSROOT configuration Right click on the folder and select ‘import module’ Here you need to specify the server protocol. If there is any file you do not want, click Edit and select ignore. Then click OK to continue importing the path used as repository This path is
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 Make sure the module name is correct To checkout a module, right click and select ‘checkout module…’ 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 Close the editor and click ok to save the changes We calculate the sum and average here We add variable to hold the sum and average We display the result in the command
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. the changes Click here to commit Good 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 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 Make sure the file you want to lock is highlighted
Locking a file Lets just attempt to make a change to the same file by a different user.
Locking a File 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/#W atching%20Files