TWiki
>
CF Web
>
CscfSpecific
>
ResearchSubscriptions
>
ResearchSubscriptionsCVS
(revision 2) (raw view)
Edit
Attach
---+ CVS -- Main.EladLahav - 25 Nov 2005 %TOC% ---++ Preemable CVS is an easy to use, yet powerful and effective version control system. It is based on a client-server architecture that stores all files in a common place, thus allowing sevral people to collaborate on a project. ---++ Terminology Common terms used by CVS: * _Repository_: A collection of file and directory revisions managed by CVS. A repository is stored on the server-side. * _Module_: A project managed by CVS. A module is simply a directory in a CVS repository. * _Tree_: A snapshot of a module stored on the client-side. * _Root_: A string containing the access method, user name and path leading to a CVS repository. * _Import_: Populating a newly created module with files. * _Checkout_: The process of creating a tree in a work directory. * _Update_: Synchronising a tree so that it reflects the current state of the repository. * _Commit_: Synchronising a tree so that changes in the work directory are applied to the repository. ---++ CVS Life Cycle Working with CVS usually involves the following stages: 1 Create a module in the repository and import files into it. 1 Create (check-out) and maintain (update) a tree in a work directory. 1 Work on your tree. 1 Transfer (commit) your changes. We shall assume that a repository was already created and that it is accessed only through rsh/ssh. The root will be <verbatim> :ext:elahav@hopper:/u3/elahav/cvsroot </verbatim> where =:ext:= means that the repository can only be accessed using rsh, =elahav= is the user name, =hopper= is the server on which the repository resides and =/u3/elahav/cvsroot= is the path to the repository. $ *Note*: To use ssh instead of rsh, set the environment variable =CVS_RSH= to =ssh=. Every CVS command has the following form: <verbatim> cvs CVS_OPTIONS COMMAND COMMAND_OPTIONS </verbatim> Most CVS commands work recursively, which means they are applied to all sub-directories. ---+++ Import The import process creates a new module in the repository. The module is populated with all files in the current directory. The command has the following syntax: <verbatim> cvs -d ROOT import MODULE_NAME VENDOR_TAG START_TAG </verbatim> where =ROOT= is the repository's root string, =MODULE_NAME= is simply the name of the module, and VENDOR_TAG and START_TAG are arbitrary symbols. $ *Note*: You can get rid of the =-d ROOT= part by setting the =CVSROOT= environment variable to the root string. $ *Note*: The vendor and start tags are just relics from old times. You can safely use the strings VENDOR and START for every module you create. Assume =~/src/myproject= is a directory containing the files to import. The following commands create the module =myproject= in the repository <verbatim> cd ~/src/myproject cvs -d :ext:elahav@hopper:/u3/elahav/cvsroot import myproject VENDOR START </verbatim> Alternatively, we can use the =CVSROOT= environment variable: <verbatim> export CVSROOT=:ext:elahav@hopper:/u3/elahav/cvsroot cd ~/src/myproject cvs import myproject VENDOR START </verbatim> Since CVS works recursively, all sub-directories and their files will also be imported. ---+++ Checkout The checkout command creates a tree by copying the latest version of all files in a module into a the current directory. Its basic syntax is: <verbatim> cvs -d ROOT co MODULE_NAME </verbatim> Checkout can also create the tree in a specified directory: <verbatim> cvs -d ROOT co -d DIR MODULE_NAME </verbatim> For example, to check out the =myproject= module in the current directory <verbatim> cvs -d :ext:elahav@hopper:/u3/elahav/cvsroot co myproject </verbatim> or, if =CVSROOT= has already been set correctly <verbatim> cvs co myproject </verbatim> This command creates a directory called =myproject= under the current directory, populated with the module files (including all sub-directories). Each directory in the tree has a CVS sub-directory, which contains such information as the name of the module, its root and the files in this directory that are included in the module.
Edit
|
Attach
|
Watch
|
P
rint version
|
H
istory
:
r6
|
r4
<
r3
<
r2
<
r1
|
B
acklinks
|
V
iew topic
|
Raw edit
|
More topic actions...
Topic revision: r2 - 2005-11-25
-
EladLahav
CF
Information in this area is meant for use by CSCF staff and is not official documentation, but anybody who is interested is welcome to use it if they find it useful.
CF Web
CF Web Home
Changes
Index
Search
Administration
Communication
Email
Hardware
HelpDeskGuide
Infrastructure
InternalProjects
Linux
MachineNotes
Macintosh
Management
Networking
Printing
Research
Security
Software
Solaris
StaffStuff
TaskGroups
TermGoals
Teaching
UserSupport
Vendors
Windows
XHier
Other Webs
CSEveryBody
Main
Sandbox
TWiki
UW
My links
People
CERAS
WatForm
Tetherless lab
Ubuntu Main.HowTo
eDocs
RGG NE notes
RGG
CS infrastructure
Grad images
Edit
Copyright © 2008-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback