Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » [JGit] History details
[JGit] History details [message #538628] Tue, 08 June 2010 09:06 Go to next message
Andrey  is currently offline Andrey Friend
Messages: 10
Registered: May 2010
Junior Member
Hi,

I'm trying to receive a details of commit about the changes (whether a files modified, added or deleted).

I've got a revisions list:
RevWalk currentWalk = new RevWalk(repo);

try {
	currentWalk.markStart(currentWalk.parseCommit(headId));
} catch (IOException e) {
	throw new RuntimeException("Unparseable commit.", e);
}
for (RevCommit commit : currentWalk) {
//..
}


But I'm unable to find a detail about the files deleted, added or modified.

I saw these details in Eclipse GIT history view so I assume this functionality could be implemented with JGit.

Any help appreciated.

Thank you.
Re: [JGit] History details [message #538858 is a reply to message #538628] Tue, 08 June 2010 19:47 Go to previous messageGo to next message
Robin Rosenberg is currently offline Robin RosenbergFriend
Messages: 332
Registered: July 2009
Senior Member
Andrey wrote:

> Hi,
>
> I'm trying to receive a details of commit about the changes (whether a
> files modified, added or deleted).
>
> I've got a revisions list:
>
> RevWalk currentWalk = new RevWalk(repo);
>
> try {
> currentWalk.markStart(currentWalk.parseCommit(headId));
> } catch (IOException e) {
> throw new RuntimeException("Unparseable commit.", e);
> }
> for (RevCommit commit : currentWalk) {
> //..
> }
>
>
> But I'm unable to find a detail about the files deleted, added or
> modified.
>
> I saw these details in Eclipse GIT history view so I assume this
> functionality could be implemented with JGit.

Check the FileDiffContentProvider and the classes it uses in EGit, in
particulare FileDiff.

-- robin
Re: [JGit] History details [message #538918 is a reply to message #538858] Wed, 09 June 2010 05:58 Go to previous messageGo to next message
Andrey  is currently offline Andrey Friend
Messages: 10
Registered: May 2010
Junior Member
Robin, thank you! The FileDiff is very useful.
Re: [JGit] History details [message #581438 is a reply to message #538858] Wed, 09 June 2010 05:58 Go to previous message
Andrey  is currently offline Andrey Friend
Messages: 10
Registered: May 2010
Junior Member
Robin, thank you! The FileDiff is very useful.
Previous Topic:[JGit] History details
Next Topic:Recommended size of repositories and management of private repositories
Goto Forum:
  


Current Time: Sun Aug 25 20:56:57 GMT 2019

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

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

Back to the top