Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [egit-dev] Compare with Revision functionality

Mihael Vrbanec <vrbanec@xxxxxxxxxxxx> wrote:
> My question is: I have a RevCommit (the entry selected in the history  
> view) and want to obtain the corresponding revision of the file. I tried  
> using
> ...
> final String gitPath = mapping.getRepoRelativePath(resource);
> final IFileRevision nextFile = GitFileRevision.inCommit(
>                        db,
>                        commit,
>                        gitPath,
>                        commit);
>
> to no avail.

Pass null as the last arg, not commit.

That last argument is the ObjectId of the file revision itself.
Since you don't have that in hand, you want to pass null so
GitFileRevision will tell CommitFileRevision to lookup the path
and translate it to the proper blob ObjectId on demand.

-- 
Shawn.


Back to the top