tutes-dump/site-tutorials/cvs_on_sdf.html

214 lines
4.4 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
lang="en" xml:lang="en">
<head>
<title>CVS On SDF</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<meta name="generator" content="Org-mode"/>
<style type="text/css">
html {
font-family: Times, serif;
font-size: 12pt;
}
.title { text-align: center; }
.todo { color: red; }
.done { color: green; }
.timestamp { color: grey }
.timestamp-kwd { color: CadetBlue }
.tag { background-color:lightblue; font-weight:normal }
.target { background-color: lavender; }
pre {
border: 1pt solid #AEBDCC;
background-color: #F3F5F7;
padding: 5pt;
font-family: courier, monospace;
}
table { border-collapse: collapse; }
td, th {
vertical-align: top;
<!--border: 1pt solid #ADB9CC;-->
}
</style>
</head><body>
<h1 class="title">CVS On SDF</h1>
<h2>Table of Contents</h2>
<ul>
<li><a href="#sec-1">1 Introduction</a></li>
<li><a href="#sec-2">2 Creating A Repository</a></li>
<li><a href="#sec-3">3 Importing A Directory:</a></li>
<li><a href="#sec-4">4 Checking It Out</a></li>
<li><a href="#sec-5">5 Accessing It Remotely</a></li>
<li><a href="#sec-6">6 More info on CVS </a></li>
</ul>
<h2><a name="sec-1">1 Introduction</a></h2>
<p>
This tutorial is not about using a version control system, or about
using cvs, but about how to get started with cvs on SDF
</p>
<h2><a name="sec-2">2 Creating A Repository</a></h2>
<p>
The cvs repository is just a simple directory. Our repository will
be made in our home directory, and we will name it "cvs".
</p>
<p>
cvs requires that you use an absolute path to the repository.
To learn the full path to your home directory type:
</p>
<p>
<pre>
cd; pwd
</pre>
</p>
<p>
In the rest of this document you will need to replace '/path/to/homedir/'
by the output of the previous command.
</p>
<p>
Creating our repository is very simple:
</p>
<p>
<pre>
cd
mkdir cvs
cvs -d /path/to/homedir/cvs init
</pre>
</p>
<p>
That's it.
</p>
<h2><a name="sec-3">3 Importing A Directory:</a></h2>
<p>
Let's add our website into our repository:
</p>
<p>
<pre>
cd html
cvs -d /path/to/homedir/cvs import -m "initial import" html user start
</pre>
</p>
<p>
In this command
</p><ul>
<li>
'-d /path/to/homedir/cvs' specify the path to our
repository. Alternatively you can add:
<pre>
export CVSROOT='/path/to/homedir/cvs' to your ~/.profile file. You must use an absolute path.
</pre>
</li>
<li>
'import' is our cvs command
</li>
<li>
'-m "initial import" is a message that will appear in the log.
</li>
<li>
'html' is the name of our new module
</li>
<li>
'user' is a vendor tag, you can use your username or SDF or
whatever
</li>
<li>
'start' is a release tag.
</li>
</ul>You can modify the message, the module name and the tags to your
liking, just keep in mind that in the rest of this tutorial we will
use 'html' for the module name.
<h2><a name="sec-4">4 Checking It Out</a></h2>
<p>
<pre>
cd
mkdir tmp
cd tmp
cvs -d /path/to/homedir/cvs co html
</pre>
</p>
<p>
This should be enough to convince ourselves that the directory is now
under version control.
</p>
<h2><a name="sec-5">5 Accessing It Remotely</a></h2>
<p>
We can access our repository from the outside using ssh, to do this we
need to set the environment variable CVS_RSH so that cvs will use ssh,
using for instance:
</p>
<p>
<pre>
export CVS_RSH=ssh
</pre>
</p>
<p>
And then use for the variable CVS_ROOT, or the -d switch:
':ext:user@freeshell.org:/path/to/homedir/cvs/', where
</p><ul>
<li>
'user' is your login name at SDF a
</li>
<li>
'freeshell.org' is your prefered host at SDF
</li>
<li>
'/path/to/homedir/cvs' is the full path to our repository at SDF.
</li>
</ul>For instance to check out our html module:
<p>
<pre>
cvs -d ':ext:user@freeshell.org:/path/to/homedir/cvs' co html
</pre>
</p>
<p>
After having made our modifications, we just need to check our changes
back in:
</p>
<p>
<pre>
cvs update # if we made some changes elsewhere
cvs -d ':ext:user@freeshell.org:/path/to/homedir/cvs' ci html
</pre>
</p>
<h2><a name="sec-6">6 More info on CVS </a></h2>
<ul>
<li>
<a href="http://www.cvshome.org">cvs home</a>
</li>
<li>
<a href="http://www.cvshome.org/cvs/manual/cvs-1.11.21/cvs.html">Version Management with CVS by Per Cederqvist</a>
</li>
<li>
man cvs
</li>
</ul>
<font size=1><cite>$Id: cvs_on_sdf.html,v 1.3 2015/01/28 01:01:52 grobe0ba Exp $</cite></font>
</body>
</html>