1. Project Version Management with
CVS
Concurrent Versions System
K.Bala Vignesh
kbalavignesh@gmail.com
Indian Linux Users Group ÂChennai
Concurrent Versioning System Indian Linux Users GroupÂChennai
2. Versioning Software â Why Bother?
â Projects get messy
â Unnecessary Duplication
â Working with other developers is hard!
â Difficult for comparison
â No Revert Back
Concurrent Versioning System Indian Linux Users GroupÂChennai
3. The Goals of Version Management
â Record Keeping
â Any previous version available at any moment
â Collaboration
â Ease synchronization between developers
Concurrent Versioning System Indian Linux Users GroupÂChennai
4. History Of CVS
"I created CVS to be able to cooperate with my
students Erik Baalbergen and Maarten Waage on
the ACK (Amsterdam Compiler Kit) C compiler.
The three of us had vastly different schedules
(one student was a steady 9Â5
worker, the other
was irregular, and I could work on the project
only in the evenings). Their project ran from July
1984 to August 1985. CVS was initially called
cmt, for the obvious reason that it allowed us to
commit versions independently."
â Dick Grune, Dick Grune's website
Concurrent Versioning System Indian Linux Users GroupÂChennai
5. Terminology
Repository
Commit
Sand Box
Update
Sand Box
First Time
Sand Box
Check Out
Concurrent Versioning System Indian Linux Users GroupÂChennai
6. The âRepositoryâ
Devi Local Version
1.1
Checkout
Muthu Local Version
1.1
a.php Version 1.1
<?php
echo âHello Worldâ;
?>
Asha Local Version
1.1
Concurrent Versioning System Indian Linux Users GroupÂChennai
7. Make Change and Commit
The âRepositoryâ
I
changed
logic
Devi Local Version
1.2
Commit
Muthu Local Version
1.1
a.php Version 1.1
<?php
echo âHello Worldâ;
echo âhiâ;
?>
Asha Local Version
1.1
Concurrent Versioning System Indian Linux Users GroupÂChennai
8. The âRepositoryâ
Devi Local Version
1.2
Update
Muthu Local Version
1.1
I need
Up to
Update Date
Asha Local Version
1.2
Concurrent Versioning System Indian Linux Users GroupÂChennai
9. Commit and Conflict
The âRepositoryâ
a.php Version 1.1
<?php
echo âHello Worldâ;
echo âhiâ;
?>
Devi Local Version
1.2
Muthu Local Version
1.1
I Changed
Code.
<?php
print âHello Worldâ;
?>
Asha Local Version
1.2
Concurrent Versioning System Indian Linux Users GroupÂChennai
10. Update and then Commit
The âRepositoryâ
Devi Local Version
1.2
Commit
Error
Muthu Local Version
1.1
Old Version.
So,Update First
Asha Local Version
1.2
Concurrent Versioning System Indian Linux Users GroupÂChennai
11. The âRepositoryâ
Devi Local Version
1.2
Conflicts
Update
Muthu Local Version
1.1
Asha Local Version
1.2
Concurrent Versioning System Indian Linux Users GroupÂChennai
12. Conflicts
a.php Version 1.1 a.php Version 1.2
<?php
echo âHello Worldâ;
?>
<?php
echo âHello Worldâ;
echo âhiâ;
?>
<?php
print âHello Worldâ;
?>
a.php Version 1.1
<?php
echo âHello Worldâ;
?>
Update
Conflicts
<?php
<<<<<a.php
print âHello Worldâ;
=======
Echo âHello Worldâ;
echo âhiâ;
>>>>>>1.2
?>
a.php Version 1.3
<?php
print âHello Worldâ;
echo âhiâ;
?>
Concurrent Versioning System Indian Linux Users GroupÂChennai
13. Conflicts Corrected
The âRepositoryâ
Devi Local Version
1.2
Commit
Muthu Local Version
1.3
a.php Version 1.3
<?php
print âHello Worldâ;
echo âhiâ;
?>
Asha Local Version
1.2
Concurrent Versioning System Indian Linux Users GroupÂChennai
14. Other Features
⢠Creating snapshot using Tags.
⢠Creating branches of the project.
⢠Pserver for remote ClientÂServer.
⢠Finding out who did what (Log messages)
⢠Revert back to any position.
⢠Watching the files.
Concurrent Versioning System Indian Linux Users GroupÂChennai
15. CVS and OS Support
â Relatively simple
â Available on a wide number of platforms
â Clients
â Most Linux distributions come with CLI client
â Available for Mac & Win32, CLI & GUI
â Server
â Linux CLI program is the server
â Win32 server available
Concurrent Versioning System Indian Linux Users GroupÂChennai
16. â Linux
CVS Server
â Generally comes with your distribution
â Windows
â CVSNT Âhttp://
cvsnt.org
â Mac OS X
â Comes with the free developer tools
Concurrent Versioning System Indian Linux Users GroupÂChennai
17. GUI CVS Client
â Free
pclÂcvs
ÂAn
Emacs Interface To CVS
Cervisia â With KDE Desktop
WinCVS Âhttp://
www.wincvs.org/
MacCVS Âhttp://
www.wincvs.org/downloads.html
TortoiseCVS Âhttp://
www.tortoisecvs.org/
Eclipse Âhttp://
eclipse.org
â Commerical
SmartCVS Âhttp://
smartcvs.com
Concurrent Versioning System Indian Linux Users GroupÂChennai
18. CVS and Open Source
⢠CVS and SSH clients are used by most
developers on SourceForge.net
and freshmeat.
⢠Most of the projects in opensource are
maintained by CVS.
Concurrent Versioning System Indian Linux Users GroupÂChennai
19. CVS Resources
â CVS Home Âhttp://
ximbiot.com/cvs/cvshome/
â Web Site Projects with CVS Âhttp://
www.durak.org/cvswebsites/howtoÂcvs/
â Open Source Development with CVS Âhttp://
cvsbook.redÂbean.
com/
Concurrent Versioning System Indian Linux Users GroupÂChennai
20. Advantages over CVS
SubVersion
⢠Atomic commits. Interrupted commit operations do not cause repository
inconsistency or corruption.
⢠Renamed/copied/removed files retain full revision history.
⢠Native support for binary files, with spaceÂefficient
binaryÂdiff
storage.
⢠Directories are versioned. Entire directory trees can be moved around
and/or copied very quickly, and retain full revision history.
⢠Constant time branching and tagging.
⢠Optimized repository accesses. This reduces unnecessary network traffic to
the repository host.
Concurrent Versioning System Indian Linux Users GroupÂChennai