Perforce Utilities

Written by Robert Cowham (Perforce Consulting Partner and Trainer).

Here are some example utility scripts which I have found useful from time to time. They are provided with no warranty - use at your own risk! Have a quick look inside to see parameters etc.

Visual Source Safe (VSS) Scripts

A bit hacky (e.g. env stuff still hard coded in) but shows example of how to use VSS OLE Automation from Perl. They tend to be recursive and take a single parameter which is VSS path to start from, e.g. "$/project 1/subdir"      A script to print out a list of VSS files and directories which are marked as deleted.      Prints out VSS files that are "illegal" as far as Perforce is concerned (e.g. have @, #, *, % or unprintable chars in their name).      A script to print out a list of linked (shared or branched) files in a VSS repository.

Other Utilities

specsaver.rb A branch of Tony Smith's script - updated for Ruby 1.8 - does automated versioning of various spec entities (e.g. client specs, branch specs, labels etc).     A branch of Sandy Currier's script to do checkpoints and backups. Enhance to do verifies and email the results. An (old) script which stores the contents of labels as text files in Perforce. Left for posterity but specsaver.rb above does this better! A simple script to create clients from others copying over other stuff as well as just the views (e.g. options). Again, somewhat dated these days.
p4replicate A script for replicating changelists between two Perforce servers. See link for documentation.

Last updated: $Date: 2005/10/04 $