html5-img
1 / 28

Deel III: Paradigma’s Software Ontwikkeling 1. Concurrent Versions System (CVS)

Deel III: Paradigma’s Software Ontwikkeling 1. Concurrent Versions System (CVS). Prof.Dr.Ir. Filip De Turck. Structuur Deel III. Concurrent Versions System (CVS) Make-bestanden versus Ant Recente talen en gedistribueerde applicaties: Ruby Web services Ontwerp van Telecom-diensten

brilliant
Download Presentation

Deel III: Paradigma’s Software Ontwikkeling 1. Concurrent Versions System (CVS)

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. Deel III: Paradigma’s Software Ontwikkeling 1. Concurrent Versions System (CVS) Prof.Dr.Ir. Filip De Turck Vakgroep Informatietechnologie

  2. Structuur Deel III • Concurrent Versions System (CVS) • Make-bestanden versus Ant • Recente talen en gedistribueerde applicaties: • Ruby • Web services • Ontwerp van Telecom-diensten • Video-conferentie applicaties • Software voor mobiele toestellen • Andere voorbeelden Software Ontwikkeling I

  3. Outline • CVS - Concurrent Versions System • What’s CVS • Proper usage • Tagging, branching, merging • Sample File Header • CVS implementation and alternatives Software Ontwikkeling I

  4. CVS - What’s CVS • CVS … • … is a server system, that stores files in a general place • … allows several people to access these files, and elaborate them at the same time • … keeps “track changes” you’ve made to the file • … allows to see the differences through time • CVS often is misused … • … as a simple backup system • … without a proper structure Software Ontwikkeling I

  5. CVS Server checkout Another desktop Your desktop CVS - What’s CVS - checkout • The server contains the data • All data are called “the repository” • You get the files by checking out a copy from the server to your local PC • Everybody can access the data • If you don’t care, everybody can access • You can create a list of “only-allowed” Operating Systems: Linux, Windows, FreeBSD, Mac OS X License: GNU General Public License Software Ontwikkeling I

  6. CVS - What’s CVS - modules • When checking out, you get a “module” • A module is a grouping of data • A module contains files, directories, … Software Ontwikkeling I

  7. CVS Server commit Local edit Your desktop CVS - What’s CVS – commit • Checkout and commit • After checking out a module, you can locally edit your files • After editing, your local copy differs from the one on the server • You synchronize your local copywith the server by committing your changes Software Ontwikkeling I

  8. CVS Server CVS - What’s CVS – diff • Only a diff is stored • When committing a new file, the old file is not simply overwritten. • A diff is made with the previous file, and this is stored. • Your file gets a new version number,a log message is attached. • The log contains a brief descriptionof the changes you’ve made • Yes, you have to do this yourself Foo.c 1.1 1.2 Log Msg Software Ontwikkeling I

  9. CVS - What’s CVS – diff (2) • Since a diff is stored… • the server contains all versions • you can browse through the history and changes Software Ontwikkeling I

  10. CVS Server update Another desktop Your desktop CVS - What’s CVS – first checkout • After a commit • Your PC contains the latest version • The repository contains all version, including the last • Another user still has the previous version • He needs to update before he starts working • Always first checkout / update before you start working on a module Software Ontwikkeling I

  11. CVS Server commit update Another desktop commit update Your desktop CVS - What’s CVS – different people • Several people can work at the same time • on different files: • I’m working on file A • You’re working on file B • We both commit • Every one checks out again, and has the most recent versions • Always update first! • on the same file: • When both working on a different section, it’s merged • When there’s a conflictit’s reported Software Ontwikkeling I

  12. CVS - Proper usage – do’s • Do’s • Working on an existing module: • Check out before working on files • Commit after you’ve finished • Add a comment, indicating your changes • Creating a new module / new file: • Plan your directory structure: • setup notes don’t belong in between software • a separate directory for figures might be handy • Think of a proper name • E.g. practicum.tex doesn’t say a lot • A new module is normally only committed, once a “stable version” is created Software Ontwikkeling I

  13. CVS - Proper usage – don’ts • Don’ts • Don’t commit changes without a Message Log. • Even “typo fixed” is valid • CVS is designed for text based files, not for binaries: • Don’t commit the compiled versions of source code • Don’t commit the pdf’d version of a tex file • Don’t commit every tiny change of a jpeg file • Don’t put everything in one directory, and afterwards try to sort it out: • Moving a file or a directory isn’t possible • Removing files actually doesn’t happen Software Ontwikkeling I

  14. CVS - Proper usage – don’ts in practice Geen log message ! Software Ontwikkeling I

  15. CVS - Proper usage – don’ts in practice Geen structuur ! Software Ontwikkeling I

  16. Outline • CVS - Concurrent Versions System • What’s CVS • Proper usage • Tagging, branching, merging • Sample File Header • CVS implementations and alternatives Software Ontwikkeling I

  17. CVS - Tagging • After working for a while… • Some files needed a lot of changes, others didn’t • Each file has different revisions, e.g. 5 +-----+ +-----+ +-----+ +-----+ +-----+! 1.1 !----! 1.2 !----! 1.3 !----! 1.4 !----! 1.5 !+-----+ +-----+ +-----+ +-----+ +-----+ • At a certain moment, you can put a tag on your current version • E.g. rel-1-1 • E.g. version2006 • The revision numbers don’t change, you add an extra label as a human understandable reference Software Ontwikkeling I

  18. CVS - Tagging • A bunch of files for example • After tagging, some files are further developed • You can now easily get back to the different revisions of that moment by “pulling the tag” file1 file2 file3 file4 file5 1.1 1.2 1.1 1.3 _ 1.1 1.2 1.4 1.1 / 1.2*----1.3*----1.5*----1.2*----1.1* (--- <--- Look here 1.3 1.6 1.3 \_ 1.4 1.4 1.5 file1 file2 file3 file4 file5 1.1 1.1 1.1 1.1 /--1.1* <-*- TAG 1.2*- 1.2 1.2 -1.2*- 1.3 \- 1.3*- 1.3 / 1.3 1.4 \ 1.4 / 1.4 \-1.5*- 1.5 1.6 Software Ontwikkeling I

  19. CVS - Branching • Usage • You have a huge bug since v1.2, and you need to fix it to release a patch to people using v1.2 • You want to try something out based on 1.2, but leave version 1.5 alone +-------------+ Branch 1.2.2.3.2 -> ! 1.2.2.3.2.1 ! / +-------------+ / / +---------+ +---------+ +---------+ Branch 1.2.2 -> _! 1.2.2.1 !----! 1.2.2.2 !----! 1.2.2.3 ! / +---------+ +---------+ +---------+ / / +-----+ +-----+ +-----+ +-----+ +-----+ ! 1.1 !----! 1.2 !----! 1.3 !----! 1.4 !----! 1.5 ! <- The main trunk +-----+ +-----+ +-----+ +-----+ +-----+ ! ! ! +---------+ +---------+ +---------+ Branch 1.2.4 -> +---! 1.2.4.1 !----! 1.2.4.2 !----! 1.2.4.3 ! +---------+ +---------+ +---------+ Software Ontwikkeling I

  20. CVS - Merging • Usage • You have a huge bug since v1.2, and you need to fix it to release a patch to people using v1.2 • The bug is still in v1.4, and you want to apply the same changes • Go back to the trunk • Join the changes of v1.2.2.2 into a new v1.5 +-----+ +-----+ +-----+ +-----+ +-----+ ! 1.1 !----! 1.2 !----! 1.3 !----! 1.4 !----! 1.5 ! <- The main trunk +-----+ +-----+ +-----+ +-----+ +-----+ ! * ! * ! +---------+ +---------+ Branch R1fix -> +---! 1.2.2.1 !----! 1.2.2.2 ! +---------+ +---------+ Software Ontwikkeling I

  21. Outline • CVS - Concurrent Versions System • What’s CVS • Proper usage • Tagging, branching, merging • Sample File Header • CVS implementations and alternatives Software Ontwikkeling I

  22. CVS - Sample File Header /************************************************** Filename: $Id$ Author: $Author$ Last Changed: $Date$ Log: $Log$ ***************************************************/ … (further contents of file) … Software Ontwikkeling I

  23. CVS - Keywords in file header • $Author$ • The user name • $Date$ • The date and time of the revision was checked in. • $Header$ • A standard header containing the full pathname of the file, the revision number, the date, the author • $Id$ • Same as Header: but file name doesn't have path. • $Name$ • Tag name used to check out this file.  • $Log$ • Stores log message. • $Revision$ • The revision number assigned to the revision Software Ontwikkeling I

  24. Outline • CVS - Concurrent Versions System • What’s CVS • Proper usage • Tagging, branching, merging • Sample File Header • CVS implementations and alternatives Software Ontwikkeling I

  25. CVS - Implementations • Tortoise CVS: • a shell-integrated CVS client for Windows • Subversion: • an open-source revision control system • DCVS: • a distributed revision control system based on CVS • Bonsai CVS code management system: • a tool to reports on files, directories, and branches under CVS management. • Commercial: IBM Rational Clear case, etc. Software Ontwikkeling I

  26. Deel III: Paradigma’s Software Ontwikkeling 2. Make-bestanden versus Ant Prof.Dr.Ir. Filip De Turck Vakgroep Informatietechnologie

  27. Make files • to automate the build process • cfr overview in Minerva folder Extra_Notes/unix_makefiles.pdf • Java alternative: Ant http://supportweb.cs.bham.ac.uk/docs/tutorials/docsystem/build/tutorials/ant/ant.pdf (ook beschikbaar op Minerva : Extra_Notes/ant.pdf) Software Ontwikkeling I

  28. Maven • Maven is a software tool for Java programming language project management and automated software build. • Similar in functionality to the Apache Ant tool but has a simpler build configuration model, based on an XML format. • Maven is hosted by the Apache Software Foundation, where it was formerly part of the Jakarta Project. • Maven uses a construct known as a Project Object Model (POM) to describe the software project being built, its dependencies on other external modules and components, and the build order. • It comes with pre-defined targets for performing certain well defined tasks such as compilation of code and its packaging. • Support for download plugins on network repositories and upload completed builds http://maven.apache.org/ Software Ontwikkeling I

More Related