a Perforce trigger that "tweets" changelist commits
| Version: | 1.0 (2009-03-30) |
| Created by: | Stefan van As |
Perforce is a version control system.
p4twitter is a command-line utility that will send (aka tweet) your Perforce changelist descriptions to Twitter. Because tweets are text-based posts of up to 140 bytes in length, Twitter is an excellent channel to publish your changelists to your target audience.
p4twitter is Windows-only.
p4twitter expects the following command-line parameters:
username |
your Twitter username |
password |
your Twitter password |
p4user |
your Perforce username (probably Administrator) |
p4passwd |
your Perforce password (probably the Administrator password) |
In addition to the above, p4twitter expects a changelist command-line parameter, but this is provided by the Perforce server itself via the %changelist% variable:
p4twitter changelist=%changelist%
TopStyle 4 is a Twitter user that is running p4twitter to "tweet" about changelist commits automatically. Basically, it comes down to this: every time a bug is fixed (or a new feature has been added), and this bugfix is committed to Perforce, a new tweet is published automatically, allowing the target audience to stay on top of the project on a daily basis.
1. Unzip p4twitter.zip to your Perforce server directory (probably C:\Program Files\Perforce)
2. Create a new Perforce trigger (click here for more info on Perforce triggers).
We're not going to repeat everything about Perforce triggers here, but you create a Perforce trigger via the p4 triggers command. Here's an example:
p4twitter change-commit //depot/... "p4twitter.exe username=topstyle4 password=******** p4user=Administrator p4passwd=******** changelist=%changelist%"
This example above breaks down to this:
p4twitter |
the name of the trigger. |
change-commit |
trigger type. change-commit is a changelist submission trigger that will execute after changelist commit. |
//depot/... |
a file pattern in depot syntax. when a user submits a changelist that contains any files that match this file pattern, this trigger is executed. |
"p4twitter.exe" |
the command for the Perforce server to run. must be quoted. please make sure to include *all* the command-line parameters and the %changelist% variable. |
Note: p4twitter will ALWAYS return an exit status of 0 (zero), even if sending the changelist description to Twitter fails for whatever reason (in other words: changelist submission should always succeed regardless of the p4twitter result).
Yes, p4twitter is freeware but unsupported. Use at your own risc.