doc/handbook/anoncvs.sgml

167 lines
6 KiB
Text
Raw Normal View History

<!-- $Id: anoncvs.sgml,v 1.1 1998-04-30 12:51:12 jkh Exp $ -->
<!-- The FreeBSD Documentation Project -->
<sect1><heading>Anonymous CVS<label id="anoncvs"></heading>
<p><em>Contributed by &a.jkh;</em>
<sect2><heading>Introduction<label id="anoncvs:intro"></heading>
<p>Anonymous CVS (or, as it is otherwise known, <em>anoncvs</em>) is a
feature provided by the CVS utilities bundled with FreeBSD for synchronizing
with a remote CVS repository. Among other things, it allows users of
FreeBSD to perform, with no special privileges, read-only CVS operations
against one of the FreeBSD project's official anoncvs servers. To use it,
one simply sets the <bf>CVSROOT</bf> environment variable to point at the
appropriate anoncvs server and then uses the <tt>cvs(1)</tt> command to
access it like any local repository.
<p>While it can also be said that the <ref id="cvsup" name="CVSup"> and <tt>anoncvs</tt>
services both perform essentially the same function, there are various
trade-offs which can influence the user's choice of synchronization methods.
In a nutshell, <tt>CVSup</tt> is much more efficient in its usage of
network resources and is by far the most technically sophisticated of the
two, but at a price. To use <tt>CVSup</tt>, a special client must first be
installed and configured before any bits can be grabbed, and then only in
the fairly large chunks which <tt>CVSup</tt> calls <em>collections</em>.
<p><tt>Anoncvs</tt>, by contrast, can be used to examine anything from an
individual file to a specific program (like <em>ls</em> or <em>grep</em>)
by referencing the CVS module name. Of course, <tt>anoncvs</tt> is also
only good for read-only operations on the CVS repository, so if it's your
intention to support local development in one repository shared with the
FreeBSD project bits then <tt>CVSup</tt> is really your only option.
<sect2><heading>Using Anonymous CVS<label id="anoncvs:usage"></heading>
<p>Configuring <tt>cvs(1)</tt> to use an Anonymous CVS repository is
a simple matter of setting the <bf>CVSROOT</bf> environment
variable to point to one of the FreeBSD project's <tt>anoncvs</tt>
servers. At the time of this writing, the following servers are
available:
<itemize>
<item><bf>USA</bf>: anoncvs@anoncvs.freebsd.org:/cvs</item>
</itemize>
<p>Since CVS allows one to "check out" virtually any version of the FreeBSD
sources that ever existed (or, in some cases, will exist :), you need
to be familiar with the revision (<em>-r</em>) flag to <tt>cvs(1)</tt>
and what some of the permissible values for it in the FreeBSD Project
repository are.
<p>There are two kinds of tags, revision tags and branch tags. A revision tag
refers to a specific revision. Its meaning stays the same from day to
day. A branch tag, on the other hand, refers to the latest revision
on a given line of development, at any given time. Because a branch
tag does not refer to a specific revision, it may mean something
different tomorrow than it means today.
<p>Here are the branch tags that users might be interested in:
<descrip>
<tag/HEAD/
Symbolic name for the main line, or FreeBSD-current. Also the
default when no revision is specified.
<tag/RELENG_2_2/
The line of development for FreeBSD-2.2.x, also known as
FreeBSD-stable.
Not valid for the ports collection.
<tag/RELENG_2_1_0/
The line of development for FreeBSD-2.1.x - this branch
is largely obsolete.
Not valid for the ports collection.
</descrip>
<p>Here are the revision tags that users might be interested in:
<descrip>
<tag/RELENG_2_2_6_RELEASE/
FreeBSD-2.2.6.
Not valid for the ports collection.
<tag/RELENG_2_2_5_RELEASE/
FreeBSD-2.2.5.
Not valid for the ports collection.
<tag/RELENG_2_2_2_RELEASE/
FreeBSD-2.2.2.
Not valid for the ports collection.
<tag/RELENG_2_2_1_RELEASE/
FreeBSD-2.2.1.
Not valid for the ports collection.
<tag/RELENG_2_2_0_RELEASE/
FreeBSD-2.2.0.
Not valid for the ports collection.
<tag/RELENG_2_1_7_RELEASE/
FreeBSD-2.1.7.
Not valid for the ports collection.
<tag/RELENG_2_1_6_1_RELEASE/
FreeBSD-2.1.6.1.
Not valid for the ports collection.
<tag/RELENG_2_1_6_RELEASE/
FreeBSD-2.1.6.
Not valid for the ports collection.
<tag/RELENG_2_1_5_RELEASE/
FreeBSD-2.1.5.
Not valid for the ports collection.
<tag/RELENG_2_1_0_RELEASE/
FreeBSD-2.1.0.
Not valid for the ports collection.
</descrip>
<p>When you specify a branch tag, you normally receive the latest versions
of the files on that line of development. If you wish to receive some
past version, you can do so by specifying a date with the <em>-D date</em>
flag. See the <tt>cvs(1)</tt> man page for more details.
<sect2><heading>Examples</heading>
<p>While it really is recommended that you read the manual page for
<tt>cvs(1)</tt> thoroughly before doing anything, here are some quick
examples which essentially show how to use Anonymous CVS:
<p>Checking out something from -current (ls(1)) and deleting it again:
<verb>
% setenv CVSROOT anoncvs@anoncvs.freebsd.org:/cvs
% cvs co ls
% cvs release -d ls
</verb>
<p>Checking out the version of ls(1) in the 2.2-stable branch:
<verb>
% setenv CVSROOT anoncvs@anoncvs.freebsd.org:/cvs
% cvs co -rRELENG_2_2 ls
% cvs release -d ls
</verb>
<p>Creating a list of changes (as unidiffs) to ls(1) between FreeBSD 2.2.2
and FreeBSD 2.2.6:
<verb>
% setenv CVSROOT anoncvs@anoncvs.freebsd.org:/cvs
% cvs rdiff -u -rRELENG_2_2_2_RELEASE -rRELENG_2_2_6_RELEASE ls
</verb>
<p>Finding out what other module names can be used:
<verb>
% setenv CVSROOT anoncvs@anoncvs.freebsd.org:/cvs
% cvs co modules
% more modules/modules
% cvs release -d modules
</verb>
<sect2><heading>Other Resources</heading>
<p>The following additional resources may be helpful in learning CVS:
<itemize>
<item><url url="http://www.csc.calpoly.edu/~dbutler/tutorials/winter96/cvs/"
name="CVS Tutorial"> from Cal Poly.</item>
<item><url url="http://www.cyclic.com" name="Cyclic Software">, commercial
maintainers of CVS.</item>
<item><url url="http://www.freebsd.org/cgi/cvsweb.cgi" name="CVSWeb">
is the FreeBSD Project web interface for CVS.</item>
</itemize>