Class ChangeLogTask
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.apache.tools.ant.taskdefs.AbstractCvsTask
org.apache.tools.ant.taskdefs.cvslib.ChangeLogTask
- All Implemented Interfaces:
Cloneable
Examines the output of cvs log and group related changes together.
It produces an XML output representing the list of changes.
<!-- Root element --> <!ELEMENT changelog (entry+)> <!-- CVS Entry --> <!ELEMENT entry (date,author,file+,msg)> <!-- Date of cvs entry --> <!ELEMENT date (#PCDATA)> <!-- Author of change --> <!ELEMENT author (#PCDATA)> <!-- List of files affected --> <!ELEMENT msg (#PCDATA)> <!-- File changed --> <!ELEMENT file (name,revision,prevrevision?)> <!-- Name of the file --> <!ELEMENT name (#PCDATA)> <!-- Revision number --> <!ELEMENT revision (#PCDATA)> <!-- Previous revision number --> <!ELEMENT prevrevision (#PCDATA)>
- Since:
- Ant 1.5
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractCvsTask
AbstractCvsTask.Module -
Field Summary
Fields inherited from class AbstractCvsTask
DEFAULT_COMPRESSION_LEVELModifier and TypeFieldDescriptionstatic final intDefault compression level to use, if compression is enabled via setCompression(true).Fields inherited from class ProjectComponent
description, location, project -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFileset(FileSet fileSet) Adds a set of files about which cvs logs will be generated.voidAdd a user to list changelog knows about.voidexecute()Execute taskvoidsetDaysinpast(int days) Set the number of days worth of log entries to process.voidsetDestfile(File destFile) Set the output file for the log.voidSet the base dir for cvs.voidSet the date at which the changelog should stop.voidSet the tag at which the changelog should stop.voidsetRemote(boolean remote) Whether to use rlog against a remote repository instead of log in a working copy's directory.voidSet the date at which the changelog should start.voidsetStartTag(String start) Set the tag at which the changelog should start.voidsetUsersfile(File usersFile) Set a lookup list of user names & addressesMethods inherited from class AbstractCvsTask
addCommandArgument, addCommandArgument, addConfiguredCommandline, addConfiguredCommandline, addModule, configureCommandline, getCommand, getCvsRoot, getCvsRsh, getDest, getErrorStream, getExecuteStreamHandler, getModules, getOutputStream, getPackage, getPassFile, getPort, getTag, removeCommandline, runCommand, setAppend, setCommand, setCompression, setCompressionLevel, setCvsRoot, setCvsRsh, setDate, setDest, setError, setErrorStream, setExecuteStreamHandler, setFailOnError, setNoexec, setOutput, setOutputStream, setPackage, setPassfile, setPort, setQuiet, setReallyquiet, setTagModifier and TypeMethodDescriptionvoidaddCommandArgument(String arg) This needs to be public to allow configuration of commands externally.voidaddCommandArgument(Commandline c, String arg) This method adds a command line argument to an external command.voidAdds direct command-line to execute.voidaddConfiguredCommandline(Commandline c, boolean insertAtStart) Configures and adds the given Commandline.voidadd a named module/package.protected voidConfigure a commandline element for things like cvsRoot, quiet, etc.accessor to a command line as string This should be deprecated AntoineLL July 23d 2003access the CVSROOT variableaccess the CVS_RSH variablegetDest()get the file where the checked out files should be placedprotected OutputStreamaccess the stream to which the stderr from cvs should go if this stream has already been set, it will be returned if the stream has not yet been set, if the attribute error has been set, the output stream will go to the file denoted by the error attribute otherwise the stderr output will go to ant's logging systemprotected ExecuteStreamHandlerfind the handler and instantiate it if it does not exist yetprotected List<AbstractCvsTask.Module> protected OutputStreamaccess the stream to which the stdout from cvs should go if this stream has already been set, it will be returned if the stream has not yet been set, if the attribute output has been set, the output stream will go to the output file otherwise the output will go to ant's logging systemaccess the package or module to operate uponfind the password fileintgetPort()access the port of CVSgetTag()tag or branchprotected voidremove a particular command from a vector of command linesprotected voidrunCommand(Commandline toExecute) Sets up the environment for toExecute and then runs it.voidsetAppend(boolean value) Whether to append output/error when redirecting to a file.voidsetCommand(String c) The CVS command to execute.voidsetCompression(boolean usecomp) If true, this is the same as compressionlevel="3".voidsetCompressionLevel(int level) If set to a value 1-9 it adds -zN to the cvs command line, else it disables compression.voidsetCvsRoot(String root) The CVSROOT variable.voidThe CVS_RSH variable.voidUse the most recent revision no later than the given date.voidThe directory where the checked out files should be placed.voidThe file to direct standard error from the command.protected voidsetErrorStream(OutputStream errorStream) sets a stream to which the stderr from the cvs exe should govoidsets the handlervoidsetFailOnError(boolean failOnError) Stop the build process if the command exits with a return code other than 0.voidsetNoexec(boolean ne) If true, report only and don't change any files.voidThe file to direct standard output from the command.protected voidsetOutputStream(OutputStream outputStream) sets a stream to which the output from the cvs executable should be sentvoidsetPackage(String p) The package/module to operate upon.voidsetPassfile(File passFile) Password file to read passwords from.voidsetPort(int port) Port used by CVS to communicate with the server.voidsetQuiet(boolean q) If true, suppress informational messages.voidsetReallyquiet(boolean q) If true, suppress all messages.voidThe tag of the package/module to operate upon.Methods inherited from class Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskTypeModifier and TypeMethodDescriptionfinal voidbindToOwner(Task owner) Bind a task to another; use this when configuring a newly created task to do work on behalf of another.Returns the container target of this task.Returns the wrapper used for runtime configuration.Returns the name to use in logging messages.Return the type of task.protected RuntimeConfigurableReturn the runtime configurable structure for this task.protected voidhandleErrorFlush(String output) Handles an error line by logging it with the WARN priority.protected voidhandleErrorOutput(String output) Handles an error output by logging it with the WARN priority.protected voidhandleFlush(String output) Handles output by logging it with the INFO priority.protected inthandleInput(byte[] buffer, int offset, int length) Handle an input request by this task.protected voidhandleOutput(String output) Handles output by logging it with the INFO priority.voidinit()Called by the project to let the task initialize properly.protected final booleanHas this task been marked invalid?voidLogs a message with the default (INFO) priority.voidLogs a message with the given priority.voidLogs a message with the given priority.voidLogs a message with the given priority.voidConfigures this task - if it hasn't been done already.final voidperform()Performs this task if it's still valid, or gets a replacement version and performs that otherwise.voidForce the task to be reconfigured from its RuntimeConfigurable.voidsetOwningTarget(Target target) Sets the target container of this task.voidSets the wrapper to be used for runtime configuration.voidsetTaskName(String name) Sets the name to use in logging messages.voidsetTaskType(String type) Sets the name with which the task has been invoked.Methods inherited from class ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProjectModifier and TypeMethodDescriptionclone()Returns the description of the current action.Returns the file/location where this task was defined.Returns the project to which this component belongs.voidsetDescription(String desc) Sets a description of the current action.voidsetLocation(Location location) Sets the file/location where this task was defined.voidsetProject(Project project) Sets the project object of this component.
-
Constructor Details
-
ChangeLogTask
public ChangeLogTask()
-
-
Method Details
-
setDir
Set the base dir for cvs.- Parameters:
inputDir- The new dir value
-
setDestfile
Set the output file for the log.- Parameters:
destFile- The new destfile value
-
setUsersfile
Set a lookup list of user names & addresses- Parameters:
usersFile- The file containing the users info.
-
addUser
Add a user to list changelog knows about.- Parameters:
user- the user
-
setStart
Set the date at which the changelog should start.- Parameters:
start- The date at which the changelog should start.
-
setEnd
Set the date at which the changelog should stop.- Parameters:
endDate- The date at which the changelog should stop.
-
setDaysinpast
public void setDaysinpast(int days) Set the number of days worth of log entries to process.- Parameters:
days- the number of days of log to process.
-
setRemote
public void setRemote(boolean remote) Whether to use rlog against a remote repository instead of log in a working copy's directory.- Parameters:
remote- boolean- Since:
- Ant 1.8.0
-
setStartTag
Set the tag at which the changelog should start.- Parameters:
start- The date at which the changelog should start.
-
setEndTag
Set the tag at which the changelog should stop.- Parameters:
end- The date at which the changelog should stop.
-
addFileset
Adds a set of files about which cvs logs will be generated.- Parameters:
fileSet- a set of files about which cvs logs will be generated.
-
execute
Execute task- Overrides:
executein classAbstractCvsTask- Throws:
BuildException- if something goes wrong executing the cvs command
-