It's all about the answers!

Ask a question

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


Karthikeyan Baskaran (45813) | asked Oct 30 '13, 9:54 a.m.
retagged Dec 16 '13, 4:06 p.m. by David Lafreniere (4.3k7)
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.

One answer



permanent link
Shashikant Padur (3.9k27) | answered Nov 05 '13, 5:23 a.m.
JAZZ DEVELOPER
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.

Comments
Karthikeyan Baskaran commented Dec 12 '13, 12:55 a.m.

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 to post your answer.