cvs 簡介 數位芝麻網路公司蔡志展 2001/8/18 大綱 cvs 簡介 cvs 安裝 cvs 設定...

22
CVS CVS 簡簡 簡簡 簡簡簡簡簡簡簡簡 簡簡簡簡簡簡簡簡 簡簡簡 簡簡簡 < < [email protected]> [email protected]> 2001/8/18 2001/8/18

Upload: daniel-silvester-atkinson

Post on 12-Jan-2016

299 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CVS 簡介 數位芝麻網路公司蔡志展 2001/8/18 大綱  CVS 簡介  CVS 安裝  CVS 設定 (Linux/Windows)  CVS 指令簡介  CVS 多人環境的應用

CVS CVS 簡介簡介

數位芝麻網路公司數位芝麻網路公司蔡志展蔡志展

<<[email protected]>[email protected]>

2001/8/182001/8/18

Page 2: CVS 簡介 數位芝麻網路公司蔡志展 2001/8/18 大綱  CVS 簡介  CVS 安裝  CVS 設定 (Linux/Windows)  CVS 指令簡介  CVS 多人環境的應用

大綱 CVS 簡介 CVS 安裝 CVS 設定 (Linux/Windows) CVS 指令簡介 CVS 多人環境的應用

Page 3: CVS 簡介 數位芝麻網路公司蔡志展 2001/8/18 大綱  CVS 簡介  CVS 安裝  CVS 設定 (Linux/Windows)  CVS 指令簡介  CVS 多人環境的應用

CVS 簡介 What is CVS ? Idea of CVS Benefits, Fancy features

Page 4: CVS 簡介 數位芝麻網路公司蔡志展 2001/8/18 大綱  CVS 簡介  CVS 安裝  CVS 設定 (Linux/Windows)  CVS 指令簡介  CVS 多人環境的應用

What Is Concurrent Versions System ?

Version controll system Multi-developer environment

Page 5: CVS 簡介 數位芝麻網路公司蔡志展 2001/8/18 大綱  CVS 簡介  CVS 安裝  CVS 設定 (Linux/Windows)  CVS 指令簡介  CVS 多人環境的應用

Version Management

Software Development Website Management Documentations Synchronization of distributed effort ... anywhere digital data evolves

Page 6: CVS 簡介 數位芝麻網路公司蔡志展 2001/8/18 大綱  CVS 簡介  CVS 安裝  CVS 設定 (Linux/Windows)  CVS 指令簡介  CVS 多人環境的應用

Requirements for VC

Multiple Developers - concurrent Access History View diffs Rollback changes Release Management

Page 7: CVS 簡介 數位芝麻網路公司蔡志展 2001/8/18 大綱  CVS 簡介  CVS 安裝  CVS 設定 (Linux/Windows)  CVS 指令簡介  CVS 多人環境的應用

Idea of CVS The idea of the CVS is to create a filesystem, where each file

has remembers all the modifications made to it. In other words it is all the versions of it at the same time.

Filesystem resides in a repository, that can be stored to local or remote host.

All the files are edited outside of the repository in some working directory and in some phase synchronized with the repository.

Files are moved to, from and updated from repository with special tool called cvs, which is available for most platforms

Page 8: CVS 簡介 數位芝麻網路公司蔡志展 2001/8/18 大綱  CVS 簡介  CVS 安裝  CVS 設定 (Linux/Windows)  CVS 指令簡介  CVS 多人環境的應用

So What is it good for ?

Version controll and connecting multiple developer together in one project, of course :)

Document management and archiving Nice way to do one project with multiple machines and still

manage the versions Allows free experimenting on project Following the growth of the project Backupping - it forces one to take backups with neglible

work very often

Page 9: CVS 簡介 數位芝麻網路公司蔡志展 2001/8/18 大綱  CVS 簡介  CVS 安裝  CVS 設定 (Linux/Windows)  CVS 指令簡介  CVS 多人環境的應用

Benefits of CVS

Automatic, constant and forced backupping When programming, frees the development Gives freedom to choose afterwards, when the program is

ready Saves all the versions for later use Clean way of saving only the necessary files and managing

projects Gives freedom to develop on multiple machines

simultaneously

Page 10: CVS 簡介 數位芝麻網路公司蔡志展 2001/8/18 大綱  CVS 簡介  CVS 安裝  CVS 設定 (Linux/Windows)  CVS 指令簡介  CVS 多人環境的應用

Fancy Features

Multiple developer support (file locking, etc.) Bonsai - www-interface (for example see Gnome

project) Keyword substitutions Development of several version at the same time Multiplatform-support (works even on obscure

platforms like Windows)

Page 11: CVS 簡介 數位芝麻網路公司蔡志展 2001/8/18 大綱  CVS 簡介  CVS 安裝  CVS 設定 (Linux/Windows)  CVS 指令簡介  CVS 多人環境的應用

Essential CVS Terminology - Repository

CVS stores all files in a centralized directory called the repostiory. The directory is defined by the environment variable $CVSROOT.

Page 12: CVS 簡介 數位芝麻網路公司蔡志展 2001/8/18 大綱  CVS 簡介  CVS 安裝  CVS 設定 (Linux/Windows)  CVS 指令簡介  CVS 多人環境的應用

Essential CVS Terminology - Module

Modules are just the toplevel directories in the Repository. You can combine multiple modules in your own directory

structure. See documentation for CVSROOT/modules incorporate generic libraries in your own sourcetree, but be

able to maintain them individually. The files in the repository are organized in modules. Each

module is made up of one or more files, and can include files from several directories. A typical usage is to define one module per project.

Page 13: CVS 簡介 數位芝麻網路公司蔡志展 2001/8/18 大綱  CVS 簡介  CVS 安裝  CVS 設定 (Linux/Windows)  CVS 指令簡介  CVS 多人環境的應用

Version Numbers

Every file in a CVS repository can contain many versions, which are given version numbers in form x.y[.x.y[...]].

The history of each file is tracked with an incrementing revision number

For each revision there is a log entry Revision numbers have the format 1.25 if they're on

the main trunk, branches have something like 1.33.2.16

Page 14: CVS 簡介 數位芝麻網路公司蔡志展 2001/8/18 大綱  CVS 簡介  CVS 安裝  CVS 設定 (Linux/Windows)  CVS 指令簡介  CVS 多人環境的應用

Version Numbers

Version numbering is automatic i.e. number y is automatically incresed avary time file is changed:

1.1 1.2 1.3 1.4 1.5

Page 15: CVS 簡介 數位芝麻網路公司蔡志展 2001/8/18 大綱  CVS 簡介  CVS 安裝  CVS 設定 (Linux/Windows)  CVS 指令簡介  CVS 多人環境的應用

Release Management

marking important stages in the development e.g. milestones, code freezes or actual releases

We want to reproduce the same state later. making bug-fix releases, starting at a specific

release. newly added files should not show up in the old

release files which are deleted in the meantime should still

show up if we reproduce the old state.

Page 16: CVS 簡介 數位芝麻網路公司蔡志展 2001/8/18 大綱  CVS 簡介  CVS 安裝  CVS 設定 (Linux/Windows)  CVS 指令簡介  CVS 多人環境的應用

Tags

A Tag is simply a symbolic name for a specific revision Tagging all files in one directory or module marks the

current stage. Can be used as synonym for a revision in any CVS-

command cvs tag <tagname> applies the tag to the current revision of

each file Version numbers can be treated as a internal information in CVS

and only symbolic names - tags for version used to mark releases.

Page 17: CVS 簡介 數位芝麻網路公司蔡志展 2001/8/18 大綱  CVS 簡介  CVS 安裝  CVS 設定 (Linux/Windows)  CVS 指令簡介  CVS 多人環境的應用

Branches

Version number can contain more than two numbers to mark branches.

Branch can start from any version and start depeloping independently from the rest of the software.

In some point of the development of a branch, it can be merged to main trunk in necessary.

Page 18: CVS 簡介 數位芝麻網路公司蔡志展 2001/8/18 大綱  CVS 簡介  CVS 安裝  CVS 設定 (Linux/Windows)  CVS 指令簡介  CVS 多人環境的應用

Interaction with the repository

Check out Syntax : cvs checkout [options] module ...

Add Syntax : cvs add [options] file ...

Remove Syntax : cvs remove [options] [file ...]

Examine status Syntax : cvs status [options] [file ...]

Page 19: CVS 簡介 數位芝麻網路公司蔡志展 2001/8/18 大綱  CVS 簡介  CVS 安裝  CVS 設定 (Linux/Windows)  CVS 指令簡介  CVS 多人環境的應用

Interaction with the repository – count.

Update Syntax : cvs update [options] [file ...]

Check in (commit) Syntax : cvs commit [options] [file ...]

Release module Syntax : cvs release [options] module ...

Import module Syntax : cvs import [options] repository_dir vendor_tag release_tag

Export module Syntax : cvs export [options] module ...

Page 20: CVS 簡介 數位芝麻網路公司蔡志展 2001/8/18 大綱  CVS 簡介  CVS 安裝  CVS 設定 (Linux/Windows)  CVS 指令簡介  CVS 多人環境的應用

Conflict Resolution

Conflicts are rare, since most concurrent editing is done at different places in the file

usually easy to resolve - if not, there seems to be a communication problem in the group in general

On conflict, both parts are shown in the file, to be resolved by hand. See demo.

Page 21: CVS 簡介 數位芝麻網路公司蔡志展 2001/8/18 大綱  CVS 簡介  CVS 安裝  CVS 設定 (Linux/Windows)  CVS 指令簡介  CVS 多人環境的應用

References

CVS-Site <http://www.cvshome.org/> WinCVS Windows Client <http://www.wincvs.org/>

Page 22: CVS 簡介 數位芝麻網路公司蔡志展 2001/8/18 大綱  CVS 簡介  CVS 安裝  CVS 設定 (Linux/Windows)  CVS 指令簡介  CVS 多人環境的應用

Q&A

Your time.