for ( Iterator it = collection.iterator(); it.hasNext(); ) {
SVNLogEntry logEntry = ( SVNLogEntry ) it.next();
Map map = logEntry.getChangedPaths();
Set changePathSet = map.keySet();
ScmLogEntry scmLogEntry = new ScmLogEntry(logEntry.getAuthor(),logEntry.getDate(), logEntry.getMessage() );
for ( Iterator it2 = changePathSet.iterator(); it2.hasNext(); ) {
SVNLogEntryPath entryPath = ( SVNLogEntryPath ) map.get( it2.next() );
switch (entryPath.getType()) {
case SVNLogEntryPath.TYPE_ADDED: {
SVNDirEntry dirEntry = this.repository.info( entryPath.getPath(), -1 );
char type = ( dirEntry.getKind() == SVNNodeKind.DIR ) ? 'D' : 'F';
if ( entryPath.getCopyPath() == null ) {
// this entry was added
Add add = new Add( type, entryPath.getPath(), logEntry.getRevision());
scmLogEntry.addAction( add );
break;
} else {
// this entry was copied
Copy copy = new Copy( type, entryPath.getCopyPath(), entryPath.getCopyRevision(), entryPath.getPath(), logEntry.getRevision() );
scmLogEntry.addAction( copy );
break;
}
}
case SVNLogEntryPath.TYPE_DELETED: {
SVNDirEntry dirEntry = this.repository.info( entryPath.getPath(), -1 );
char type = ( dirEntry.getKind() == SVNNodeKind.DIR ) ? 'D' : 'F';
Delete delete = new Delete( type, entryPath.getPath(), logEntry.getRevision());
scmLogEntry.addAction( delete );
break;
}
case SVNLogEntryPath.TYPE_MODIFIED: {
SVNDirEntry dirEntry = this.repository.info( entryPath.getPath(), -1 );
char type = ( dirEntry.getKind() == SVNNodeKind.DIR ) ? 'D' : 'F';
Update update = new Update( type, entryPath.getPath(), logEntry.getRevision());
scmLogEntry.addAction( update );
break;
}
case SVNLogEntryPath.TYPE_REPLACED: {
SVNDirEntry dirEntry = this.repository.info( entryPath.getPath(), -1 );
char type = ( dirEntry.getKind() == SVNNodeKind.DIR ) ? 'D' : 'F';
Replaced replaced = new Replaced( type, entryPath.getPath(), logEntry.getRevision());
scmLogEntry.addAction( replaced );
break;
}
}
}
list.add( scmLogEntry );