It's all about the answers!

Ask a question

How to fetch current version number of a file from changeset using JAVA apis?

Akshay Daga (132) | asked Apr 22 '19, 5:54 a.m.

I am able to fetch changeset associated with the workitems and the file associated with the changeset. How do I get the details of current version number of the file ?

Accepted answer

permanent link
David Lafreniere (4.8k7) | answered Apr 25 '19, 3:26 a.m.

The client-side code for fetching an IVersionableIdentifier is:
IWorkspaceManager wm = SCMPlatform.getWorkspaceManager(repository);
IVersionableIdentifier identifier = wm.getVersionableIdentifiers(new IVersionableHandle[] { versionableHandle }, monitor)[0];

Akshay Daga selected this answer as the correct answer

Akshay Daga commented Apr 25 '19, 5:25 a.m.

Thank you, it works :-)

Your answer

Register or to post your answer.