// of the changeSets from Jazz SCM. It is stored in the revision of the
// changeSets array.
List<ChangeSet> changeSets = new ArrayList<ChangeSet>();
JazzScmCommand historyCommand = createHistoryCommand( repo, fileSet );
JazzHistoryConsumer changeLogConsumer = new JazzHistoryConsumer( repo, getLogger(), changeSets );
ErrorConsumer errConsumer = new ErrorConsumer( getLogger() );
int status = historyCommand.execute( changeLogConsumer, errConsumer );
if ( status != 0 || errConsumer.hasBeenFed() )
{
return new ChangeLogScmResult( historyCommand.getCommandString(),
"Error code for Jazz SCM history command - " + status,
errConsumer.getOutput(), false );
}
// Now, call the "scm list changesets" command, passing in the list of changesets from the first pass.
JazzScmCommand listChangesetsCommand = createListChangesetCommand( repo, fileSet, changeSets );
JazzListChangesetConsumer listChangesetConsumer =
new JazzListChangesetConsumer( repo, getLogger(), changeSets, datePattern );
errConsumer = new ErrorConsumer( getLogger() );
status = listChangesetsCommand.execute( listChangesetConsumer, errConsumer );
if ( status != 0 || errConsumer.hasBeenFed() )
{
return new ChangeLogScmResult( listChangesetsCommand.getCommandString(),
"Error code for Jazz SCM list changesets command - " + status,
errConsumer.getOutput(), false );
}
// Build the result and return it.
ChangeLogSet changeLogSet = new ChangeLogSet( changeSets, startDate, endDate );