<html><head><title>VCP::Source::p4 - A Perforce p4 repository source</title></head><body><h1><a name="NAME">NAME
</a></h1><p>VCP::Source::p4 - A Perforce p4 repository source
<p><hr><h1><a name="SYNOPSIS">SYNOPSIS
</a></h1><pre> 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
</pre><p>To specify a user name of 'user', P4PASSWD 'pass', port 'host:1666',
and p4 client 'client' use this syntax:
<pre> vcp p4:user(client):pass@host:1666:files
</pre><p>Or, to run against a private p4d in a local directory, use this syntax
and the --run-p4d option:
<pre> vcp p4:user(client):pass@/dir:files
vcp p4:user(client):pass@/dir:1666:files
</pre><p>Note: VCP will set the environment variable P4PASSWD rather than
sending the password to p4 via the command line, so it shouldn't show
up in error messages. This means that a password specified in a
P4CONFIG file will override the one set on the VCP 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.
<p>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.
<p>If the <a>P4::Client</a> Perl module is installed, this will be used instead
of the p4 command line utility. If this causes undesirable results, set
the environment variable VCPP4API equal to "0" (zero).
<p><hr><h1><a name="DESCRIPTION">DESCRIPTION
</a></h1><p>Driver to allow <a href="vcp.html">vcp</a> to extract files from a
<a href="http://perforce.com/">Perforce</a> repository.
<p>Note that not all metadata is extracted: users, clients and job tracking
information is not exported, and only label names are exported.
<p>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 <code>p4 help client</code>:
<pre> modtime Causes 'p4 sync' to force modification time
to when the file was submitted.
</pre><pre> nomodtime * Leaves modification time set to when the
file was fetched.
</pre><p><hr><h1><a name="OPTIONS">OPTIONS
</a></h1><p>See also the OPTIONS sections in <a href="VCP/Source.html#OPTIONS">VCP::Source</a>
and <a>VCP::Driver/OPTIONS</a>.
<dl><dt><a name="_run_p4d_"><strong><p>--run-p4d
</strong></a><dd>Runs a p4d instance in the directory indicated by repo_server (use a
directory path rather than a host name). If repo_server contains a
port, that port will be used, otherwise a random port will be used.
<p>Dies unless the directory exists and contains files matching db.* (to
help prevent unexpected initializing of empty directories).
<p>VCP will kill this p4d when it's done.
<dt><a name="_follow_branch_into_"><strong><p>--follow-branch-into
</strong></a><dd>Causes VCP to notice "branch into" messages in the output of p4's
filelog command and. If the file that's the target of the p4
integrate (branch) command is revision number #1, adds the target to
the list of exported files. This usually needs a --rev-root option to
set the rev root to be high enough in the directory tree to include
all branches (it's an error to export a file that is not under the rev
root).
<dt><a name="_rev_root_"><strong><p>--rev-root
</strong></a><dd>Sets the "revisions" root of the source tree being extracted; without this
option, VCP assumes that you are extracting the directory tree ending in the
last path segment in the filespec without a wildcard. This allows you to
specify a shorter root directory, which can be useful especially with
--follow-branch-into, since branches may often lead off from the current
directory to peer directories or even in to entirely different trees.
<p>The default <code>rev-root</code> is the file spec up to the first path segment
(directory name) containing a wildcard, so
<pre> p4:/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.
</dl><p><hr><h1><a name="BRANCHES">BRANCHES
</a></h1><p>VCP uses the "directory" name of each file as the file's branch_id.
VCP ignores p4 branch specs for several reasons:
<ol><li><p>Branch specs are not version controlled, which means that you can't tell
what a branch spec looked like when a branch was created.
<li><p>Multiple branch specs can point to the same directory or even the same file.
<li><p>branch specs are not necessary in managing a p4 repository.
</ol><p>TODO: build a filter or VCP::Source::p4 option that allows p4 branch
specifications to determine branch_ids.
<p>As the <a>VCP Branches</a> chapter mentions, you can use a Map
section in the transfer specification to extract meaningful <code>branch_id</code>s if
you need to.
<dl><dt><a name="repo_client_"><strong><p>repo_client
</strong></a><dd>The p4 client name. This is an accessor for a data member in each class.
The data member should be part of VCP::Utils::p4, but the fields pragma
does not support multiple inheritance, so the accessor is here but all
derived classes supporting this accessor must provide for a key named
"P4_REPO_CLIENT".
</dl><p><hr><h1><a name="LIMITATIONS">LIMITATIONS
</a></h1><p>Treats each branched file as a separate branch with a unique branch_id,
although files that are branched together should end up being submitted
together in the destination repository due to change number aggregation.
<p>Ignores branch specs for now. There may be an option to enable
automatic use of branch specs because most are probably well behaved.
However, in the event of a branch spec being altered after the original
branch, this could lead to odd results. Not sure how useful branch
specs are vs. how likely a problem this is to be. We may also want to
support "external" branch specs to allow deleted branch specs to be
used.
<p><hr><h1><a name="SEE_ALSO">SEE ALSO
</a></h1><p><a href="VCP/Dest/p4.html">VCP::Dest::p4</a>, <a href="vcp.html">vcp</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>VCP::License</a> (<code>vcp help license</code>) for the terms of use.
<p><hr><i><font size="-1">Last updated: Fri Jun 4 14:21:33 2004</font></i></body></html>