It's all about the answers!

Ask a question

[closed] Finding Changesets by Itemid or comment

VK L (8177156159) | asked Jun 04 '15, 4:47 p.m.
closed Jun 09 '15, 3:38 a.m.
Hi All,
I have to identify if a changeset exists in any stream,prior to creating a new one - so, i am retrieving the uuid during the creation and using it further. I tried using "haschangesets" method to find if a workspace or stream contains a changeset with a particular uuid. code snippet as below:

UUID uuid1 = UUID.valueOf(fChangeSet.getItemId().getUuidValue());
        IChangeSetHandle csHandle = (IChangeSetHandle) IChangeSet.ITEM_TYPE.createItemHandle(uuid1, null);
        IChangeSet csNEW = (IChangeSet) teamRepository.itemManager().fetchCompleteItem(csHandle, IItemManager.REFRESH, monitor);
        if(fWorkspace.hasChangeSets(cs, monitor))
It doesnt locate an existing changeset -> I tried with both Changeset and the handle as well.

2. I also tried using changeset-searchcriteria , but couldn't find an option to search by UUID, ItemID or comment.

Please advise.

The question has been closed for the following reason: "Other" by valli Jun 09 '15, 3:38 a.m.

One answer

permanent link
Ralph Schoon (63.3k33646) | answered Jun 09 '15, 3:18 a.m.
I am not sure that the IItemManager is the correct API. I would suggest to search in the API packages* and*