Accessing the full history of a file [message #953749] |
Mon, 22 October 2012 14:00 |
|
Hi,
With other repository providers (well, CVS at least ), I could access the whole history of a given IFile through the Team API :
IFile target = ....;
RepositoryProvider repositoryProvider = RepositoryProvider.getProvider(target.getProject());
if (repositoryProvider != null) {
IFileHistoryProvider historyProvider = repositoryProvider.getFileHistoryProvider();
IFileHistory history = historyProvider.getFileHistoryFor(target, IFileHistoryProvider.NONE, new NullProgressMonitor());
if (history != null) {
final IFileRevision[] revisions = history.getFileRevisions();
[...]
}
}
This does not work with EGit : the IFileRevisions we retrieve through this API are only the revisions "starting from HEAD". i.e. if there were revisions made on the remote of our clone and we fetched those, they will not be present in the list we get from the IFileHistory.
Consider the attached screenshot for example : the file "library.uml" has 5 revisions, one being my locale one (on branch "test", which is also my HEAD), and one being a fetched, but not rebased yet, revision.
With such an history, the above example would only yield a list of 4 revisions :
313b53b HEAD
90b5ce7
5fd771a
fa71a62
This does not seem like the expected behavior; should I raise a bug? In the meantime, is there any workaround I could use in order to get the full list of revisions from your API?
Laurent Goubet
Obeo
|
|
|
Powered by
FUDForum. Page generated in 0.03114 seconds