Title: Concurrent Versioning System
1Concurrent Versioning System
2Agenda
- Benefits of using CVS
- How to use command line interface of the CVS on
GAUL - How to use winCVS to connect to CVS repository on
GAUL - Useful tips
3Benefits
- Parallel Collaboration
- Ensure working on most recent version
- Conflict Annotation
- Check points / milestones / releases
- History
4How to achieve Parallel Collaboration
- Common working area
- Contains initial version of the project (initial
release) - Accessible by all team members
- Changes controlled and logged
5How to achieve Parallel Collaboration using CVS
- Common working area
- Repository
- /gaul/special/cs307/cs307-XX ? for G8XX
6How to achieve Parallel Collaboration using
CVSCommon Working Area
- Create a directory (optional)
- /gaul/special/cs307/cs307-XX/cvs_rep
- Set CVSROOT environment variable
- Csh/tcsh
- setenv CVSROOT /gaul/special/cs307/cs307-XX/cvs_re
p/ - Bash/sh
- export CVSROOT/gaul/special/cs307/cs307-XX/cvs_re
p/ - Create a repository
- cvs init
7How to achieve Parallel Collaboration using
CVSProjects initial release
- cd to the directory containing the project
- cvs import m ltdescriptiongt ltproject namegt
ltvendor taggt ltrelease taggt
8How to achieve Parallel Collaboration using
CVSAccessible by all team members
- Set the group ownership of the repository
- chgrp -R cs307-XX CVSROOT
- Give rwx permissions to the group
- chmod -R grwx CVSROOT
9How to achieve Parallel Collaboration using
CVSChanges are controlled and logged
- No one has write permissions on the files in the
repository - Each developer should have a local working copy
- cvs checkout ltproject namegt
- A directory of the project is created
- CVS directory contains administrative files
10(No Transcript)
11How to achieve Parallel Collaboration using
CVSChanges are controlled and logged
- Submit changes to the repository
- cvs commit
- Get latest version
- cvs update
- Remove file
- Remove it from working directory
- cvs remove ltfile namegt ? scheduled for removal
- cvs commit ? actually removed
- Add file
- Create the file in your working copy
- cvs add ltfile namegt ? scheduled
- cvs commit ? actually added
12How to achieve Parallel Collaboration using
CVSEnsure working on most recent version
- Suppose two developers checked out the files of
the project - Both of them made changes
13How to achieve Parallel Collaboration using
CVSEnsure working on most recent version
- One of them commits their work after ensuring
that the local copy compiles
14How to achieve Parallel Collaboration using
CVSEnsure working on most recent version
- The other developer now doesnt have the recent
version, so when trying to commit it fails
15How to achieve Parallel Collaboration using
CVSEnsure working on most recent version
- CVS will require Bob to update his local version
first - After ensuring that the updated version works he
can commit his work
16How to achieve Parallel Collaboration using
CVSConflict Annotation
- What if both developers were working on the same
file - If changes were in different lines, CVS merges
the two copies - If changes were in same line, CVS annotate a
conflict and directs the developer to solve it
17How to achieve Parallel Collaboration using
CVSConflict Annotation
Changes in same file but different lines
18How to achieve Parallel Collaboration using
CVSConflict Annotation
Changes in same file but different lines
Conflict annotated
19How to achieve Parallel Collaboration using
CVSConflict Annotation
Changes in same file but different lines commit
after resolving conflict
20How to achieve Parallel Collaboration using
CVSEnsure working on most recent version
- cvs status ltfile namegt
- Up-to-date ? identical with last revision in the
repository - Locally modified ? you updated the file but
didnt submit yet - Needing Patch ? other developer committed changes
to the repository - Needs Merge ? other developer committed changes
to the repository and you made some changes as
well
21How to achieve Parallel Collaboration using
CVSCheck points / milestones /releases
- cvs tag ltdescriptive tag releasegt
- Adds the given tag to all the files of the
project - cvs checkout r ltreleasegt ltprojectgt
- Checks out the specified release of the project
instead of the latest release
22How to achieve Parallel Collaboration using
CVSHistory
- cvs log ltfile namegt
- Information about different revisions of the file
including the date of change, the author and
number of lines of added or removed - cvs annotate ltfile namegt
- Each line in the file
- Date , reversion and author
23winCVS
- Download latest version (2.1.1.1)
- cvsgui.sourceforge.net
- Install winCVS on your computer
24winCVS
25(No Transcript)
26- Folders controlled by CVS are distinguished by a
check mark - We can update/commit the contents of a folder
using the context menu
27- Cannot edit files if out dated
- Changed files are marked by red color
- You can edit the files using the editor you
choose (default Notepad)
28- Admin ? preferences
- WinCvs tab
29Useful tips
- Whenever you work on the project start by
updating - Make sure that your local copy compiles and works
before committing - Whenever you make changes add a descriptive
understandable comment - Make periodical backups for your local copies
30Summary
- CVS provide a controlled common working area
called Repository - Several developers can work in parallel, each
works in their own local working copy - CVS provide commands to synchronize the local
copies with the repository - CVS keep a log of all changes
- winCVS is a windows-based CVS client that can
connect to CVS repository via SSH
31cvs commands
- init ? create the repository
- checkout ? to create local working copy (-r
option to copy a specific release) - update ? update the local copy to be synchronized
with the repository - commit ? submit changes to the repository
- add ? to add a file
- remove ? to remove a file
- status ? view the status of a specific file
- tag ? add a tag to all files
- log ? view a log of a specific file
- annotate ? view contents of a specific file
annotated by extra information