Versioning Systems - PowerPoint PPT Presentation

1 / 16
About This Presentation
Title:

Versioning Systems

Description:

Working in a group : Good luck! Versioning Systems: Ways of avoiding a ... To store one master copy of the source code. multiple users to modify the same code ... – PowerPoint PPT presentation

Number of Views:64
Avg rating:3.0/5.0
Slides: 17
Provided by: vinc181
Category:

less

Transcript and Presenter's Notes

Title: Versioning Systems


1
Versioning Systems
Has one of your projects ever looked like this ?
Working alone Probably manageable Working in a
group Good luck!
2
Versioning Systems Ways of avoiding a repository
mess
  • Versioning Systems allow
  • To store one master copy of the source code
  • multiple users to modify the same code
  • automated updates between versions
  • Access to any previous state of the source code

3
CVS dos and donts
  • Facilitates bug detection when software is
    modified
  • Economy in disk space while saving versions
  • Prevents code over-writing in a team project
  • Not a build system
  • Not a substitute for communication between
    developers or for management
  • No change control available

4
Revision numbers
5
DISCOVER example session Variables
  • Setting up variables
  • CVS_RSH What remote shell to use
  • CVSROOT Tells where the repository is
  • Example
  • sh/ksh export CVS_RSHssh
  • csh setenv CVS_RSH ssh
  • sh/ksh export CVSROOT/caip/u2/DevGroup/cvsroot/
  • csh setenv CVSROOT /caip/u2/DevGroup/cvsroot

6
DISCOVER example session Getting the source
code
  • Get to a working directory on local computer (cd
    /work/)
  • cvs checkout DISCOVER/Client/java or
  • cvs co DISCOVER/Client/java
  • Will download all source files into the current
    directory.
  • Similarly using Module name Client
  • cvs co Client

7
DISCOVER example session Committing a change
  • Checking file in repository
  • cvs commit ltfile1gt,ltfile2gt,
  • If no filename is given all files are scanned by
    CVS and all modified files are committed.

8
DISCOVER example session Adding a file
  • To add a file or directory to be checked by CVS
  • cvs add ltfile1gt,ltfile2gt,
  • cvs commit
  • To add an entire directory of source files
  • cvs import ltrepositorygt ltvtaggt ltrtaggt
  • repository is the directory name in the
    repository
  • vtag is a vendor tag for entire branch 1.1.1
  • rtag is a release tag

9
DISCOVER example session removing a file
  • Local file needs to be deleted and then removed
    from the repository
  • rm ltfile1gt,ltfile2gt,
  • cvs remove ltfile1gt,ltfile2gt,
  • cvs commit

10
Branches
  • Tag symbolic name for revision of file
  • -v flag in status see tags and rev. nos.
  • Tag all files at strategic points release
  • -r flag in checkout checkout a rev. no.
  • Need for branches good for bug-fixing
  • Put modified code in branch and later merge with
    main trunk

11
DISCOVER example session branching out
  • Create your independent branch (harmless to the
    main trunck)
  • cvs b r release1-0 release1-0-patch SRC
  • Merging a branch back to the main trunck
  • cvs j ltbranchnamegt

12
Modules
  • modules are alias names to projects kept in the
    repository.
  • More convenient to call a module name rather
    than a long pathname
  • Example
  • If repository is in
  • /home/cvsroot/Project_AX/Client/Synchronous/withLi
    mit
  • A module could declare this simply as Client

13
Defining the module
  • Get working copy of modules file
  • Edit file to define new module
  • Commit changes to modules file
  • Release the working copy
  • Eg - cvs checkout CVSROOT/modules
  • new line newdir newcode/newdir
  • cvs commit m Added module modules
  • cvs release d modules

14
cvs Status
  • Status gives the state of the file
  • Up-to-date latest revision
  • Locally modified not committed changes
  • Locally added added but not committed
  • Locally removed removed, not committed
  • Needs checkout, Needs merge
  • Unresolved Conflict update conflict
  • Unknown

15
Tracking mechanisms
  • cvs watchinfo to inform other about commits
  • cvs watch on/off places watch on files
    working copies created as read-only
  • cvs watch add/remove CVS notification
  • cvs edit/unedit edit/abandon watched files
  • cvs watchers/editors list of users watching
    changes or working on files

16
Links
GNUs site on CVS http//www.gnu.org/manual/cvs/h
tml_chapter/cvs_20.html CVS Man
page http//hoth.stsci.edu/man/man1/cvs.html
Write a Comment
User Comments (0)
About PowerShow.com