private void analyzeLine()

in src/com/intellij/vssSupport/commands/GetProjectListener.java [106:161]


  private void analyzeLine( String line, String localProjectPath )
  {
    //  Several patterns serve as the default notifications on actions done
    //  (since we always start the command with the -I-Y or -I-N switches).
    //  Skip these lines.
    if( line.indexOf( NOT_FOUND_FOLDER_CREATE ) != -1 ||
        line.indexOf( SET_AS_DEFAULT_PROJECT ) != -1 ||
        line.indexOf( FILE_DESTROYED_PROJECT ) != -1 ||
        line.indexOf( CONTINUE_ANYWAY_SIG ) != -1 )
      return;

    //  Skip writable files which are either checked-out files and must not be
    //  changed or accidentally writable files which should be resolved later.
    if( line.indexOf( WRITABLE_COPY_PREFIX ) != -1 )
    {
      line = line.substring( WRITABLE_COPY_PREFIX.length() );
      line = line.replaceFirst( WRITABLE_COPY_SUFFIX, "" );
      filesSkipped.add( line );
    }
    else
    {
      //  File is new:
      //  - if the file or its directory is not under the project;
      //  - prefix "Getting" is present;
      //  or modified:
      //  - prefix "Replacing local copy of " is present;
      //
      //  NB: When processing "Getting" or "Replacing..." instruction, take
      //      into account different formats of ss.exe output for 6.0d and 8.0 versions:
      //   6.0d: Getting XXX.YY, where XXX.YY is a filename that must be
      //         concatenated with the local path listed above;
      //   8.0: Getting $/XXX/YYY/zzz.ttt, where $/XXX/YYY/zzz.ttt is the
      //        full path of the file in the vss repository.

      String  fullPath;
      if( line.startsWith( REPLACING_PREFIX ) )
      {
        line = line.substring( REPLACING_PREFIX.length() );
        fullPath = constructLocalPath( line, localProjectPath );
        filesChanged.add( fullPath );
      }
      else
      if( line.startsWith( GETTING_PREFIX ) )
      {
        line = line.substring( GETTING_PREFIX.length() );
        fullPath = constructLocalPath( line, localProjectPath );
        filesAdded.add( fullPath );
      }
      else
      {
        fullPath = constructLocalPath( line, localProjectPath );
        if( !VcsUtil.isFileForVcs( fullPath, project, VssVcs.getInstance(project)))
          filesAdded.add( fullPath );
      }
    }
  }