p4bbi.py<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>p4bbi.py - Import Baselines into a Perforce branching structure.</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:consulting@perforce.com" />
</head>
<body style="background-color: white">
<!-- INDEX BEGIN -->
<div name="index">
<p><a name="__index__"></a></p>
<ul>
<li><a href="#name">NAME</a></li>
<li><a href="#quicktest">QUICK TEST - Mac/Linux Only</a></li>
<li><a href="#synopsis">SYNOPSIS</a></li>
<li><a href="#description">DESCRIPTION</a></li>
<ul>
<li><a href="#overview">Overview</a></li>
<li><a href="#perforce_information_config_file_format">Perforce Information Config File Format</a></li>
<ul>
<li><a href="#perforce_information_config_file___header_section">Perforce Information Config File - Header Section</a></li>
</ul>
<li><a href="#branch_information_config_file_format">Branch Information Config File Format</a></li>
<ul>
<li><a href="#config_file___baseline_definition_section">Config File - Baseline Definition Section</a></li>
<li><a href="#config_file_branching_info_section">Config File Branching Info Section</a></li>
<ul>
<li><a href="#branching_info___update_entry">Branching Info - Update Entry</a></li>
<li><a href="#branching_info___safeupdate_entry">Branching Info - SafeUpdate Entry</a></li>
<li><a href="#branching_info___branch_entry">Branching Info - Branch Entry</a></li>
<li><a href="#branching_info___copy_merge_entry">Branching Info - Copy Merge Entry</a></li>
<li><a href="#branching_info___record_as_merged_entry">Branching Info - Record As Merged Entry</a></li>
<li><a href="#branching_info___rename_entry">Branching Info - Rename Entry</a></li>
</ul>
</ul>
</ul>
<li><a href="#options">OPTIONS</a></li>
<ul>
<li><a href="#_v_erbosity__level"> <em>Verbosity Level</em></a></li>
<li><a href="#_test"> <em>Test Mode</em></a></li>
<li><a href="#_rmjunkdirs"> <em>Remove Junk Dirs</em></a></li>
<li><a href="#_detectcase"> <em>Detect Potential Case Sensitivity Problems</em></a></li>
<li><a href="#_h__help"> <em>Help</em></a></li>
</ul>
<li><a href="#_arguments">ARGUMENTS</a></li>
<ul>
<li><a href="#_p4_config_file"> <em>p4_config_file</em></a></li>
<li><a href="#_bbi_config_file"> <em>bbi_config_file</em></a></li>
</ul>
<li><a href="#_software_preconditions">SOFTWARE PRECONDITIONS</a></li>
<li><a href="#_validator">VALIDATOR</a></li>
<li><a href="#_examples">EXAMPLES</a></li>
<ul>
<li><a href="#_example_1">Example 1</a></li>
</ul>
<li><a href="#_return_status">RETURN STATUS</a></li>
<li><a href="#_copyright">COPYRIGHT</a></li>
<li><a href="#_feedback">FEEDBACK</a></li>
</ul>
<hr name="index" />
</div>
<!-- INDEX END -->
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>p4bbi.py - Import Baselines into a Perforce branching structure.</p>
<p>
</p>
<hr />
<h1><a name="quicktest">QUICK TEST - Mac/Linux Only</a></h1>
<p>To make sure BBI is installed correctly, do like so:
<ol>
<li>Step 1.
<p>Make sure 'p4' and 'p4d' executables are installed and in your PATH.</p>
<li>Step 2.
<p>Create a /p4import directory writable by your user.
<li>Step 3.
<p>Extract p4bbi.tar.gz:</p>
<pre>
cd /p4import
gunzip p4bbi.tar.gz
tar -xvpf p4bbi.tar
</pre>
<li>Step 4.
<p>Prepare a Perforce server and baselines for import.</p>
<pre>
cd /p4import
ln -s p4bbi/test/baselines
cd p4bbi/sample_cfg
./start_p4d.sh reset
</pre>
<p>This creates a Perforce server on port 8674.
<li>Step 5.
<p>Run an import.</p>
<pre>
cd /p4import/p4bbi
./p4bbi.py sample_cfg/p4config.test sample_cfg/FGS.bbi.cfg
</pre>
<li>Step 6.
<p>Review output. Run '<CODE>p4 changes -p 8674</CODE>' and '<CODE>p4 describe 12</CODE>', and the output should look something like this:
<pre>
$ p4 -p 8674 changes
Change 12 on 2012/07/27 by p4import@p4import_ws 'Captured current state of devel'
Change 11 on 2012/07/27 by p4import@p4import_ws 'Created FGS-2.0 development bra'
Change 10 on 2012/07/27 by p4import@p4import_ws 'Rename makefile'
Change 9 on 2012/07/27 by p4import@p4import_ws 'Imported baseline FGS-1.1.p3.'
Change 8 on 2012/07/27 by p4import@p4import_ws 'Merged FGS-1.1.p2 back to MAIN.'
Change 7 on 2012/07/27 by p4import@p4import_ws 'Result of merging FGS-1.1.p2 ba'
Change 6 on 2012/07/27 by p4import@p4import_ws 'Imported baseline FGS-1.1.p2.'
Change 5 on 2012/07/27 by p4import@p4import_ws 'Imported baseline FGS-1.1.p1.'
Change 4 on 2012/07/27 by p4import@p4import_ws 'Created branch FGS-1.1.x-R.'
Change 3 on 2012/07/27 by p4import@p4import_ws 'Import Baseline FGS-1.1.'
Change 2 on 2012/07/27 by p4import@p4import_ws 'Created branch FGS-1.0.x-R.'
Change 1 on 2012/07/27 by p4import@p4import_ws 'Import Baseline FGS-1.0.'
$ p4 -p 8674 describe 12
Change 12 by p4import@p4import_ws on 2012/07/27 13:35:50
Captured current state of development files on FGS-2.0 branch.
Affected files ...
... //ImportTest/Dev/FGS-2.0/fgs/src/CVS/cvs_file.txt#1 add
... //ImportTest/Dev/FGS-2.0/fgs/src/hello.c#2 edit
... //ImportTest/Dev/FGS-2.0/fgs/src/makefile_renamed#2 edit
==== //ImportTest/Dev/FGS-2.0/fgs/src/hello.c#2 (text) ====
6c6
< printf ("\nHello, New World!\n");
---
> printf ("\nHello, Brave New World!\n");
==== //ImportTest/Dev/FGS-2.0/fgs/src/makefile_renamed#2 (text) ====
10a11
> echo "Built $>"
</pre>
</ol>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<p>p4bbi.py [options] <em>p4_config_file</em> <em>bbi_config_file</em></p>
<p>OR</p>
<p>p4bbi.py {-h|--help}</p>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>
</p>
<h2><a name="overview">Overview</a></h2>
<p>This script creates a branching structure in Perforce, given a set of baselines and a defined branching structure.</p>
<p>This script must be run from a valid Perforce workspace on an existing server with the user and depot already configured.</p>
<p>Once the baselines are identified, the actual files from the baseline must be extracted from whatever version control system they
are coming from, and put somewhere on a local disk. All baselines must be readily accessible by this script, so all operations
necessary to extract baselines and get them to the locations defined in the config file must be done before this script is executed.</p>
<p>
</p>
<h2><a name="perforce_information_config_file_format">Perforce Information Config File Format</a></h2>
<p>This config file has one section, a Header section.</p>
<p>
</p>
<h3><a name="perforce_information_config_file___header_section">Perforce Information Config File - Header Section</a></h3>
<p>This contains name=value pairs, one entry per line. Values for <a href="#p4port"><code>P4PORT</code></a>, <a href="#p4client"><code>P4CLIENT</code></a>, and <a href="#p4user"><code>P4USER</code></a> are required.</p>
<p>Be sure to set P4PASSWD=password in the environement, or run '<code>p4 login</code>' for the given P4PORT/P4USER prior to running this script.</p>
<p>The following values are set in the Header section:</p>
<ul>
<li><strong><a name="p4port" class="item">P4PORT</a></strong>
<p>Specify the P4PORT for the server where the branching structure is to be imported.</p>
</li>
<li><strong><a name="p4client" class="item">P4CLIENT</a></strong>
<p>Specify the P4CLIENT value to use. Be sure the client spec has all directories in the intended target directory structure mapped. Also, be sure to set the line ending to share for the import.</p>
</li>
<li><strong><a name="p4user" class="item">P4USER</a></strong>
<p>Specify the P4USER. All checkins of baselines and branching operations will appear to be done by this user. Make sure this user has sufficient access (i.e. write access) to create the structure.</p>
</li>
</ul>
<p>
</p>
<h2><a name="branch_information_config_file_format">Branch Information Config File Format</a></h2>
<p>The config file has two sections, a Baseline Definition section, and a Branching Information section.</p>
<p>
</p>
<h3><a name="config_file___baseline_definition_section">Config File - Baseline Definition Section</a></h3>
<p>This section defines all baselines that are available for import, those baselines having been extracted from (or available from) other version control systems. This section contains baseline definition entries of the form:</p>
<p><code>BASELINE|BaselineName|Directory</code></p>
<p>or</p>
<p><code>BASELINE|BaselineName|TarFile</code></p>
<p>or</p>
<p><code>BASELINE|BaselineName|GzippedTarFile</code></p>
<p>or</p>
<p><code>BASELINE|BaselineName|ZipFile</code></p>
<p>or</p>
<p><code>BASELINE|BaselineName|CMD:Command</code></p>
<p>where:</p>
<ul>
<li><strong><a name="baselinename" class="item">BaselineName</a></strong>
<p>is the name of the baseline, which typically matches a release label. This might be something like R4.0 or MyApp6.0.1.</p>
</li>
<li><strong><a name="directory" class="item">Directory</a></strong>
<p>is the path where files for the named baseline exist. This area is typically populated by extracting files from some other version control system. An example might be C:\P4Import\<em>BaselineName</em> on Windows or /home/p4adm/p4import/<em>BaselineName</em> on Unix.</p>
<p>Alternately, this can be a path to a *.tar file or zipped tar file (*.tar.gz), or a zip file (*.zip) conforming to the PKZip file format.</p>
<p>If the directory starts with <code>CMD:</code>, the rest of the string is assumed to be a command that, when executed, will put the desired files into the current directory. Make sure that the command will reliably generate the same set of files each time it is executed.
</li>
</ul>
<p>
</p>
<h3><a name="config_file_branching_info_section">Config File Branching Info Section</a></h3>
<p>There are six types of entries in the Branching Info section, <a href=#branching_info___update_entry><em>update</em></a>, <a href=#branching_info___branch_entry><em>branch</em></a>, <a href=#branching_info___copy_merge_entry><em>copy_merge</em></a>, <a href=#branching_info___record_as_merged_entry><em>record_as_merged</em></a>, and <a href=#branching_info___rename_entry><em>rename</em></a>.</p>
<p>
</p>
<h4><a name="branching_info___update_entry">Branching Info - Update Entry</a></h4>
<p>The Branch Update entry is of the form:</p>
<p><code>UPDATE|BaselineName|P4Dir|Description|Options</code></p>
<p>where:</p>
<ul>
<li><strong><a name="baselinename2" class="item">BaselineName</a></strong>
<p>is the name of the baseline to be used for the given update, and</p>
</li>
<li><strong><a name="p4dir" class="item">P4Dir</a></strong>
<p>is the directory to be updated, in Perforce depot syntax, and</p>
</li>
<li><strong><a name="description" class="item">Description</a></strong>
<p>is the Perforce changelist description to be associated with the update. Any occurences of "$N" in the description are replaced with a newline/tab, so multi-line descriptions are possible. You should only have about 65-70 chars before a $N.</p>
</li>
<li><strong><a name="cmd_options" class="item">Options</a></strong>
<p>is an optional comma-delimited list of options for the operation. Valid options include:
<ul>
<li><strong><a name="options_emptydirs" class="item">EMPTYDIRS</a></strong>
<p>Causes empty directories to be populated with placeholder text files and imported.</p>
</li>
<li><strong><a name="options_symlinks" class="item">SYMLINKS</a></strong>
<p>Causes symlinks to be preserved on import. Not applicable on Windows platforms.</p>
</li>
<li><strong><a name="options_nodelete" class="item">NODELETE</a></strong>
<p>Missing files in an updated baseline will not be deleted from the server.</p>
</li>
<li><strong><a name="options_allowwildcards" class="item">ALLOWWILDCARDS</a></strong>
<p>Files with wildcards in their names will be imported.</p>
</li>
<li><strong><a name="options_rmtop" class="item">RMTOP</a></strong>
<p>Top level directory of baseline will be removed. Especially useful for tar files and zip files.</p>
</li>
</ul>
</p>
</li>
</ul>
<p>The Update entry will result in a Perforce changelist being created that will apply files from a given baseline to a specified directory in Perforce.</p>
<p>For example, say you have two baselines named REL1.0 and REL1.1, and you want them checked into <code>//import/MAIN</code>. You might have:</p>
<p><code>UPDATE|REL1.0|//import/MAIN|Added REL1.0 to MAIN.</code></p>
<p><code>UPDATE|REL1.1|//import/MAIN|Updated MAIN with REL1.1.$NContains only deltas.</code></p>
<p>The first update would create a changelist consisting of adds of all files in REL1.0 to <code>//import/MAIN</code>. The second update would contain only the deltas between REL1.0 and REL1.1.</p>
<p>
</p>
<h4><a name="branching_info___safeupdate_entry">Branching Info - SafeUpdate Entry</a></h4>
<p>The Branch SafeUpdate entry is of the form:</p>
<p><code>SAFEUPDATE|BaselineName|P4Dir|Description|Options</code></p>
<p>where:</p>
<ul>
<li><strong><a name="baselinename2" class="item">BaselineName</a></strong>
<p>is the name of the baseline to be used for the given update, and</p>
</li>
<li><strong><a name="p4dir" class="item">P4Dir</a></strong>
<p>is the directory to be updated, in Perforce depot syntax, and</p>
</li>
<li><strong><a name="description" class="item">Description</a></strong>
<p>is the Perforce changelist description to be associated with the update. Any occurences of "$N" in the description are replaced with a newline/tab, so multi-line descriptions are possible. You should only have about 65-70 chars before a $N.</p>
</li>
<li><strong><a name="cmd_options" class="item">Options</a></strong>
<p>is an optional comma-delimited list of options for the operation. Valid options include:
<ul>
<li><strong><a name="options_emptydirs" class="item">EMPTYDIRS</a></strong>
<p>Causes empty directories to be populated with placeholder text files and imported.</p>
</li>
<li><strong><a name="options_symlinks" class="item">SYMLINKS</a></strong>
<p>Causes symlinks to be preserved on import. Not applicable on Windows platforms.</p>
</li>
<li><strong><a name="options_nodelete" class="item">NODELETE</a></strong>
<p>Missing files in an updated baseline will not be deleted from the server.</p>
</li>
<li><strong><a name="options_allowwildcards" class="item">ALLOWWILDCARDS</a></strong>
<p>Files with wildcards in their names will be imported.</p>
</li>
<li><strong><a name="options_rmtop" class="item">RMTOP</a></strong>
<p>Top level directory of baseline will be removed. Especially useful for tar files and zip files.</p>
</li>
</ul>
</p>
</li>
</ul>
<p>The SafeUpdate entry will result in a Perforce changelist being created that will apply files from a given baseline to a specified directory in Perforce.</p>
<p>For example, say you have two baselines named REL1.0 and REL1.1, and you want them checked into <code>//import/MAIN</code>. You might have:</p>
<p><code>SAFEUPDATE|REL1.0|//import/MAIN|Added REL1.0 to MAIN.</code></p>
<p><code>SAFEUPDATE|REL1.1|//import/MAIN|Updated MAIN with REL1.1.$NContains only deltas.</code></p>
<p>The first update would create a changelist consisting of adds of all files in REL1.0 to <code>//import/MAIN</code>. The second update would contain only the deltas between REL1.0 and REL1.1.</p>
<p>It is important to note that the SAFEUPDATE command is parallel to but differs from the UPDATE in the treatment of files which have been deleted in the target location. The before a file is added it is checked
against the identically named file in the depot and if the head revision is deleted the file is not included in the changelist and not added. SAFEUPDATE handles situations such as when code branched and
developed is returned (copied back) to an ancestor branch where one or more of the files may have been deleted. By avoiding doing a <i>blind copy</i> of a deleted file and reporting the difference, a case-by-case review
of files that are skipped can be done.<p>
</p>
<h4><a name="branching_info___branch_entry">Branching Info - Branch Entry</a></h4>
<p>The Branch entry is of the form:</p>
<p><code>BRANCH|SourcePath|TargetPath|Description|Options</code></p>
<p>where:</p>
<ul>
<li><strong><a name="sourcepath" class="item">SourcePath</a></strong>
<p>is the source directory for the given branch, in Perforce depot syntax.</p>
</li>
<li><strong><a name="targetpath" class="item">TargetPath</a></strong>
<p>is the target directory for the given branch, in Perforce depot syntax.</p>
</li>
<li><strong><a name="description2" class="item">Description</a></strong>
<p>is the Perforce changelist description to be associated with the update. Any occurences of "$N" in the description are replaced with a newline/tab, so multi-line descriptions are possible. You should only have about 65-70 chars before a $N.</p>
</li>
<li><strong><a name="br_options" class="item">Options</a></strong>
<p>is an optional comma-delimited list of options for the operation. Valid options include:
<ul>
<li><strong><a name="options_branchspec" class="item">BRANCHSPEC=branchname</a></strong>
<p>A branch spec with the name <code>branchname</code> will be created for use in future integrations. The view will be set to map <code>SourcePath</code> to <code>TargetPath</code>.</p>
</li>
</ul>
</p>
</li>
</ul>
<p>
</p>
<h4><a name="branching_info___copy_merge_entry">Branching Info - Copy Merge Entry</a></h4>
<p>The Copy Merge entry is of the form:</p>
<p><code>COPY_MERGE|SourcePath|TargetPath|Description|Options</code></p>
<p>where:</p>
<ul>
<li><strong><a name="sourcepath2" class="item">SourcePath</a></strong>
<p>is the source directory for the given branch, in Perforce depot syntax.</p>
</li>
<li><strong><a name="targetpath2" class="item">TargetPath</a></strong>
<p>is the target directory for the given branch, in Perforce depot syntax.</p>
</li>
<li><strong><a name="description3" class="item">Description</a></strong>
<p>is the Perforce changelist description to be associated with the update. Any occurences of "$N" in the description are replaced with a newline/tab, so multi-line descriptions are possible. You should only have about 65-70 chars before a $N.</p>
</li>
<li><strong><a name="cp_options" class="item">Options</a></strong>
<p>is an optional comma-delimited list of options for the operation. Valid options include:
<ul>
<li><strong><a name="options_fullcopy" class="item">FULLCOPY</a></strong>
<p>Normally, this operation just uses a <code>resolve -at</code> integration. In cases where the source and target codelines may diverge, the <em>FULLCOPY</em> option follows up with a <em>diff-driven merge</em>, which forces the codelines to converge.
</p>
</li>
</ul>
</p>
</li>
</ul>
<p>
</p>
<h4><a name="branching_info___record_as_merged_entry">Branching Info - Record As Merged Entry</a></h4>
<p>The Record As Merged entry is of the form:</p>
<p><code>RECORD_AS_MERGED|SourcePath|TargetPath|Description</code></p>
<p>where:</p>
<ul>
<li><strong><a name="sourcepath3" class="item">SourcePath</a></strong>
<p>is the source directory for the given branch, in Perforce depot syntax.</p>
</li>
<li><strong><a name="targetpath3" class="item">TargetPath</a></strong>
<p>is the target directory for the given branch, in Perforce depot syntax.</p>
</li>
<li><strong><a name="description4" class="item">Description</a></strong>
<p>is the Perforce changelist description to be associated with the update. Any occurences of "$N" in the description are replaced with a newline/tab, so multi-line descriptions are possible. You should only have about 65-70 chars before a $N.</p>
</li>
</ul>
<p>Bear in mind that this operation runs a normal <code>integration</code> followed by a <code>resolve</code> with the <code>accept yours</code> option. It does not guarantee that the source and target paths will be identical afterwards, merely that the source path will have complete integration credit for merging to the target path. You may wish to follow this operation with an <code>UPDATE</code> to the target codeline with the actual state of the codeline after the merge was done.
</p>
<p>
</p>
<h4><a name="branching_info___rename_entry">Branching Info - Rename Entry</a></h4>
<p>The Rename entry is of the form:</p>
<p><code>RENAME|SourcePath|TargetPath|Description</code></p>
<p>where:</p>
<ul>
<li><strong><a name="sourcepath4" class="item">SourcePath</a></strong>
<p>is the source file or directory to be renamed, in Perforce depot syntax.</p>
</li>
<li><strong><a name="targetpath4" class="item">TargetPath</a></strong>
<p>is the new name for the file or directory, in Perforce depot syntax.</p>
</li>
<li><strong><a name="description5" class="item">Description</a></strong>
<p>is the Perforce changelist description to be associated with the rename. Any occurences of "$N" in the description are replaced with a newline/tab, so multi-line descriptions are possible. You should only have about 65-70 chars before a $N.</p>
</li>
</ul>
<p>
</p>
<hr />
<h1><a name="options">OPTIONS</a></h1>
<p>
</p>
<h2><a name="_v_erbosity__level">-v | --verbosity= <em>level</em></a></h2>
<p>Specify the verbosity level, from 1-3. 1 is quiet mode; only error output is displayed. 2 is normal verbosity; 3 is debug. The default for this program is 3.</p>
<p>
</p>
<h2><a name="_test">-m | --mode= test</a></h2>
<p>Specify No Op mode, indicating that the script should display what it would do with given arguments and config file, but take no action that affects data.</p>
<p>
</p>
<h2><a name="_rmjunkdirs">-r | --remove= rjd</a></h2>
<p>Removes CVS/SVN/Mercurial/Git directories from the server after the import. </p>
<p>
</p>
<h2><a name="_detectcase">-c | --case= <em>level</em></a></h2>
<p>At <em>level</em> 1, detects and reports potential case sensitivity problems in imported data. At <em>level</em> 2, fails if these problems are detected. Files that have the same full path, ignoring case, are detected. This option is best effort; on case-insensitive platforms, some case sensitivity problems may already be obscured during baseline extraction.</p>
<p>
</p>
<h2><a name="_h__help">-h | --help</a></h2>
<p>Display the help. </p>
<p>
</p>
<h1><a name="_arguments">ARGUMENTS</a></h1>
<p>
</p>
<h2><a name="_p4_config_file"><em>p4_config_file</em></a></h2>
<p>Specify the absolute or relative path to the perforce connection config file.</p>
<p>The P4 configuration file is the settings file for connection to the Perforce server that is being updated with the BBI import.
It contains name-value pairs (e.g. P4PORT=perforce:1666) to define the connection, workspace, and related details. In most
cases, this file can be edited once and re-used.</p>
<h2><a name="_bbi_config_file"><em>bbi_config_file</em></a></h2>
<p>Specify the absolute or relative path to the branching information config file.</p>
<p> The BBI configuration file contains the list of definitions and commands to perform to do the BBI import. Baselines define
define the information sources (inputs) for the import and the other command types are the operations to be performed to apply
the files to the target defined to complete importing of files. The commands are processed in the order they are read from the
which does affect how content should be defined. Each command (line in the BBI configuration file) is a single change; lines
are not combined into a compound update.
<p>
</p>
<hr />
<h1><a name="_software_preconditions">SOFTWARE PRECONDITIONS</a></h1>
<p>The target Perforce server must be available and, the server must have the import Depot and workspace with a mapping to that depot created. The workspace line ending should be set to share. The workspace name should be the same as the one specified in the P4CONFIG file. If the server requires the user to login, that should be done before running the script.</p>
<p>The <code>p4</code> and <code>p4d</code> binaries should be available in the path.</p>
<p>
</p>
<hr />
<h1><a name="_validator">VALIDATOR</a></h1>
<p>The validation script is <code>p4bbi_validate.py</code>. This tool will attempt to verify the BBI's actions. It will report any suspected discrepancies between the imported data and the baselines.</p>
<p>Run this script with the same inputs as the regular BBI, except for the <code>-m | --mode</code> flag. This option now specifies the level of checking the validator will perform. Current options are:
<ul>
<li><code>1</code> - Verify file metadata
<li><code>2</code> - Verify file checksums. Note that this may return bad results if the <code>+k</code> file type modifier is in use, as the file checksum will change due to RCS keyword expansion.
</ul>
</p>
<p>Note that the validator looks for changelist description in order to determine the revisions to verify. Changelist descriptions in the configuration file should be unique. (If there are no changes to submit for a command, the description is stored in a counter for later use.)
</p>
<p>
</p>
<hr />
<h1><a name="_examples">BEFORE STARTING</a></h1>
<p>Setup steps:</p>
<p>
<ol>
<li>Confirm that you have 'python3' installed and available in the PATH. From the command line execute <i>python3 -V</i>; if you have a working Python it will print your Python version information.</li>
<br>
<li>Confirm that your Perforce server is running and you can connect to it using P4. From the command line execute <i>p4 info</i> which if you have connectivity to your Perforce server will print information
related to the connection.</li>
<br>
<li>P4 Configuration File Settings</li>
<ol>
<li>Create an import user on the perforce server.</li>
<li>Create a import workspace for the import user and ensure that its workspace root does not overlap
any of your other directories.</li>
<li>Update the P4 configuration file with your server port (P4PORT), user (P4USER), and workspace (P4CLIENT) values.</li>
<br>
</ol>
<li>Create your BBI configuration file(s), referencing the location of the files extracted from the source system in the BASELINE
statements.</li>
</ol>
</p>
<p>
</p>
<hr />
<h1><a name="_return_status">RETURN STATUS</a></h1>
<p>Zero = success, non-zero = failure.</p>
<p>
</p>
<hr />
<h1><a name="_copyright">COPYRIGHT</a></h1>
<p>Perforce Baseline and Branch Import Tool</p>
<p>Copyright (c) 2012 Perforce Software, Inc.</P>
<p>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:</P>
<ol>
<li>Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.</li>
<li>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.</li>
</ol>
<p>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 PERFORCE
SOFTWARE, INC. 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.</p>
<p>THIS SOFTWARE IS NOT OFFICIALLY SUPPORTED.</p>
<h1><a name="_feedback">FEEDBACK</a></h1>
<p>Please send any feedback to <a href="mailto:consulting@perforce.com?subject=Feedback for P4BBI">consulting@perforce.com</a>.</p>
</body>
</html>