|
|
@@ -68,8 +68,10 @@ import java.util.Vector; |
|
|
|
import org.apache.tools.ant.BuildException; |
|
|
|
import org.apache.tools.ant.Project; |
|
|
|
import org.apache.tools.ant.Task; |
|
|
|
import org.apache.tools.ant.DirectoryScanner; |
|
|
|
import org.apache.tools.ant.taskdefs.Execute; |
|
|
|
import org.apache.tools.ant.types.Commandline; |
|
|
|
import org.apache.tools.ant.types.FileSet; |
|
|
|
|
|
|
|
/** |
|
|
|
* Change log task. |
|
|
@@ -126,6 +128,13 @@ public class ChangeLogTask |
|
|
|
*/ |
|
|
|
private Date m_stop; |
|
|
|
|
|
|
|
/** |
|
|
|
* Filesets containting list of files against which the cvs log will be |
|
|
|
* performed. If empty then all files will in the working directory will |
|
|
|
* be checked. |
|
|
|
*/ |
|
|
|
private final Vector m_filesets = new Vector(); |
|
|
|
|
|
|
|
/** |
|
|
|
* Set the base dir for cvs. |
|
|
|
*/ |
|
|
@@ -189,6 +198,16 @@ public class ChangeLogTask |
|
|
|
setStart( new Date( time ) ); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Adds a set of files about which cvs logs will be generated. |
|
|
|
* |
|
|
|
* @param fileSet a set of files about which cvs logs will be generated. |
|
|
|
*/ |
|
|
|
public void addFileset( final FileSet fileSet ) |
|
|
|
{ |
|
|
|
m_filesets.addElement( fileSet ); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Execute task |
|
|
|
*/ |
|
|
@@ -221,6 +240,23 @@ public class ChangeLogTask |
|
|
|
command.createArgument().setValue( dateRange ); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Check if list of files to check has been specified |
|
|
|
if( !m_filesets.isEmpty() ) |
|
|
|
{ |
|
|
|
final Enumeration e = m_filesets.elements(); |
|
|
|
while( e.hasMoreElements() ) |
|
|
|
{ |
|
|
|
final FileSet fileSet = (FileSet)e.nextElement(); |
|
|
|
final DirectoryScanner scanner = fileSet.getDirectoryScanner( project ); |
|
|
|
final String[] files = scanner.getIncludedFiles(); |
|
|
|
for( int i = 0; i < files.length; i++ ) |
|
|
|
{ |
|
|
|
command.createArgument().setValue( files[ i ] ); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
final ChangeLogParser parser = new ChangeLogParser( userList ); |
|
|
|
final RedirectingStreamHandler handler = |
|
|
|
new RedirectingStreamHandler( parser ); |
|
|
|