p4util - common p4 scripting tasks for ruby projects

When building any kind of tool that uses Perforce underneath, it's pretty common to want a few capabilities:

  • Download different versions of p4, p4d, and the C++ API
  • Initialize up a consistent starting environment of p4d

This is a binary script and set of rake tasks that allows this.

Usage

After installation, p4util help will list available commands, and p4util help [command] will list instructions. Some commands, like p4util init are quite extensive, and should be used as the reference.

Installation

Add this line to your application's Gemfile:

gem 'p4util'

And then execute:

$ bundle

Or install it yourself as:

$ gem install p4util

Changes

  • 0.4.3: Fix issue where p4d might not get killed due to a nil reference

  • 0.4.2: After issuing login -p, reset the password property on the connection

  • 0.4.1: Use 'login -p' everywhere to avoid use of the .p4tickets file

  • 0.4: Change working directory from './work' to '/tmp/p4util'. If you are using perforce and have a local .p4config, you can't submit files if you're ignoring the local './work' directory. This behavior may have changed in 15.1.

  • 0.3.1: Update p4ruby dependency to 2015.1.0

  • 0.3.0: Added the ability to initialize triggers

  • 0.2.0: Added the ability to create 'groups'

  • 0.1.2: Added depot model and the ability to customize the view for changelists

  • 0.1.1: Added documentation for Rake tasks and version string output

  • 0.1.0: Added p4util init command that can do some common p4d configurations, like setting unicode and security settings, along with users and basic adds and edits of files.

  • 0.0.1-0.0.3: Basic download capabilities