hudson.org.apache.tools.ant.taskdefs.cvslib
Class ChangeLogTask

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by hudson.org.apache.tools.ant.taskdefs.AbstractCvsTask
              extended by hudson.org.apache.tools.ant.taskdefs.cvslib.ChangeLogTask
All Implemented Interfaces:
java.lang.Cloneable

public class ChangeLogTask
extends AbstractCvsTask

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
Version:
$Revision: 23071 $ $Date: 2009-10-22 16:03:44 -0700 (Thu, 22 Oct 2009) $

Field Summary
 
Fields inherited from class hudson.org.apache.tools.ant.taskdefs.AbstractCvsTask
DEFAULT_COMPRESSION_LEVEL
 
Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
 
Constructor Summary
ChangeLogTask()
           
 
Method Summary
 void addFile(java.lang.String fileName)
          Adds a file about which cvs logs will be generated.
 void addUser(CvsUser user)
          Add a user to list changelog knows about.
 void execute()
          Execute task
 java.io.File getDir()
           
protected  org.apache.tools.ant.taskdefs.ExecuteStreamHandler getExecuteStreamHandler(java.io.InputStream input)
          find the handler and instantiate it if it does not exist yet
 void setBranch(java.lang.String branch)
           
 void setDaysinpast(int days)
          Set the number of days worth of log entries to process.
 void setDeststream(java.io.OutputStream destfile)
          Set the output stream for the log.
 void setDir(java.io.File dir)
          Set the base dir for cvs.
 void setEnd(java.util.Date stop)
          Set the date at which the changelog should stop.
 void setFile(java.util.List<java.lang.String> files)
           
 void setStart(java.util.Date start)
          Set the date at which the changelog should start.
 void setUsersfile(java.io.File usersFile)
          Set a lookup list of user names & addresses
 
Methods inherited from class hudson.org.apache.tools.ant.taskdefs.AbstractCvsTask
addCommandArgument, addCommandArgument, addConfiguredCommandline, addConfiguredCommandline, configureCommandline, getCommand, getCvsRoot, getCvsRsh, getDest, getErrorStream, getOutputStream, getPackage, getPassFile, getPort, getTag, removeCommandline, runCommand, setAppend, setCommand, setCompression, setCompressionLevel, setCvsExe, setCvsRoot, setCvsRsh, setDate, setDest, setError, setErrorStream, setFailOnError, setNoexec, setOutput, setOutputStream, setPackage, setPassfile, setPort, setQuiet, setReallyquiet, setTag
 
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChangeLogTask

public ChangeLogTask()
Method Detail

setDir

public void setDir(java.io.File dir)
Set the base dir for cvs.

Parameters:
dir - The new dir value

getDir

public java.io.File getDir()

setDeststream

public void setDeststream(java.io.OutputStream destfile)
Set the output stream for the log.

Parameters:
destfile - The new destfile value

setUsersfile

public void setUsersfile(java.io.File usersFile)
Set a lookup list of user names & addresses

Parameters:
usersFile - The file containing the users info.

addUser

public void addUser(CvsUser user)
Add a user to list changelog knows about.

Parameters:
user - the user

setStart

public void setStart(java.util.Date start)
Set the date at which the changelog should start.

Parameters:
start - The date at which the changelog should start.

setBranch

public void setBranch(java.lang.String branch)

setEnd

public void setEnd(java.util.Date stop)
Set the date at which the changelog should stop.

Parameters:
stop - 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.

addFile

public void addFile(java.lang.String fileName)
Adds a file about which cvs logs will be generated.

Parameters:
fileName - fileName relative to setDir(File).

setFile

public void setFile(java.util.List<java.lang.String> files)

execute

public void execute()
             throws org.apache.tools.ant.BuildException
Execute task

Overrides:
execute in class AbstractCvsTask
Throws:
org.apache.tools.ant.BuildException - if something goes wrong executing the cvs command

getExecuteStreamHandler

protected org.apache.tools.ant.taskdefs.ExecuteStreamHandler getExecuteStreamHandler(java.io.InputStream input)
Description copied from class: AbstractCvsTask
find the handler and instantiate it if it does not exist yet

Overrides:
getExecuteStreamHandler in class AbstractCvsTask
Returns:
handler for output and error streams


Copyright © 2010. All Rights Reserved.