<html><head><title>VCP::Source::cvs - A CVS repository source</title></head><body><h1><a name="NAME">NAME
</a></h1><p>VCP::Source::cvs - A CVS repository source
<p><hr><h1><a name="SYNOPSIS">SYNOPSIS
</a></h1><pre> vcp cvs:module/... -d ">=2000-11-18 5:26:30" <dest>
# All file revs newer than a date/time
</pre><pre> vcp cvs:module/... -r foo # all files in module and below labelled foo
vcp cvs:module/... -r foo: # All revs of files labelled foo and newer,
# including files not tagged with foo.
vcp cvs:module/... -r 1.1:1.10 # revs 1.1..1.10
vcp cvs:module/... -r 1.1: # revs 1.1 and up on main trunk
</pre><pre> ## NOTE: Unlike cvs, vcp requires spaces after option letters.
</pre><p><hr><h1><a name="DESCRIPTION">DESCRIPTION
</a></h1><p>Source driver enabling <a href="../../vcp.html">vcp</a> to extract versions form a cvs
repository.
<p>The source specification for CVS looks like:
<pre> cvs:cvsroot/filespec [<options>]
</pre><p>where the <code>cvsroot</code> is passed to <code>cvs</code> with the <code>-d</code> option if
provided (<code>cvsroot</code> is optional if the environment variable <code>CVSROOT</code>
is set) and the filespec and <options> determine what revisions
to extract.
<p><code>filespec</code> may contain trailing wildcards, like <code>/a/b/...</code> to extract
an entire directory tree.
<p>If the CVSROOT / -d option looks like a local filesystem (if it doesn't
start with ":" and if it points to an existing directory or file), this
module will read the RCS files directly from the hard drive unless
--use-cvs is passed. This is more accurate (due to poor design of
the cvs log command) and much, much faster.
<p><hr><h1><a name="OPTIONS">OPTIONS
</a></h1><dl><dt><a name="_b_bootstrap_"><strong><p>-b, --bootstrap
</strong></a><pre> -b ...
--bootstrap=...
-b file1[,file2[, etc.]]
--bootstrap=file1[,file2[, etc. ]]
</pre><dd>(the <code>...</code> there is three periods, a
<a>Regexp::Shellish</a> wildcard borrowed from <code>p4</code>
path syntax).
<p>Forces bootstrap mode for an entire export (<code>-b ...</code>) or for certain
files. Filenames may contain wildcards, see <a>Regexp::Shellish</a> for
details on what wildcards are accepted.
<p>Controls how the first revision of a file is exported. A bootstrap
export contains the entire contents of the first revision in the
revision range. This should only be necessary when exporting for the
first time.
<p>An incremental export contains a digest of the revision preceding the
first revision in the revision range, followed by a delta record between
that revision and the first revision in the range. This allows the
destination import function to make sure that the incremental export
begins where the last export left off.
<p>The default is decided on a per-file basis: if the first revision in the
range is revision #.1, the full contents are exported. Otherwise an
incremental export is done for that file.
<p>This option is necessary when exporting only more recent revisions from
a repository.
<dt><a name="_cd_"><strong><p>--cd
</strong></a><dd>Used to set the CVS working directory. VCP::Source::cvs will cd to this
directory before calling cvs, and won't initialize a CVS workspace of
it's own (normally, VCP::Source::cvs does a "cvs checkout" in a
temporary directory).
<p>This is an advanced option that allows you to use a CVS workspace you
establish instead of letting vcp create one in a temporary directory
somewhere. This is useful if you want to read from a CVS branch or if
you want to delete some files or subdirectories in the workspace.
<p>If this option is a relative directory, then it is treated as relative
to the current directory.
<dt><a name="_kb_k_b_"><strong><p>-kb, -k b
</strong></a><dd>Pass the -kb option to cvs, forces a binary checkout. This is
useful when you want a text file to be checked out with Unix linends,
or if you know that some files in the repository are not flagged as
binary files and should be.
<dt><a name="_rev_root_"><strong><p>--rev-root
</strong></a><dd><b>Experimental</b>.
<p>Falsifies the root of the source tree being extracted; files will
appear to have been extracted from some place else in the hierarchy.
This can be useful when exporting RevML, the RevML file can be made
to insert the files in to a different place in the eventual destination
repository than they existed in the source repository.
<p>The default <code>rev-root</code> is the file spec up to the first path segment
(directory name) containing a wildcard, so
<pre> cvs:/a/b/c...
</pre><p>would have a rev-root of <code>/a/b</code>.
<p>In direct repository-to-repository transfers, this option should not be
necessary, the destination filespec overrides it.
<dt><a name="_r_"><strong><p>-r
</strong></a><pre> -r v_0_001:v_0_002
-r v_0_002:
</pre><dd>Passed to <code>cvs log</code> as a <code>-r</code> revision specification. This corresponds
to the <code>-r</code> option for the rlog command, not either of the <code>-r</code>
options for the cvs command. Yes, it's confusing, but 'cvs log' calls
'rlog' and passes the options through.
<p>IMPORTANT: When using tags to specify CVS file revisions, it would ordinarily
be the case that a number of unwanted revisions would be selected. This is
because the behavior of the cvs log command dumps the entire log history for
any files that do not contain the tag. VCP captures the histories of such files
and ignores all revisions that are older or newer than any files that match the
tags.
<p>Be cautious using HEAD as the end of a revision range, this seems to cause the
delete actions for files deleted in the last revision to not be noticed. Not
sure why.
<dt><a name="_use_cvs_"><strong><p>--use-cvs
</strong></a><dd>Do not try to read local repositories directly; use the cvs command
line interface. This is much slower than reading the files directly
but is useful to see if there is a bug in the RCS file parser or
possible when dealing with corrupt RCS files that cvs will read.
<p>If you find that this option makes something work, then there is a
discrepancy between the code that reads the RCS files directly (in the
absence of this option) and cvs itself. Please let me know
(barrie@slaysys.com). Thanks.
<dt><a name="_d"><strong><p><code>-d</code>
</strong></a><pre> -d "2000-11-18 5:26:30<="
</pre><dd>Passed to 'cvs log' as a <code>-d</code> date specification.
<p>WARNING: if this string doesn't contain a '>' or '<', you're probably doing
something wrong, since you're not specifying a range. vcp may warn about this
in the future.
</dl><h2><a name="Files_that_aren_t_tagged">Files that aren't tagged
</a></h2><p>CVS has one peculiarity that this driver works around.
<p>If a file does not contain the tag(s) used to select the source files,
<code>cvs log</code> outputs the entire life history of that file. We don't want
to capture the entire history of such files, so <a href="cvs.html">VCP::Source::cvs</a> goes
ignores any revisions before and after the oldest and newest tagged file
in the range.
<p><hr><h1><a name="LIMITATIONS">LIMITATIONS
</a></h1><pre> "What we have here is a failure to communicate!"
- The warden in Cool Hand Luke
</pre><p>CVS does not try to protect itself from people checking in things that look
like snippets of CVS log file: they come out exactly like they went in,
confusing the log file parser. So, if a repository contains messages in the
log file that look like the output from some other "cvs log" command, things
will likely go awry.
<p>CVS stores the -k keyword expansion setting per file, not per revision,
so vcp will mark all revisions of a file with the current setting of
the -k flag for a file.
<p>At least one cvs repository out there has multiple revisions of a single file
with the same rev number. The second and later revisions with the same rev
number are ignored with a warning like "Can't add same revision twice:...".
<p><hr><h1><a name="SEE_ALSO">SEE ALSO
</a></h1><p><a href="../Dest/cvs.html">VCP::Dest::cvs</a>, <a href="../../vcp.html">vcp</a>, <a href="../Process.html">VCP::Process</a>.
<p><hr><h1><a name="AUTHOR">AUTHOR
</a></h1><p>Barrie Slaymaker <barries@slaysys.com>
<p><hr><h1><a name="COPYRIGHT">COPYRIGHT
</a></h1><p>Copyright (c) 2000, 2001, 2002 Perforce Software, Inc.
All rights reserved.
<p>See <a href="../License.html">VCP::License</a> (<code>vcp help license</code>) for the terms of use.
<p><hr><i><font size="-1">Last updated: Fri Nov 8 13:07:23 2002</font></i></body></html>