2

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?

TenG
  • 3,843
  • 2
  • 25
  • 42

2 Answers2

1

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.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thanks VonC. Part of my problem is that in comparing the 2 workspaces, I also want to extract the backout files from ws2, as well as the changed files from ws1. So, if the compare command returns a/b/c/file1 as being different/modified in ws1, I want to extract the repository file a/b/c/file1 from the reference ws2. I'm not clear how the "lscm changelist extract" will help. – TenG Aug 25 '13 at 23:22
  • @TenG my point is: when you are talking about '`extract`', only `lscm changeset extract` exists, I don't think `lscm extract` exists. You need to reason in change sets, not file. You don't extract directly a file, you do extract a change set. – VonC Aug 26 '13 at 05:34
0

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.

Erigami
  • 804
  • 1
  • 8
  • 20