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

RTC-SCM-CLI: how to find out if a file in my sandbox already belongs to an active changeset ?

I'm writing a wrapper tool around RTC-SCM-CLI

Our requirement is that, during checkin of a file, the user should have the option
- to create a new changeset [or]
- select any other active changeset that is already present in that component

Once the user checks in a file into a changeset, as long as that changeset remains active, it is not possible for the user to link this file to another changeset during his subsequent checkin operations on that file. It would lead to the below error:
Cannot check-in <file> because it is already being changed in another active change set.
Instead of picking a specific change set, try allowing the check-in to pick the correct change set.
Now, my question is, how the user can be prevented in getting into this situation ?
Is there a CLI command available which will let me know if a file in my sandbox already belongs to an active changeset of a component, given its relative path in the sandbox ?
(Once I have this information, then it is easier for me to force the user to either store his changes into that active changeset [or] close that active changeset and open a new one)

Thanks for your help.

0 votes



One answer

Permanent link
You can run 'lscm status' command with -C option which will expand all the change sets. Look for the active change set for the component and check if the file path matches.
If you know the exact change set, you can list the changes in the change set (lscm list changes) and match the file path.

You can run with --json option to get the output in json format.

0 votes

Comments

Thanks for info.

In my use case, many active change sets could be available for a component. I will get back after checking the feasibility of this solution.

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
× 12,016
× 1,201
× 158
× 149
× 113
× 56

Question asked: Oct 30 '13, 9:54 a.m.

Question was seen: 8,155 times

Last updated: Dec 16 '13, 4:06 p.m.

Confirmation Cancel Confirm