SCM versus API
using SCM I can use the compare subcommand to display the incoming changes between a snapshot and a stream;
scm compare snapshot "GENERATED FOR RE7 on 20110919-14:15" stream CICSRE7 -r https://localhost:9443/ccm -r Administrator -I wfs -D "EEE, d MMM yyyy HH:mm:ss Z" but is it possible to do the same thing using the API, I suppose yes but how? Eric |
4 answers
I do not believe that there is API available to do this so the command line would be the way to go.
|
Yup, there is, but it's certainly more involved. You can use the following to query for a snapshot:
IBaselineSetSearchCriteria query = IBaselineSetSearchCriteria.FACTORY.newInstance(); Then use this code to get the current baseline for a component in the workspace: IWorkspaceConnection conn = ... Then this to generate a comparison report: IWorkspaceManager mgr = ... The IChangeHistorySyncReport class has all the methods to pull diff changesets. Getting a full changeset is very easy, and the class is uncomplicated: IChangeSet cs = (IChangeSet)itemManager.fetchCompleteItem(handle, IItemManager.DEFAULT, null); Hope this helps. |
While the above code should do what you want, I think it is worth mentioning that it is not official API so you can not assume that it will work when used against future versions of RTC.
|
It seems my previous post was not accurate. The code in the com.ibm.team.scm.client package is API.
|
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.