RTC-SCM-CLI: how to find out if a file in my sandbox already belongs to an active changeset ?
Karthikeyan Baskaran (45●8●13)
| asked Oct 30 '13, 9:54 a.m.
retagged Dec 16 '13, 4:06 p.m. by David Lafreniere (4.8k●7)
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.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
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.
|
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.