It's all about the answers!

Ask a question

how to check a changeset is discarded, suspended, delivered


Jason Fregien (58910) | asked Aug 31 '09, 11:31 a.m.
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!

One answer



permanent link
Andrew Hoo (1.0k1) | answered Sep 09 '09, 10:18 a.m.
JAZZ DEVELOPER
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!



--

Your answer


Register or 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.