Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Accessing the full history of a file
Accessing the full history of a file [message #953749] Mon, 22 October 2012 14:00
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
Hi,

With other repository providers (well, CVS at least Razz), 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.

index.php/fa/12011/0/

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
Previous Topic:show in repositories view, show in history broken
Next Topic:Importing projects from git using new project wizard
Goto Forum:
  


Current Time: Sat Apr 27 02:30:56 GMT 2024

Powered by FUDForum. Page generated in 0.03430 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top