mirror of https://github.com/tLDP/LDP
243 lines
9.5 KiB
XML
243 lines
9.5 KiB
XML
<!--
|
|
<!DOCTYPE book PUBLIC '-//OASIS//DTD DocBook XML V4.2//EN'>
|
|
-->
|
|
<appendix id="cvs">
|
|
<title>Concurrent Version System (CVS)</title>
|
|
|
|
&cvs-why;
|
|
|
|
<para>
|
|
You can browse the LDP CVS repository via the web at <ulink
|
|
url="http://cvs.tldp.org/">http://cvs.tldp.org/</ulink>.
|
|
</para>
|
|
|
|
<section id="getaccount">
|
|
<title> Getting a CVS account </title>
|
|
|
|
<caution>
|
|
<title>CVS accounts will not be granted to all applicants</title>
|
|
<para>To be granted a CVS account you must qualify under one of the following categories:</para>
|
|
<itemizedlist>
|
|
<listitem>
|
|
<para>authors with documents already in the collection who have made a minimum of three submits to the LDP through <email>submit@en.tldp.org</email></para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>technical and language reviewers approved by one of the Review Coordinators</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>new authors in the review process (also requires approval from one of the Review Coordinators)</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
<para>Please do not apply for a CVS account if you do not qualify.</para>
|
|
</caution>
|
|
|
|
<para>
|
|
If you qualify for a CVS account you may apply for one contacting CVS master Sergiusz <ulink url="mailto:ser@gnu.org" />
|
|
Include information about which documents you maintain.
|
|
</para>
|
|
</section>
|
|
|
|
<section id="usingcvs">
|
|
<title>Using CVS</title>
|
|
<section id="cvs-setup">
|
|
<title>Setting Up Your CVS Account</title>
|
|
<para> First you'll need to get an account at the LDP's CVS
|
|
Repository. Please see the notes above on obtaining an account. This repository houses various documents including
|
|
HOWTOs and Guides. Documents are sorted by the type of document (for
|
|
example a HOWTO or a Guide), and by the markup language the document
|
|
uses (for example DocBook or LinuxDoc).
|
|
</para>
|
|
|
|
<para>When your account is ready you can log in using one of the following commands. In all instances <replaceable>your_userid</replaceable> should be replaced by the user name you were issued in the response email. You will be prompted for a password after this first step.</para>
|
|
|
|
<variablelist>
|
|
<title>Initializing Your CVS Account</title>
|
|
|
|
<varlistentry>
|
|
<term>Linux system</term>
|
|
<listitem>
|
|
<para>
|
|
<command>cvs <parameter>-d :pserver:<replaceable>your_userid</replaceable>@cvs.tldp.org:/cvsroot</parameter> login</command>
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term>Windows system</term>
|
|
<listitem>
|
|
<para><command>set <varname>CVSROOT</varname>=":pserver:<replaceable>your_userid</replaceable>@cvs.tldp.org:/cvsroot"</command>
|
|
</para>
|
|
<para><command>cvs <parameter>-d %CVSROOT%</parameter> login</command></para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
|
|
<para> Wait patiently while the system tries to log you in. It can often take more
|
|
that 10-20 seconds for the system to either accept (or reject)
|
|
your password. Once you've
|
|
used <command>cvs login</command> for the first time and have
|
|
been given access to the system, your password is stored in
|
|
<filename>.cvspass</filename> and you will not
|
|
have to use <command>cvs login</command>
|
|
again. Just set the CVSROOT with the export command listed above
|
|
and continue on. If TLDP's CVS server is the only one you work with, you might also add an <command>export <varname>CVSROOT</varname></command> line to your <filename>~/.bashrc</filename> shell configuration file.</para>
|
|
|
|
</section>
|
|
|
|
<section id="get-repository">
|
|
<title>Getting the Documents</title>
|
|
<para>
|
|
You can get the entire repository (about 150 MB) with: <command>cvs checkout LDP</command>
|
|
</para>
|
|
|
|
<para> Or you can get the source for your own document with:
|
|
<command>cvs checkout LDP/howto/docbook/YOUR-HOWTO.xml</command> OR
|
|
<command>cvs checkout LDP/guide/docbook/YOURGUIDE</command>
|
|
</para>
|
|
|
|
<para>Windows users will need to use a modified version of this command. Instead they should use:
|
|
<command>cvs -d %CVSROOT% checkout LDP/howto/docbook/YOUR-HOWTO.xml</command>
|
|
</para>
|
|
|
|
<note><title>Keep an overview</title><para>
|
|
<command>checkout</command> will add the full directory structure
|
|
from tldp.org on down. Although it doesn't really matter where
|
|
you put these files on your local file system you may not want to
|
|
bury the directories too deeply.
|
|
</para></note>
|
|
</section>
|
|
|
|
<section id="cvs-commands">
|
|
<title>CVS Commands</title>
|
|
<variablelist>
|
|
<title>CVS Commands: a brief reminder</title>
|
|
|
|
<varlistentry>
|
|
<term>commit</term>
|
|
<listitem><para>
|
|
This CVS command will upload your changes to the CVS server.</para>
|
|
<para>Please be sure to include a useful description of the changes that have been made to your document.</para>
|
|
<para>If you want to bypass the editor screen you can use </para>
|
|
<cmdsynopsis><command>
|
|
cvs <option>commit</option> <option>-m "A description of the work done on this version of the document."</option>
|
|
</command></cmdsynopsis>
|
|
|
|
|
|
<note><title>Ready for publication warning</title><para>You must still email <email>submit@en.tldp.org</email>
|
|
when you are ready to have your changes
|
|
appear on the live site. Your email should include the relative
|
|
path to the file(s) in the LDP CVS tree that you wish to
|
|
update.
|
|
</para></note>
|
|
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
<term>add</term>
|
|
<listitem><para>
|
|
You can add new files to your CVS repository. These may be image
|
|
files or additional XML files. First check that your HOWTO is in
|
|
its own directory. You may want to coordinate with the
|
|
people at <email>submit@en.tldp.org</email> to ensure you can
|
|
add graphics or other files to your HOWTO.
|
|
</para>
|
|
|
|
<para>
|
|
Copy the files you want to add into your local CVS repository
|
|
(where all of your downloaded/working files are). Then:</para>
|
|
<cmdsynopsis><command>cvs add <replaceable>filename</replaceable></command></cmdsynopsis>
|
|
<para>
|
|
After you've added the files, you still need to <command>commit</command> them to the
|
|
repository (see above).
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term>remove</term>
|
|
<listitem>
|
|
<para>
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
<term>$Id$</term>
|
|
<listitem><para>
|
|
While this is not a CVS <quote>command</quote> it can be used to
|
|
automatically insert information about the file including the
|
|
time and date it was last modified, the version number it was
|
|
assigned by the CVS and the filename of this particular file.
|
|
The output will look like this:
|
|
<computeroutput>$Id: cvs.xml,v 1.9 2002/04/21 09:44:26 serek Exp
|
|
$</computeroutput>
|
|
</para></listitem>
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
<para>
|
|
If you need to change a file name, you
|
|
still need to use the <command>add</command> command. First remove the copy of the
|
|
file from your local disk. Then remove it from the CVS tree with:
|
|
<command>cvs remove <replaceable>filename</replaceable></command>.
|
|
As with the <command>add</command> command, you need to <command>>commit</command> your
|
|
removed file. Finally, now that the old file has been removed, add
|
|
your new file using the instructions above (first <command>add</command> and then
|
|
<command>commit</command> the additional file).
|
|
</para>
|
|
|
|
<section id="recovery">
|
|
<title>Recovering old versions</title>
|
|
<para>
|
|
There you are, typing away, when you screw up. Real bad.
|
|
Doesn't matter what it is, but suffice it to say that you've
|
|
toasted not only the version on your local drive, but
|
|
created a new version on the CVS server. What you need
|
|
to do is go back in time and resurrect an older
|
|
version of your file.
|
|
</para>
|
|
<para>
|
|
To do this, you'll need to know the version number of the
|
|
file you want to retrieve. <command>cvs diff</command>
|
|
will give a list of revisions if there are differences. You
|
|
can pick the revision number, subtract one, and that is
|
|
probably the revision you want to look at.
|
|
</para>
|
|
<para>
|
|
The command</para>
|
|
<cmdsynopsis><command>cvs -Q update -p -r <replaceable>revision</replaceable>
|
|
<replaceable>filename</replaceable></command></cmdsynopsis>
|
|
<para>will output to stdout
|
|
the contents of the <replaceable>revision</replaceable> version
|
|
of <replaceable>filename</replaceable>. You can pipe it to
|
|
<command>more</command> or redirect the output to a file.
|
|
Conveniently, you can redirect stdout to a file called
|
|
<replaceable>filename</replaceable>. Your local file
|
|
is now the revision you want, and</para>
|
|
<cmdsynopsis><command>cvs update</command></cmdsynopsis>
|
|
<para>will update the CVS server with the new (old)
|
|
version of <replaceable>filename</replaceable>.
|
|
</para>
|
|
</section>
|
|
</section>
|
|
</section>
|
|
|
|
<section id="cvs-resources">
|
|
<title>CVS Resources</title>
|
|
<para> If you're completely new to CVS, there are a few web pages
|
|
you may want to look at which can help you out: </para>
|
|
|
|
<itemizedlist>
|
|
<listitem>
|
|
<para> <ulink
|
|
url="http://cvshome.org/docs/blandy.html">http://cvshome.org/docs/blandy.html</ulink>
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para> <ulink
|
|
url="http://www.loria.fr/~molli/cvs/doc/cvs_toc.html">http://www.loria.fr/~molli/cvs/doc/cvs_toc.html</ulink></para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
</section>
|
|
</appendix>
|