It's all about the answers!

Ask a question

how to get a list of authors of a IResource

Jingwen Ou (5610) | asked Aug 12 '08, 8:58 p.m.

I would like to get the authoring history of a IResource. I am using something like:

IShareable shareable = (IShareable)resource.getAdapter(IShareable.class);
ISharingDescriptor desc = shareable.getShare().getSharingDescriptor();
ITeamRepository repo = RepositoryUtils.getTeamRepository
(desc.getRepositoryUri(), desc.getRepositoryId());

return SCMPlatform.getWorkspaceManager(repo).versionableManager
().fetchCompleteState(shareable.getRemote(), monitor).getModifiedBy();

I guess this is getting the authorhsip corresponding to the local version (the file in the local workspace), since it gets the local IVersionableHandle by using shareable.getRemote() then asking for the author of this version.

I would like to one step forward...How could I get a list of authors of this file, the authors should be ones that make changes before current authors (as described above, including current author)? Looks pretty much like "show in->history".

Thanks in advance,

One answer

permanent link
Jean-Michel Lemieux (2.5k11) | answered Aug 13 '08, 5:01 p.m.

public List getHistoryFor(IVersionableHandle versionableHandle, int limit,
boolean examineEras, IProgressMonitor monitor) throws TeamRepositoryException;

Jazz Source Control Team

Your answer

Register or to post your answer.