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

How to identify a Discarded Changeset programatically using Java API.

Hello All,

I have a scenario where i need to identify whether a given Changeset is discarded or not.

I have a Changeset Object as below.

IChangeSet changeSet = (IChangeSet) currentWIRepo.itemManager().fetchCompleteItem(changeSetHandle,
                            IItemManager.DEFAULT, null);

Are there any APIs to find the state of the CS, whether it is discarded or any other state.

Request you to assist on this.

Thank you.

0 votes



2 answers

Permanent link
Are there any APIs to find the state of the CS, whether it is discarded or any other state.
As far as I know, there isn't a public API for that, but you could use API com.ibm.team.scm.client.IWorkspaceManager#findWorkspacesContainingChangeset and test returning list if it is empty to determinate if that change-set is discarded.
Cheers.

1 vote


Permanent link
Change sets on their own have no concept or property/state of being 'discarded'. You can ask the question as to whether or not a change set is 'in' (i.e. is in the change set history of a component) of a particular repository workspace or stream however.

If you need client-side API to determine this, look at:
IWorkspaceManager#findWorkspacesContainingChangeset

or if you know the workspaces or streams you care about, you might want to call:
IWorksapceManager#locateChangeSets

1 vote

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,939
× 1,202
× 11

Question asked: Oct 04 '18, 5:35 a.m.

Question was seen: 2,675 times

Last updated: Oct 09 '18, 11:45 a.m.

Confirmation Cancel Confirm