|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.acmsl.antmake.CvsUtils
Provides helpful methods for interacting with CVS servers through its command-line client.
Nested Class Summary | |
static class |
CvsUtils.DateComparator
Sorts CVS entries by date. |
Field Summary | |
static java.util.Comparator |
DATE_COMPARATOR
The date comparator to sort the CVS entries. |
static java.text.DateFormat |
DATE_FORMAT
The date format. |
Constructor Summary | |
protected |
CvsUtils()
Protected constructor to avoid accidental instantiation. |
Method Summary | |
void |
generateChangeLog(java.io.File workingDirectory,
java.lang.String output,
java.lang.String[] files,
org.apache.tools.ant.Task task)
Generates a GNU-formatted ChangeLog file. |
static CvsUtils |
getInstance()
Retrieves a CvsUtils instance. |
protected static java.lang.ref.WeakReference |
getReference()
Retrieves the weak reference. |
protected static void |
setReference(CvsUtils utils)
Specifies a new weak reference. |
CvsEntry[] |
sortByDate(CvsEntry[] cvsEntries)
Sorts given CVS entries by date. |
void |
writeChangeLog(java.io.PrintWriter printWriter,
CvsEntry cvsEntry)
Writes a changelog entry. |
void |
writeChangeLog(java.io.PrintWriter printWriter,
CvsEntry[] cvsEntries)
Writes the changelog. |
void |
writeChangeLog(java.io.PrintWriter printWriter,
RcsFile rcsFile)
Writes the CVS log message for given RCS file. |
void |
writeChangeLog(java.lang.String output,
CvsEntry[] cvsEntries,
AntMakeUtils antMakeUtils,
org.apache.tools.ant.Task task)
Prints changelog to given output file. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.util.Comparator DATE_COMPARATOR
public static final java.text.DateFormat DATE_FORMAT
Constructor Detail |
protected CvsUtils()
Method Detail |
protected static void setReference(CvsUtils utils)
utils
- the utils instance to use.protected static java.lang.ref.WeakReference getReference()
public static CvsUtils getInstance()
public void generateChangeLog(java.io.File workingDirectory, java.lang.String output, java.lang.String[] files, org.apache.tools.ant.Task task) throws AntMakeException
workingDirectory
- the working directory.output
- the output file.files
- the files to record changes for.task
- an Ant task (for logging, and required by Execute).
AntMakeException
- if something goes wrong while
executing the cvs command.public void writeChangeLog(java.lang.String output, CvsEntry[] cvsEntries, AntMakeUtils antMakeUtils, org.apache.tools.ant.Task task) throws AntMakeException
output
- the output file.cvsEntries
- the entry set to write.
AntMakeException
- if theres an error writing changelog.public CvsEntry[] sortByDate(CvsEntry[] cvsEntries)
cvsEntries
- the CVS entries to sort.
public void writeChangeLog(java.io.PrintWriter printWriter, CvsEntry[] cvsEntries) throws java.io.IOException
printWriter
- the printWriter.cvsEntries
- the CVS entries.
java.io.IOException
- if the write operation fails.public void writeChangeLog(java.io.PrintWriter printWriter, CvsEntry cvsEntry) throws java.io.IOException
printWriter
- the printWriter.cvsEntry
- the CVS entry.
java.io.IOException
- if the write operation fails.public void writeChangeLog(java.io.PrintWriter printWriter, RcsFile rcsFile) throws java.io.IOException
printWriter
- the print writer.rcsFile
- the RCS file.
java.io.IOException
- if the write operation fails.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |