public VcsHistorySession createSessionFor()

in src/com/intellij/vssSupport/VssFileHistoryProvider.java [117:150]


  public VcsHistorySession createSessionFor( FilePath filePath ) throws VcsException
  {
    List<VcsException> errors = new ArrayList<>();
    try
    {
      //  Take care of renamed files - refer to the original file name in
      //  the repository.
      VssVcs host = VssVcs.getInstance( project );
      String path = filePath.getPath();
      if( host.renamedFiles.containsKey( path ))
        path = host.renamedFiles.get( path );

      HistoryCommand cmd = new HistoryCommand( project, path, errors );
      cmd.execute();

      if( errors.size() > 0 )
        throw errors.get( 0 );

      ArrayList<HistoryParser.SubmissionData> changes = cmd.changes;
      ArrayList<VcsFileRevision> revisions = new ArrayList<>();
      for( HistoryParser.SubmissionData change : changes )
      {
        VcsFileRevision rev = new VssFileRevision( change, filePath );
        revisions.add( rev );
      }

      return new VssHistorySession( revisions );
    }
    catch( Throwable e )
    {
      //  This is one of the potential problems. And most common.
      throw new VcsException( VssBundle.message("message.file.deleted.or.not.in.repository") );
    }
  }