org.netbeans.libs.git/1 1.1

org.netbeans.libs.git
Class GitRevisionInfo

java.lang.Object
  extended by org.netbeans.libs.git.GitRevisionInfo

public final class GitRevisionInfo
extends Object

Provides information about a certain commit, usually is returned by git commit or log command.


Nested Class Summary
static class GitRevisionInfo.GitFileInfo
          Provides information about what happened to a file between two different commits.
 
Method Summary
 GitUser getAuthor()
           
 GitUser getCommitter()
           
 long getCommitTime()
           
 String getFullMessage()
           
 Map<File,GitRevisionInfo.GitFileInfo> getModifiedFiles()
          Returns the information about the files affected (modified, deleted or added) by this commit.
 String[] getParents()
           
 String getRevision()
           
 String getShortMessage()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getRevision

public String getRevision()
Returns:
id of the commit

getShortMessage

public String getShortMessage()
Returns:
the first line of the commit message.

getFullMessage

public String getFullMessage()
Returns:
full commit message

getCommitTime

public long getCommitTime()
Returns:
time this commit was created in milliseconds.

getAuthor

public GitUser getAuthor()
Returns:
author of the commit

getCommitter

public GitUser getCommitter()
Returns:
person who actually committed the changes, may or may not be the same as a return value of the getAuthor method.

getModifiedFiles

public Map<File,GitRevisionInfo.GitFileInfo> getModifiedFiles()
                                                       throws GitException
Returns the information about the files affected (modified, deleted or added) by this commit. First time call should not be done from the EDT. When called for the first time the method execution can take a big amount of time because it compares the commit tree with its parents and identifies the modified files. Any subsequent call to the first successful call will return the cached value and will be fast.

Returns:
files affected by this change set
Throws:
GitException - when an error occurs

getParents

public String[] getParents()
Returns:
commit ids of this commit's parents

org.netbeans.libs.git/1 1.1

Built on May 22 2012.  |  Portions Copyright 1997-2012 Oracle. All rights reserved.