RTC - extract specific file from repository

1.2k views Asked by At

I have a Perl script that I wrote to package release scripts.

The RTC bits in the script are as follows.

  1. List the workspaces:

    lscm list workspaces -r "$reposURI" -u $reposUser -P $reposPwd

  2. List the componets:

    lscm compare ws "$ws1" ws "$ws2" -r "$reposURI" -u $reposUser -P $reposPwd -I c

  3. Compare the 2 workspaces' specified component to the changed files:

    lscm compare ws "$ws1" ws "$ws2" -r "$reposURI" -u $reposUser -P $reposPwd -I cf

  4. Great! I have the liust of files changed (trust me, this took a LOT of working out). Now, next step is simply extract the files listed from the changed workspace:

According to the documentation there is a "Lscm extract", but it seems not on the version I have. I cannot upgrade as this is a corporate environment where software installs are controlled centrally, and they are sticking with the current RTC version (3).

So, is there an alternative way?

2

There are 2 answers

2
VonC On

I don't know if a lscm extract: it doesn't seem to exist in the RTC documentation.

The help page only mention a lscm changeset extract (used in RTC3.x).

lscm extract is only referenced one, in the article "Using the Jazz SCM command line to support software configuration audit", and I would say it is an error.

0
Erigami On

You can load only the file you care about: scm load <workspace> <path-in-workspace>. That will get the version onto the disk, but it will pollute your disk with RTC metadata (ie, the .jazz5 dir in the root of your sandbox). I suggest running in a temporary directory and then deleting that directory once you have the file content that you want.

That's kind of kludgy. Ideally you'd be able to move onto a modern version of RTC and use the 'extract' subcommand that you mention.