Package org.eclipse.jgit.pgm
Class RevWalkTextBuiltin
- java.lang.Object
-
- org.eclipse.jgit.pgm.TextBuiltin
-
- org.eclipse.jgit.pgm.RevWalkTextBuiltin
-
abstract class RevWalkTextBuiltin extends TextBuiltin
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.jgit.pgm.TextBuiltin
TextBuiltin.TerminatedByHelpException
-
-
Field Summary
Fields Modifier and Type Field Description (package private) boolean
all
private java.util.List<RevCommit>
commits
(package private) boolean
count
private java.lang.String
followPath
private int
maxCount
(package private) boolean
objects
(package private) char[]
outbuffer
(package private) boolean
parents
protected TreeFilter
pathFilter
private java.util.List<RevFilter>
revLimiter
private java.util.EnumSet<RevSort>
sorting
(package private) RevWalk
walk
-
Constructor Summary
Constructors Constructor Description RevWalkTextBuiltin()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description (package private) void
addAuthorRevFilter(java.lang.String who)
(package private) void
addCMessageRevFilter(java.lang.String msg)
(package private) void
addCommitterRevFilter(java.lang.String who)
protected RevWalk
createWalk()
Create RevWalk(package private) void
enableBoundary(boolean on)
(package private) void
enableDateOrder(boolean on)
(package private) void
enableReverse(boolean on)
private void
enableRevSort(RevSort type, boolean on)
(package private) void
enableTopoOrder(boolean on)
protected void
run()
Perform the actions of this command.protected void
show(ObjectWalk objectWalk, RevObject currentObject)
"Show" the current RevCommit when called from the main processing loop.protected abstract void
show(RevCommit c)
"Show" the current RevCommit when called from the main processing loop.protected int
walkLoop()
Loop the walk-
Methods inherited from class org.eclipse.jgit.pgm.TextBuiltin
abbreviateRef, containsHelp, die, die, die, die, execute, getErrorWriter, getOutputWriter, getRepository, getResourceBundle, init, initRaw, parseArguments, printUsage, printUsageAndExit, printUsageAndExit, requiresRepository, resolve, setCommandName
-
-
-
-
Field Detail
-
walk
RevWalk walk
-
objects
boolean objects
-
parents
boolean parents
-
count
boolean count
-
all
boolean all
-
outbuffer
char[] outbuffer
-
sorting
private final java.util.EnumSet<RevSort> sorting
-
followPath
private java.lang.String followPath
-
commits
private java.util.List<RevCommit> commits
-
pathFilter
protected TreeFilter pathFilter
-
revLimiter
private final java.util.List<RevFilter> revLimiter
-
maxCount
private int maxCount
-
-
Method Detail
-
enableRevSort
private void enableRevSort(RevSort type, boolean on)
-
enableDateOrder
void enableDateOrder(boolean on)
-
enableTopoOrder
void enableTopoOrder(boolean on)
-
enableReverse
void enableReverse(boolean on)
-
enableBoundary
void enableBoundary(boolean on)
-
addAuthorRevFilter
void addAuthorRevFilter(java.lang.String who)
-
addCommitterRevFilter
void addCommitterRevFilter(java.lang.String who)
-
addCMessageRevFilter
void addCMessageRevFilter(java.lang.String msg)
-
run
protected void run() throws java.lang.Exception
Perform the actions of this command.This method should only be invoked by
TextBuiltin.execute(String[])
.- Specified by:
run
in classTextBuiltin
- Throws:
java.lang.Exception
- an error occurred while processing the command. The main framework will catch the exception and print a message on standard error.
-
walkLoop
protected int walkLoop() throws java.lang.Exception
Loop the walk- Returns:
- number of RevCommits walked
- Throws:
java.lang.Exception
- if any.
-
show
protected abstract void show(RevCommit c) throws java.lang.Exception
"Show" the current RevCommit when called from the main processing loop.Implement this methods to define the behavior for subclasses of RevWalkTextBuiltin.
- Parameters:
c
- The currentRevCommit
- Throws:
java.lang.Exception
-
show
protected void show(ObjectWalk objectWalk, RevObject currentObject) throws java.lang.Exception
"Show" the current RevCommit when called from the main processing loop.The default implementation does nothing because most subclasses only process RevCommits.
- Parameters:
objectWalk
- theObjectWalk
used bywalkLoop()
currentObject
- The currentRevObject
- Throws:
java.lang.Exception
-
-