in src/com/intellij/vssSupport/Checkin/VssCheckinEnvironment.java [121:173]
public List<VcsException> commit(List<Change> changes,
String comment,
@NotNull NullableFunction<Object, Object> parametersHolder,
Set<String> feedback)
{
List<VcsException> errors = new ArrayList<>();
HashSet<FilePath> processedFiles = new HashSet<>();
if( comment != null )
VssConfiguration.getInstance(project).getCheckinOptions().COMMENT = comment;
// Keep track of the fact that we deal with renamed fodlers. This will
// help us to suppress undesirable warning messages of type
// "X was checkout from Y folder, continue?" which are invevitable when
// we will checkin changed files under the renamed fodlers.
boolean isAnyAddedFolder = adjustChangesWithRenamedParentFolders( changes );
try
{
initProgress( changes.size() );
// Committing of renamed folders must be performed first since they
// affect all other checkings under them (except those having status
// "ADDED") since:
// - if modified file is checked in before renamed folder checkin then
// we need to checkin from (yet) nonexisting file into (already) non-
// existing space. It is too tricky to recreate the old folders
// structure and commit from out of there.
// - if modified file is checked AFTER the renamed folder has been
// checked in, we just have to checkin in into the necessary place,
// just get the warning that we checking in file which was checked out
// from another location. Supress it.
commitRenamedFolders( changes, errors );
commitDeleted( changes, errors );
// IMPORTANT!
// Committment of the changed files must be performed first because of
// specially processed exceptions described in the ChangeProvider.
commitChanged( changes, processedFiles, errors, isAnyAddedFolder );
commitNew( changes, processedFiles, errors );
}
catch( ProcessCanceledException e )
{
// Nothing to do, just refresh the files which are already committed.
}
VfsUtil.markDirtyAndRefresh(true, true, false, map2Array(processedFiles, VirtualFile.class, FilePath::getVirtualFile));
VcsDirtyScopeManager.getInstance(project).filesDirty(map(processedFiles, FilePath::getVirtualFile), null);
return errors;
}