1 / 16

Versioning Systems

Versioning Systems. Has one of your projects ever looked like this ?. Working alone : Probably manageable Working in a group : Good luck!. Versioning Systems: Ways of avoiding a repository “mess”. Versioning Systems allow: To store one master copy of the source code

huela
Télécharger la présentation

Versioning Systems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  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. 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 CVS do’s and dont’s ……

  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_RSH=ssh” • 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 <file1>,<file2>,… • 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 <file1>,<file2>,… • cvs commit • To add an entire directory of source files • cvs import <repository> <vtag> <rtag> • 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 <file1>,<file2>,… • cvs remove <file1>,<file2>,… • 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 <branchname>

  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/withLimit 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 GNU’s site on CVS: http://www.gnu.org/manual/cvs/html_chapter/cvs_20.html CVS Man page: http://hoth.stsci.edu/man/man1/cvs.html

More Related