How to get IVersionable 'history'
Given IVersionable (or file/folder/symlink UUID)
How can I get its history in repository - I mean, all the change-sets in repository that contain this specific item.
It is like eclipse 'histroy in repository' just need the list of change-sets, no 'graph' like data structure is needed
Thanks
Boaz
Accepted answer
You can try using this -
ScmService->getHistoryForVersionable(ServiceHistoryProvider historyProvider, IVersionableHandle versionableHandle, int limit, boolean examineEras, ISynchronizationTimes[] syncTimes,IRepositoryProgressMonitorHandle monitor)
ScmService->getHistoryForVersionable(ServiceHistoryProvider historyProvider, IVersionableHandle versionableHandle, int limit, boolean examineEras, ISynchronizationTimes[] syncTimes,IRepositoryProgressMonitorHandle monitor)
WorkspaceManager manager = (WorkspaceManager) SCMPlatform.getWorkspaceManager(repo);
IScmService service = manager.getServerConfigurationService();
ServiceHistoryProvider historyProvider = ServiceHistoryProvider.FACTORY.create((IWorkspaceHandle) workspace.getContextHandle(), componentHandle);
ChangeHistoryEntry[] entries = service.getHistoryForVersionable(historyProvider, versionable, 100, true, null, null);