how to check a changeset is discarded, suspended, delivered
I'm currently getting all the changesets from the components in my workspace using:
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!
// 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
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:
--
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!
--