in src/com/intellij/vssSupport/Checkin/VssCheckinEnvironment.java [293:335]
private void commitChanged( List<Change> changes, HashSet<FilePath> processedFiles,
List<VcsException> errors, boolean suppressWarns )
{
for( Change change : changes )
{
if( !VcsUtil.isChangeForNew( change ) &&
!VcsUtil.isChangeForDeleted( change ) &&
!VcsUtil.isChangeForFolder( change ) )
{
FilePath file = change.getAfterRevision().getFile();
ContentRevision before = change.getBeforeRevision();
String newPath = VcsUtil.getCanonicalLocalPath( file.getPath() );
String oldPath = host.renamedFiles.get( newPath );
if( oldPath != null )
{
FilePath oldFile = before.getFile();
String prevPath = VcsUtil.getCanonicalLocalPath( oldFile.getPath() );
// If parent folders' names of the revisions coinside, then we
// deal with the simle rename, otherwise we process full-scaled
// file movement across folders (packages).
if( oldFile.getVirtualFileParent().getPath().equals( file.getVirtualFileParent().getPath() ))
{
host.renameAndCheckInFile( prevPath, file.getName(), errors );
}
else
{
String newFolder = VcsUtil.getCanonicalLocalPath( file.getVirtualFileParent().getPath() );
host.moveRenameAndCheckInFile( prevPath, newFolder, file.getName(), errors );
}
host.renamedFiles.remove( newPath );
}
else
{
host.checkinFile( file.getVirtualFile(), errors, suppressWarns );
}
incrementProgress( file.getPath() );
processedFiles.add( file );
}
}
}