Author image Barrie Slaymaker

NAME

vcp - Copy versions of files between repositories and/or RevML

SYNOPSIS

   vcp [vcp_opts] src[:files] [src_opts] [dest:[<location>]] [dest_opts]

   vcp cvs:/mymodule/... -r 1.1: p4://depot/mymodule
   vcp p4://depot/mainbranch/...@100-105 revml:
   vcp help
   vcp revml: --dtd <foo.dtd> --save_dtd

STATUS

Alpha code. Please report bugs to revml@perforce.com.

DESCRIPTION

vcp ('version copy') copies versions and version ranges of files from one repository to another, translating as much as possible along the way.

This allows you to copy and translate ranges of revisions of files between different vendors' revision storage systems.

Inputs and output classes currently available are:

   Class    Source     Destination
   cvs        x            x
   p4         x            x
   revml      x            x

The general syntax of the vcp command line is:

   vcp [vcp_opts] <source> [src_opts] <dest> [dest_opts]

where <source> and <dest> are composed of fields separated by delimiters like so:

   scheme:user(view):password@server:filespec

where

   scheme is a repository type ('p4', 'cvs', 'revml'), or special
      command ('help', 'save_dtd').

   user, view, and password are optional values, one or more of
      which may be required for repository access.  CVS does not
      use (view).  For p4, (view) is the client setting
      (P4CLIENT or -c option).

   server is the repository spec, CVSROOT for CVS or P4PORT for p4.

   filespec is the file specification for the files to move.  As
      much as possible, this spec is similar to the native filespecs
      used by the repository indicated by the scheme.

Most <source> and <dest> specs will omit one or more of the fields. For instance, Filespecs or passwords are often omitted from the destination, in which case the leading colons for these fields are also optional. If no user, view, or password is supplied, the "@" is optional.

That's a bit confusing, here are some examples of stripped-down specs:

   cvs:server:/foo
   p4:user@server://depot/foo/...
   p4:user:password@public.perforce.com:1666://depot/foo/...

Options and formats for of individual schemes can be found in the relevant manpages:

VCP::Source::cvs, VCP::Source::p4, VCP::Source::revml, VCP::Dest::cvs, VCP::Dest::p4, VCP::Dest::revml.

At some point, the help command will be extended to be able to display them.

OPTIONS

All general options to vcp must precede the first scheme. Scheme-specific options must come after the affected source or destination spec and before the next one.

--debug <spec>, -d <spec>

Enables display of debugging information. A debug spec is part or all of a module name like Source::revml or a perl5 regular expression to match module names. Debug specs are not case insensitively.

The most general, show-me-everything debug option is:

   -d ".*"

The quotations are needed to slip the ".*" past most command shells.

Any debug specs that don't match anything during a run are printed out when vcp exits in order to help identify mispelled patterns. vcp will also list all of the internal names that didn't match during a run to give clues as to what specs might be useful.

The special name 'what' is guaranteed to not match anything, so you can do

   vcp -d what ...

to see the list of names that might be useful for the arguments '...' .

You may use multiple -d options or provide a comma separated list to enable debugging within that module. Do not start a pattern with a "-".

Debugging messages are emitted to stderr. See "VCPDEBUG" for how to specify debug options in the environment.

--help, -h, -?

These are all equivalent to vcp help.

ARGUMENTS

There are two special schemes, "help" and "save_dtd".

help

Displays the full help text. This will be extended to allow the retrieval of all of the manpages provided with VCP.

save_dtd [<how>]

This is primarily for vcp maintainers.

Outputs the DTD to stdout if <how> is -, or to a file named like v1_000.pm if <how> looks like a version number, or in a module named after <how> if <how> contains '::'. This file is placed in ./lib/RevML/DTD or ./RevML/DTD or ./, whichever is found first. No directories will be created.

ENVIRONMENT

The environment is often used to set context for the source and destination by way of variables like P4USER, P4CLIENT, CVSROOT, etc.

There is also one environment variable that is used to enable command line debugging. The VCPDEBUG variable acts just like a leading "-d=$VCPDEBUG" was present on the command line.

   VCPDEBUG=main,p4

(see "--debug, -d" for more info). This is useful when VCP is embedded in another application, like a makefile or a test suite.

AUTHOR

Barrie Slaymaker <barries@slaysys.com>

COPYRIGHT

This program is licensed under the provisions of the BSD license:

      Copyright (c) 2000, 2001, Perforce Software, Inc.
      All rights reserved.

      Redistribution and use in source and binary forms, with or without
      modification, are permitted provided that the following conditions are
      met:

           - Redistributions of source code must retain the above copyright
             notice, this list of conditions and the following disclaimer. 
           - Redistributions in binary form must reproduce the above copyright
             notice, this list of conditions and the following disclaimer in
             the documentation and/or other materials provided with the
             distribution. 
           - Neither the name of the Perforce Software, Inc.nor the names of
             its contributors may be used to endorse or promote products
             derived from this software without specific prior written
             permission. 

      THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
      AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
      WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
      PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
      THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
      CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
      PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
      USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
      HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
      NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
      USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
      OF SUCH DAMAGE.

This notice is also included in the LICENSE file accompanying this distribution, which also must be retained in redistributions.