Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How to Delete the contents of the Component programatically using RTC plain API.

Hello Team,

I have a usecase that whenever i add new data to the component, the component should be empty.
I need to delete all the contents of the component programatically.

Is there a RTC API, given a component it deletes the contents of the component ?

Thanks.


0 votes



2 answers

Permanent link

No, this is not how components are supposed to be used in RTC.

0 votes

Comments

Thanks Ralph,
This is required for us for the following scenario, i explain in detail :
We have a legacy source code system, where users are working and they freeze with checkpoints. We need to migrate this data in the checkpoints from this legacy system to RTC. it should also be in checkpoints wise migration.
For the first time we migrate the checkpoint data(programatically checkin all files/folders ) and baseline it in RTC.
But when migrating the second checkpoint similar way and baselined it, on checking the contents of the baseline2, we get the contents of baseline 1 as well.

so this is the issue, we need a clean contents in the component checkpoint wise.
So we are planning to delete the content of the component and then migrating the checkpoint.

Is there any other way to delete the contents ?
We are also thinking of an another way : Load the Repo WS, delete all the files/folders in the component, checkin the changeset with deleted contents, this will clear the component. Is this approach better ?

to delete all the files/folders checkedIn

Is there any other ways to do this ?


Permanent link

As far as I understand the question, what you want to do is to setup a stream with components in a way that
You initially share the oldest baseline (call it BS0) and then you want to share newer baselines over that repeatedly.

The way I would approach this is as follows:

  1. Create a Stream with the initial components you want
  2. Create a repository workspace from the stream (that flows with the stream)
  3. x=0
  4. Do
    1. Import the baseline Bx data into an RTC client sandbox/workspace.
    2. Share the data with the repository workspace, partitioning it into the components they are supposed to go
    3. Create a Snapshot/baseline for all components
    4. Deliver everything
    5. Unload the repository workspace with deleting the local content
    6. X++
    7. If additional baseline exists loop to 4
  5. done


0 votes

Comments

Note, this is done to be able to create some kind of history and to actually be able to diff and merge later development.
If you have branching or other parallel versions, you would rebase the workspace and stream (or use a different set of them based on the common ancestor baseline) and than share the next version on top of that.

If you create an initial baseline on the component that is pretty much empty and start with that baseline over and over,

as far as I know you will never ever ever be able to compare/merge the elements associated to the unconnected histories.

You obviously want to try this out on a test system until the process works and has proven you can use the data.
 

Your answer

Register or log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938
× 1,202

Question asked: Mar 01 '18, 3:24 a.m.

Question was seen: 2,830 times

Last updated: Mar 01 '18, 4:32 a.m.

Confirmation Cancel Confirm