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)
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);
Boaz Nahum selected this answer as the correct answer
Comments
Boaz Nahum
commented Dec 14 '15, 4:09 a.m.
Thank you so much Surya
Your answer if very useful. Indeed I get the history entries, but my problem that I got only those in the specified repository workspace/stream.
Is there a way to get the entire file history - something like 'Show all in repository" in eclipse.
Boaz
Surya Tripathi
commented Dec 15 '15, 1:27 p.m.
Sure.
Well, yes, the Eclipse client has this feature 'show all in repository'.
|
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.