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

how to check a changeset is discarded, suspended, delivered

I'm currently getting all the changesets from the components in my workspace using:


// got list of components from IWorkspaceConnection.getComponents();
IChangeSetSearchCriteria criteria = IChangeSetSearchCriteria.FACTORY.newInstance();
criteria.setComponent(component);
WorkspaceManager wm = (WorkspaceManager) SCMPlatform.getWorkspaceManager(repo);
List<IChangeSetHandle> changeSets = wm.findChangeSets(criteria, Integer.MAX_VALUE, monitor);


This is giving me every changeset including discarded and suspended ones. How can I filter those out to only get delivered or active changesets? Is there some criteria I can set on the search, or some manual filtering on each changeset that I can do to ignore discarded or suspended ones?

Thanks!

0 votes



One answer

Permanent link
The IWorkspaceConnection gives you the suspendedChangeSets() and
hasChangeSets() checks if the change sets are in the history. Or you can
get the IChangeHistory from the connection and look for
IChangeHistoryEntryChange.

But in all cases it sounds like you could potentially hit large
unmanageable collections so I would be careful about your workflows and
how you make these calls.

On Mon, 31 Aug 2009 11:38:01 -0400, JasonFregien
<jason> wrote:

I'm currently getting all the changesets from the components in my
workspace using:


// got list of components from
IWorkspaceConnection.getComponents();
IChangeSetSearchCriteria criteria =
IChangeSetSearchCriteria.FACTORY.newInstance();
criteria.setComponent(component);
WorkspaceManager wm = (WorkspaceManager)
SCMPlatform.getWorkspaceManager(repo);
List<IChangeSetHandle> changeSets =
wm.findChangeSets(criteria, Integer.MAX_VALUE, monitor);

This is giving me every changeset including discarded and suspended
ones. How can I filter those out to only get delivered or active
changesets? Is there some criteria I can set on the search, or some
manual filtering on each changeset that I can do to ignore discarded
or suspended ones?

Thanks!



--

0 votes

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
× 10,940

Question asked: Aug 31 '09, 11:31 a.m.

Question was seen: 5,267 times

Last updated: Aug 31 '09, 11:31 a.m.

Confirmation Cancel Confirm