Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[egit-dev] Problem with getting file revisions using JGit



I have already posted this question to the eclipse newsgroup but I thought it would help to post it here again.


My problem is to get all revisions of a file in an existing repository.
I figured out how to get the content of that file if I have the commit in
which that file was changed.
Now the problem is about getting the right commits.
Here is my code:

        AnyObjectId headID = local.resolve(Constants.HEAD);
        RevWalk walk = new RevWalk(local);

        TreeWalk fileWalker = new TreeWalk(local);

        RevCommitList<RevCommit> list = new RevCommitList<RevCommit>();

This I figured out in the egit plugin.
But when I execute that code the RevCommitList is always empty.
What can be wrong?


Thanks a lot.


Back to the top