Top Description Fields Constructors Methods
org.apache.tools.ant.taskdefs.cvslib

public Class ChangeLogTask

extends AbstractCvsTask
Class Inheritance
Imports
java.io.File, .IOException, .OutputStreamWriter, .PrintWriter, .UnsupportedEncodingException, java.nio.charset.StandardCharsets, java.nio.file.Files, java.text.SimpleDateFormat, java.util.ArrayList, .Date, .List, .Properties, .Vector, org.apache.tools.ant.BuildException, .DirectoryScanner, .Project, org.apache.tools.ant.taskdefs.AbstractCvsTask, org.apache.tools.ant.types.FileSet

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

Field Summary

Modifier and TypeField and Description
private List<CvsUser>
cvsUsers

User list

private File
destFile

Output file

private Date
endDate

The latest date at which to stop processing entries.

private String
endTag

End tag when doing tag ranges.

private final List<FileSet>
filesets

Filesets containing list of files against which the cvs log will be performed.

private File
inputDir

Input dir

private boolean
remote

Determines whether log (false) or rlog (true) is used

private Date
startDate

The earliest date at which to start processing entries.

private String
startTag

Start tag when doing tag ranges.

private File
usersFile

User list

Inherited from org.apache.tools.ant.taskdefs.AbstractCvsTask:
DEFAULT_COMPRESSION_LEVEL

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
addFileset(final FileSet
a set of files about which cvs logs will be generated.
fileSet
)

Adds a set of files about which cvs logs will be generated.

public void
addUser(final CvsUser
the user
user
)

Add a user to list changelog knows about.

public void
private CVSEntry[]

Returns:

the filtered entry set
filterEntrySet
(final CVSEntry[]
the entry set to filter
entrySet
)

Filter the specified entries according to an appropriate rule.

private void
loadUserlist(final Properties
the file of users
userList
)

Load the userlist from the userList file (if specified) and add to list of users.

private void
replaceAuthorIdWithName(final Properties userList, final CVSEntry[] entrySet)

replace all known author's id's with their maven specified names

public void
setDaysinpast(final int
the number of days of log to process.
days
)

Set the number of days worth of log entries to process.

public void
setDestfile(final File
The new destfile value
destFile
)

Set the output file for the log.

public void
setDir(final File
The new dir value
inputDir
)

Set the base dir for cvs.

public void
setEnd(final Date
The date at which the changelog should stop.
endDate
)

Set the date at which the changelog should stop.

public void
setEndTag(final String
The date at which the changelog should stop.
end
)

Set the tag at which the changelog should stop.

public void
setRemote(final boolean
boolean
remote
)

Whether to use rlog against a remote repository instead of log in a working copy's directory.

public void
setStart(final Date
The date at which the changelog should start.
start
)

Set the date at which the changelog should start.

public void
setStartTag(final String
The date at which the changelog should start.
start
)

Set the tag at which the changelog should start.

public void
setUsersfile(final File
The file containing the users info.
usersFile
)

Set a lookup list of user names & addresses

private void
validate()

Validate the parameters specified for task.

private void
writeChangeLog(final CVSEntry[]
the entry set to write.
entrySet
)

Print changelog to file specified in task.

Inherited from org.apache.tools.ant.taskdefs.AbstractCvsTask:
addCommandArgumentaddCommandArgumentaddConfiguredCommandlineaddConfiguredCommandlineaddModuleconfigureCommandlinegetCommandgetCvsRootgetCvsRshgetDestgetErrorStreamgetExecuteStreamHandlergetModulesgetOutputStreamgetPackagegetPassFilegetPortgetTagremoveCommandlinerunCommandsetAppendsetCommandsetCompressionsetCompressionLevelsetCvsRootsetCvsRshsetDatesetDestsetErrorsetErrorStreamsetExecuteStreamHandlersetFailOnErrorsetNoexecsetOutputsetOutputStreamsetPackagesetPassfilesetPortsetQuietsetReallyquietsetTag

Field Detail

cvsUsersback to summary
private List<CvsUser> cvsUsers

User list

destFileback to summary
private File destFile

Output file

endDateback to summary
private Date endDate

The latest date at which to stop processing entries.

endTagback to summary
private String endTag

End tag when doing tag ranges.

filesetsback to summary
private final List<FileSet> filesets

Filesets containing list of files against which the cvs log will be performed. If empty then all files in the working directory will be checked.

inputDirback to summary
private File inputDir

Input dir

remoteback to summary
private boolean remote

Determines whether log (false) or rlog (true) is used

startDateback to summary
private Date startDate

The earliest date at which to start processing entries.

startTagback to summary
private String startTag

Start tag when doing tag ranges.

usersFileback to summary
private File usersFile

User list

Constructor Detail

ChangeLogTaskback to summary
public ChangeLogTask()

Method Detail

addFilesetback to summary
public void addFileset(final FileSet fileSet)

Adds a set of files about which cvs logs will be generated.

Parameters
fileSet:FileSet

a set of files about which cvs logs will be generated.

addUserback to summary
public void addUser(final CvsUser user)

Add a user to list changelog knows about.

Parameters
user:CvsUser

the user

executeback to summary
public void execute() throws BuildException

Overrides org.apache.tools.ant.taskdefs.AbstractCvsTask.execute.

Execute task

Annotations
@Override
Exceptions
BuildException:
if something goes wrong executing the cvs command
filterEntrySetback to summary
private CVSEntry[] filterEntrySet(final CVSEntry[] entrySet)

Filter the specified entries according to an appropriate rule.

Parameters
entrySet:CVSEntry[]

the entry set to filter

Returns:CVSEntry[]

the filtered entry set

loadUserlistback to summary
private void loadUserlist(final Properties userList) throws BuildException

Load the userlist from the userList file (if specified) and add to list of users.

Parameters
userList:Properties

the file of users

Exceptions
BuildException:
if file can not be loaded for some reason
replaceAuthorIdWithNameback to summary
private void replaceAuthorIdWithName(final Properties userList, final CVSEntry[] entrySet)

replace all known author's id's with their maven specified names

setDaysinpastback to summary
public void setDaysinpast(final int days)

Set the number of days worth of log entries to process.

Parameters
days:int

the number of days of log to process.

setDestfileback to summary
public void setDestfile(final File destFile)

Set the output file for the log.

Parameters
destFile:File

The new destfile value

setDirback to summary
public void setDir(final File inputDir)

Set the base dir for cvs.

Parameters
inputDir:File

The new dir value

setEndback to summary
public void setEnd(final Date endDate)

Set the date at which the changelog should stop.

Parameters
endDate:Date

The date at which the changelog should stop.

setEndTagback to summary
public void setEndTag(final String end)

Set the tag at which the changelog should stop.

Parameters
end:String

The date at which the changelog should stop.

setRemoteback to summary
public void setRemote(final boolean remote)

Whether to use rlog against a remote repository instead of log in a working copy's directory.

Parameters
remote:boolean

boolean

Since
Ant 1.8.0
setStartback to summary
public void setStart(final Date start)

Set the date at which the changelog should start.

Parameters
start:Date

The date at which the changelog should start.

setStartTagback to summary
public void setStartTag(final String start)

Set the tag at which the changelog should start.

Parameters
start:String

The date at which the changelog should start.

setUsersfileback to summary
public void setUsersfile(final File usersFile)

Set a lookup list of user names & addresses

Parameters
usersFile:File

The file containing the users info.

validateback to summary
private void validate() throws BuildException

Validate the parameters specified for task.

Exceptions
BuildException:
if fails validation checks
writeChangeLogback to summary
private void writeChangeLog(final CVSEntry[] entrySet) throws BuildException

Print changelog to file specified in task.

Parameters
entrySet:CVSEntry[]

the entry set to write.

Exceptions
BuildException:
if there is an error writing changelog.