Mike MacDonagh's Blog

Somewhere in the overlap between software development, process improvement and psychology

scm checkin and deliver script for IBM Jazz RTC SCM

Following on from a previous post where I covered how to load some content from a Rational Team Concert server in a single command here’s a script I use to checkin and deliver in one command back to the stream. As before this is just a wrapper around the standard command line and maybe more appropriate for the more occasional user rather than a cli loving geek but I’m both so here it is!

Also available on github easy cloning with SimpleGit


echo ""
echo "Checks in and delivers current workspace changes against a workitem"
echo "Usage: scmdeliver <workitem_number>"
echo ""


if [ -z "$1" ]
  echo "Error: Please specify a workitem id"

if [ $error -eq 0 ]
  echo "Checking in..."
  checkin_str=`scm checkin * | grep "<No comment>"`
  change_id=`echo $checkin_str | cut -d "(" -f2 | cut -d ")" -f1`
  echo "Checked local changes into changeset $change_id"
  echo "Associating with work item $workitem"
  scm changeset associate $change_id $workitem
  echo "Delivering..."
  scm deliver

So using this script and the scmload script in the previous post you can do this to hack some code:

scmload "Stream A" "Component A"

# Make a bunch of changes

scmdeliver 1234


Note this script assumes a clean workspace before you start making edits, if you want it to work with a previously created changeset you’ll need to tweak it.

Unfortunately you can’t find out your workitems from the command line but that’s a problem for IBM to fix!
Checkout my RTC Masterclasses and my advanced streaming guide:

  1. Development, Integration and Release Streams
  2. Streams for parallel branched development
  3. Streams for component reuse

What do you think?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: