private void analyzeWritableFilesByStatus()

in src/com/intellij/vssSupport/VssChangeProvider.java [286:342]


  private void analyzeWritableFilesByStatus( List<String> files,
                                             HashSet<String> newf, HashSet<String> changed,
                                             HashSet<String> hijacked, HashSet<String> obsolete )
  {
    List<String> oldNames = new ArrayList<>();
    for( String file : files )
    {
      String legalName = discoverOldName( host, file );
      oldNames.add( legalName );
    }

    try
    {
      StatusMultipleCommand cmd = new StatusMultipleCommand( project, oldNames );
      cmd.execute();

      //  If any error occured, most probably it is the critical one - others are
      //  processed on the "by line" basis (and per file correspondingly).
      if( cmd.getErrors().size() > 0 )
      {
        VcsImplUtil.showErrorMessage(project, cmd.getErrors().get(0).getMessage(),
                                     VssBundle.message("message.title.check.status"));
      }
      else
      {
        for( int i = 0; i < files.size(); i++ )
        {
          if( cmd.isDeleted( oldNames.get( i ) ) )
            obsolete.add( files.get( i ) );
          else
          if( cmd.isNonexist( oldNames.get( i ) ) )
            newf.add( files.get( i ) );
          else
          if( cmd.isCheckedout( oldNames.get( i ) ) )
            changed.add( files.get( i ) );
          else
            hijacked.add( files.get( i ) );
        }
      }
    }
    catch( NullPointerException e )
    {
      LOG.info( "\n*** Found non-convertible paths: ");
      for( String name : oldNames )
      {
        LOG.info( "\t" + name );
      }
      LOG.info( "*** for content root paths: ");
      ProjectLevelVcsManager mgr = ProjectLevelVcsManager.getInstance(project);
      VirtualFile[] roots = mgr.getRootsUnderVcs( host );
      for( VirtualFile root : roots )
      {
        LOG.info( "\t" + root.getPath() );
      }
      VssUtil.showErrorOutput( "Internal error occured. Please submit a bug with the IDEA log file attached.", project );
    }
  }