Author image Barrie Slaymaker

NAME

VCP::Source::p4 - A Perforce p4 repository source

SYNOPSIS

   vcp p4://depot/...@10          # all files after change 10 applied
   vcp p4://depot/...@1,10        # changes 1..10
   vcp p4://depot/...@-2,10       # changes 8..10
   vcp p4://depot/...@1,#head     # changes 1..#head
   vcp p4://depot/...@-2,#head    # changes 8..10
   vcp p4:...@-2,#head            # changes 8..10, if only one depot

To specify a user name of 'user', P4PASSWD 'pass', and port 'host:1666', use this syntax:

   vcp p4:user(client)password@host:1666:files

Note: the password will be passed in the environment variable P4PASSWD so it shouldn't show up in error messages. This means that a password specified in a P4CONFIG file will override the password you set on the command line. This is a bug. User, client and the server string will be passed as command line options to make them show up in error output.

You may use the P4... environment variables instead of any or all of the fields in the p4: repository specification. The repository spec overrides the environment variables.

DESCRIPTION

Reads a p4d.

Note that not all metadata is exported: labels and users are not exported as of yet. This stuff will go in to the RevML at some point.

Also, the 'time' and 'mod_time' attributes will lose precision, since p4 doesn't report them down to the minute. Hmmm, seems like p4 never sets a true mod_time. It gets set to either the submit time or the sync time. From `p4 help client`:

    modtime         Causes 'p4 sync' to force modification time 
                    to when the file was submitted.

    nomodtime *     Leaves modification time set to when the
                    file was fetched.

OPTIONS

-b, --bootstrap
   -b '**'
   --bootstrap='**'
   -b file1[,file2[,...]]
   --bootstrap=file1[,file2[,...]]

Forces bootstrap mode for an entire export (-b '**') or for certain files. Filenames may contain wildcards, see Regexp::Shellish for details on what wildcards are accepted. For now, one thing to remember is to use '**' instead of p4's '...' wildcard.

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 used when exporting for the first time.

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.

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.

This option is necessary when exporting only more recent revisions from a repository.

-r, --rev-root

Sets the root of the source tree to export. All files to be exported must be under this root directory. The default rev-root is all of the leading non-wildcard directory names. This can be useful in the unusual case of exporting a sub-tree of a larger project. I think.

METHODS

new

Creates a new instance of a VCP::Source::p4. Contacts the p4d using the p4 command and gets some initial information ('p4 info' and 'p4 labels').

SUBCLASSING

This class uses the fields pragma, so you'll need to use base and possibly fields in any subclasses.

COPYRIGHT

Copyright 2000, Perforce Software, Inc. All Rights Reserved.

This module and the VCP package are licensed according to the terms given in the file LICENSE accompanying this distribution, a copy of which is included in vcp.

AUTHOR

Barrie Slaymaker <barries@slaysys.com>

1 POD Error

The following errors were encountered while parsing the POD:

Around line 588:

You forgot a '=back' before '=head1'