Rational Team Concert Jazz cli commands and resharing a directory
We're using RTC 6.0.2 on Linux. We use cli commands almost exclusively to touch the Jazz repository as we're scripting things into an Infrastructure as Code setup.
I'm new to Jazz. I've used Git/Bitbucket and Stash prior to this gig. I'm not sure if I've uncovered a bug or a deficit in the documentation.
We recently deleted all the streams in the repo and redesigned them with Flow Targets. However, when we tried to load a Component that is immediately beneath a Stream, we could not execute the "lscm share" command with "--reshare" tag. I tried every possible permutation, but reconnecting a local workspace to an RTC sandbox workspace with the same name did not work. I got ancestor conflicts every time.
Let's demonstrate:
I have a Stream called "DevOps" with two components created for it called "TestCode" and "TestCodePatch". The DevOps Stream has a flow target of a Stream called "DEV".
Originally TestCode and TestCode Patch were linked with a Workspace on the server called "BuildService". That Workspace has a similar local workspace on our build server's linux box that is connected. When Stream DevOps was destroyed, the share relationship is still there.
(The only thing I haven't done is wipe out the local .jazz directories on the linux box. That might work.)
So, the components in the stream have been created. I want to load them with the rather large build code that I've got prepped. Here's what I did:
lscm login -r URI-of-Jazz -u BuildServiceUser
"Logged in to URI-of-Jazz"
cd to local workspace directory - /path/BuildService
lscm share -r URI-of-Jazz -u BuildServiceUser --reshare BuildService TestCode TestCode
"Problem running 'share':
Cannot share projects under "/path/BuildService" - ancestor is shared: "/path/BuildService/TestCode". Try 'lscm help share' for more information."
I've tried different permutations of that command from different local directories. No joy.
Any idea how I can reshare this? (I'm going to back up the .jazz directories now, and then delete them to see if I can get a share.)
|
One answer
You mention: When Stream DevOps was destroyed, the share relationship is still there.
That is correct. Deleting the stream should not impact the BuildService workspace or the sandbox (/path/BuildService) just that you have go and remove/change the flow target of the BuildService workspace.
You mention: So, the components in the stream have been created. I want to load them with the rather large build code that I've got prepped.
Seems like you have updated your sandbox with additional files under /path/BuildService/TestCode. I am assuming that since you have TestCode folder in your sandbox you might have loaded using 'lscm load -i BuildService'.
Let us say you created a new folder called "NewFolder" under TestCode folder and added new files under it. To upload this you can run 'lscm checkin .' or you could run 'lscm show status' which will list all the new folder/files as unresolved and then run 'lscm checkin'.
This will upload the new folder to the component in the repository workspace and you can then deliver these changes to the flow target.
Re-share is used when you have disconnected an existing share in the repository workspace and you want reconnect that share back in so that you can sync changes between the sandbox and repository workspace.
Now that you have deleted the .jazz directory from your sandbox, RTC source control does not know about /path/BuildService or in other words that directory is no more tracked. You can still share the NewFolder to the component by first stepping into the directory /path/BuildService/TestCode and running: lscm share -r URI-of-Jazz -u BuildServiceUser BuildService TestCode NewFolder
Note: Now only the NewFolder is being tracked by RTC source control.
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.
Comments
I tried wiping out the .jazz* directories in the local BuildService workspace and in TestCode component directory. The reshare still doesn't work but now complains that "Cannot share projects under /path/BuildService - ancestor is shared: "/path". "