I've started to put together some commonly used/requested scripts both to provide examples of good scripting using P4Ruby and also to solve some common problems in what I hope is an efficient way.
I hope that over time, this will grow into a fairly broad range of resources for Perforce users.
All of these scripts require you to install Ruby and P4Ruby
If you have any problems or questions with these scripts you can contact me at tony@perforce.com or tony@smee.org. These scripts are not supported by Perforce Software, but by me personally. I'll answer questions as quickly as I can.
These are some example trigger scripts. The documentation for all of these scripts is available here.
Common Files
P4Triggers.rb Pre-Submit Triggers checkjob.rb checktype.rb checkcase.rb Post-Submit (Commit) Triggers (2004.2 and later) autointeg.rb Spec Triggers defaultclient.rb
These are some useful non-trigger scripts
integrename.rb A script to integrate changes using a branch view and attempt to follow renames in both the source and target branches. oldclients.rb A script to find the oldest <n> clients - useful to locate candidates for deletion. reversechange.rb A script to back out a specified change. Handles many cases, but may be defeated by older changes. See the notes in the script for more information.
Category:Perforce administrative tools Category:Perforce APIs <Category:Ruby>
Introduction ------------ I've started to put together some commonly used/requested scripts both to provide examples of good scripting using P4Ruby and also to solve some common problems in what I hope is an efficient way. I hope that over time, this will grow into a fairly broad range of resources for Perforce users. All of these scripts require you to install [Ruby](http://www.ruby-lang.org) and [P4Ruby](ftp://ftp.perforce.com/perforce) Support ------- If you have any problems or questions with these scripts you can contact me at <tony@perforce.com> or <tony@smee.org>. These scripts are not supported by Perforce Software, but by me personally. I'll answer questions as quickly as I can. Triggers -------- These are some example trigger scripts. The documentation for all of these scripts is available [here](http://public.perforce.com/guest/tony_smith/perforce/P4Rubylib/triggers/doc/index.html). Common Files -------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [P4Triggers.rb](http://public.perforce.com/guest/tony_smith/perforce/P4Rubylib/triggers/P4Triggers.rb) Pre-Submit Triggers [checkjob.rb](http://public.perforce.com/guest/tony_smith/perforce/P4Rubylib/triggers/checkjob.rb) [checktype.rb](http://public.perforce.com/guest/tony_smith/perforce/P4Rubylib/triggers/checktype.rb) [checkcase.rb](http://public.perforce.com/guest/tony_smith/perforce/P4Rubylib/triggers/checkcase.rb) Post-Submit (Commit) Triggers (2004.2 and later) [autointeg.rb](http://public.perforce.com/guest/tony_smith/perforce/P4Rubylib/triggers/autointeg.rb) Spec Triggers [defaultclient.rb](http://public.perforce.com/guest/tony_smith/perforce/P4Rubylib/triggers/defaultclient.rb) General Purpose Scripts ----------------------- These are some useful non-trigger scripts ------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------------------------------------ [integrename.rb](http://public.perforce.com/guest/tony_smith/perforce/P4Rubylib/scripts/integrename.rb) A script to integrate changes using a branch view and attempt to follow renames in both the source and target branches. [oldclients.rb](http://public.perforce.com/guest/tony_smith/perforce/P4Rubylib/scripts/oldclients.rb) A script to find the oldest <n> clients - useful to locate candidates for deletion. [reversechange.rb](http://public.perforce.com/guest/tony_smith/perforce/P4Rubylib/scripts/reversechange.rb) A script to back out a specified change. Handles many cases, but may be defeated by older changes. See the notes in the script for more information. ------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------------------------------------ Additional Information ---------------------- [Category:Perforce administrative tools](Category:Perforce_administrative_tools "wikilink") [Category:Perforce APIs](Category:Perforce_APIs "wikilink") <Category:Ruby>
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 13792 | Lester Cheung | Archive of wiki.workshop.perforce.com in raw (mediawiki) and markdown formats. |