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

How to perform SCM checkin operation

Hi,
I'm looking for a way to perform check-in using plain API with the same behaviour of "scm checkin" command from scmtools. Is there some code (of scmtools if possible) I can read in order to get this running?
Particulary I'm looking for methods to
- get the workspace I'm in at the launch
- get the component giving file path
- check-in operation

This because there is not an Ant task to perform it during a build.

Thanks,
Michele.

0 votes



One answer

Permanent link
Relating to the previous point I've some more detailed questions:

1 - in order to get the workspace (as object) I think I can use ISandbox, but I'm not sure to have completely understand ISandbox. It seems that I can get ISandbox from every single file in filesystem using SharingManager.getInstance().getSandbox(base, false) but it exists (as ISandbox.isExistingSandbox method) only if base is an IPath to the root of the workspace.
2- checkin operation could be done using an ICheckinOperation. These object has two different methods:
- requestCheckin(IShareable[] arg0, IChangeSetHandle arg1, String arg2, IProgressMonitor arg3)
- requestCheckin(IWorkspaceConnection arg0, IComponentHandle arg1, ILocalChange[] arg2, IChangeSetHandle arg3, String arg4, IProgressMonitor arg5)
For what I understand, the second one must be used in order to check-in of more than one local change, obtained using getPendingChanges. what I really don't understand is how to use the first method and which kind of ISharable objects have to be provided.

Any help will be appreciated.

Thanks,
Michele.

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,938

Question asked: Mar 31 '11, 9:38 a.m.

Question was seen: 5,700 times

Last updated: Mar 31 '11, 9:38 a.m.

Confirmation Cancel Confirm