Perforce Public Depot
Perforce Utilities Project




About This Project

Back to Table of Contents
Content The Perforce Utilities Project is a collection of programs and scripts that integrate Perforce with a variety of software development tools and environments, and/or provide alternative interfaces to the Perforce SCM system.
Curator This project is maintained by Perforce staff, with individual curators as shown below. Eventually we'll split these utilities up into separate projects, depending on their activity and growth. If you have a particular interest in any or all of this project, and would like to volunteer as a curator, please email us.

If you would like to contribute to one of the categories that does not have a curator yet, you may request to have your submitted changes integrated into this project by emailing Perforce staff at opensource@perforce.com.

Depot Browsers

Back to Table of Contents

//public/perforce/utils/perfbrowse/...
perfbrowse. Shows depot hierarchies, changelists, filelogs, file contents, diffs, etc. There's a 99.1-compatible version and a 98.2-compatible version.

//public/perforce/utils/p4db/...
P4DB. Based on perfbrowse, with added features, including labels associated with files, file content viewer with annotated deltas, HTML file viewer, and The Great Submit Race.

NOTE: Security problems have been found with the P4DB implementation. Refer to this Bugtraq notification for more details.

Conversion Scripts

Back to Table of Contents

//public/perforce/utils/cvs2p4/...
This CVS to Perforce converter extracts metadata from a CVS repository and generates a Perforce depot using Perforce client commands. The converter handles Attic/ and .cvsignore, and has flexible support for branching. Contributed by Richard Geiger, who is also its curator. (See the README file for more info.)

//public/perforce/utils/vsstop4/...
Converts Visual Source Safe (VSS) archives to Perforce, preserving the original times and authors. Branches are translated verbatim, individual file revisions are grouped as much as possible into Perforce's notion of atomic changelists.

//public/perforce/utils/pvcstop4/...
Converts PVCS archives to Perforce, preserving the original times and authors. Branches are translated verbatim, individual file revisions are grouped as much as possible into Perforce's notion of atomic changelists.

Both the VSS and PVCS conversion projects are curated by Robert Cowham.

Review Daemons

Back to Table of Contents

//public/perforce/utils/reviewd/p4review.py
A Perforce notification review daemon written in Python, for use on Windows or Unix; can run in the background or via cron; allows users to subscribe to notifications about jobs (as well as changes); can notify admin about bad email addresses.

//public/perforce/utils/reviewd/p4notifyd.pl
A Perforce notification review daemon for Unix, written in Perl. This is the review daemon used for the Public Depot. Runs on Unix; written in perl; can run in the background or via cron; supports "cc:" in the description or client spec; can do logging; can add a hyperlinks to p4web (or some other web-based Perforce browser) to display full change information.

//public/perforce/utils/reviewd/reviewer/...
A Perforce notification review daemon in Java. Contributed by David Markley.

Triggers

Back to Table of Contents

//public/perforce/utils/triggers/...

  • Authentication Triggers
    Authentication Triggers were introduced in the 2005.2 release of the Perforce Server. There are two types of authentication triggers: auth-check and auth-set. See the Perforce System Administrator Guide for additional details. Below are examples of the two new trigger types:

    Script NameTrigger Type
    Description
    p4authenticate.pl auth-check Simple example of LDAP authentication written in Perl.
    p4authenticate.c auth-check Simple example of LDAP authentication written in C.
    testpass.pl auth-check Test trigger to confirm authentication check is working.

  • In, Out, Save, Delete, Content, Submit & Commit Triggers
    In the 2004.2 release of the Perforce Server, six of the above trigger types were introduced. In the 2005.1 release, the delete trigger type was added. Examples of all of these trigger types can be found in the Perforce System Administrator Guide.

  • Pre-submit Triggers
    Prior to 2004.2 release of the Perforce Server, there was only one Perforce trigger type: the pre-submit trigger. The following are examples of pre-submit triggers (now referred to as triggers of type submit).

    Unless otherwise noted, the trigger scripts below were written and contributed byJeff Bowles.

    Script Name
    Description
    Jobs.pl Example trigger to enforce a rule "submissions must be associated with a job.".
    Jobs.sh Similar to above, but contributed by Wes Peters and written in Unix "shell". Takes a different approach to the problem, running "p4 fixes" to determine whether you're fixing something with this submission.
    CheckC.pl A script to notice when you're creating new files (or integrating to a new branch) and the directory name you're writing the [new] file to isn't the same case as an existing directory name.
    (For example, if "//depot/x/y/z.c" exists, this won't allow you to create a file named "//depot/X/Y/one.c".)
    WARNING: This trigger can significantly affect performance.
    Pairs.pl Example trigger to enforce a rule "files of suffix .x/.y need to be checked in as pairs".
    Binary.pl Example trigger to enforce a rule "submissions of .gif must binary files and .sh files should be text and...."
    simple.cmd Classroom example of writing a trigger using the Windows/NT command shell, a.k.a. "a .cmd script". (It checks that "Bug:" is included in the change description.) Doesn't do a lot, but gets the idea across.

  • Diffing and Merging

    Back to Table of Contents

    //public/perforce/utils/emacs_mrg/...
    Some emacs lisp code to make editing merges in p4 easier.

    Compatibility Aids

    Back to Table of Contents

    //public/perforce/utils/c4/...
    c4. A CVS-like frontend to p4. This package was contributed by Neil Russell, who is also its curator. (See the README file for more info.)

    //public/perforce/utils/aegis/...
    Aegis-like wrappers to p4.

    Miscellany

    Back to Table of Contents

    //public/perforce/utils/p4wrapper/...
    p4wrapper. A set of useful commands wrapped around p4, some (but not all) with a CVS bent. Contributed and curated by Rick Richardson. (See the README file for more info.)

    Copyright ©
    1998, 1999
    Perforce Software
    You're browsing a file stored as
    $Id: //guest/perforce_software/utils/index.html#28 $
    in the Perforce Public Depot.
    Back to
    Table of
    Contents