{
for ( Iterator it = scmResult.getChanges().iterator(); it.hasNext(); )
{
org.apache.maven.scm.ChangeSet scmChangeSet = (org.apache.maven.scm.ChangeSet) it.next();
ChangeSet change = new ChangeSet();
change.setAuthor( scmChangeSet.getAuthor() );
change.setComment( scmChangeSet.getComment() );
if ( scmChangeSet.getDate() != null )
{
change.setDate( scmChangeSet.getDate().getTime() );
}
if ( scmChangeSet.getFiles() != null )
{
for ( Iterator i = scmChangeSet.getFiles().iterator(); i.hasNext(); )
{
org.apache.maven.scm.ChangeFile f = (org.apache.maven.scm.ChangeFile) i.next();
ChangeFile file = new ChangeFile();
file.setName( f.getName() );
file.setRevision( f.getRevision() );
change.addFile( file );
}
}
result.addChange( change );
}
}
else
{
//We don't have a changes information probably because provider doesn't have a changelog command
//so we use the updated list that contains only the updated files list
ChangeSet changeSet = convertScmFileSetToChangeSet( scmResult.getUpdatedFiles() );
if ( changeSet != null )
{
result.addChange( changeSet );
}