FreeBSD/contrib/subversion/subversion/libsvn_client/blame.c
/* Record the blame information for the revision in BATON->file_rev_baton.
 */
Record the blame information for the revision in BATON->file_rev_baton.
Record the blame information for the revision in BATON - > file_rev_baton .
static svn_error_t *
update_blame(void *baton)
{
  struct delta_baton *dbaton = baton;
  struct file_rev_baton *frb = dbaton->file_rev_baton;
  struct blame_chain *chain;
  if (dbaton->source_stream)
    SVN_ERR(svn_stream_close(dbaton->source_stream));
  if (frb->include_merged_revisions)
    chain = frb->merged_chain;
  else
    chain = frb->chain;
  SVN_ERR(add_file_blame(frb->last_filename,
                         dbaton->filename, chain, dbaton->rev,
                         frb->diff_options,
                         frb->ctx->cancel_func, frb->ctx->cancel_baton,
                         frb->currpool));
  if (frb->include_merged_revisions && ! dbaton->is_merged_revision)
    {
      apr_pool_t *tmppool;
      SVN_ERR(add_file_blame(frb->last_original_filename,
                             dbaton->filename, frb->chain, dbaton->rev,
                             frb->diff_options,
                             frb->ctx->cancel_func, frb->ctx->cancel_baton,
                             frb->currpool));
      svn_pool_clear(frb->prevfilepool);
      tmppool = frb->filepool;
      frb->filepool = frb->prevfilepool;
      frb->prevfilepool = tmppool;
      frb->last_original_filename = apr_pstrdup(frb->filepool,
                                                dbaton->filename);
    }
  frb->last_filename = dbaton->filename;
  {
    apr_pool_t *tmp_pool = frb->lastpool;
    frb->lastpool = frb->currpool;
    frb->currpool = tmp_pool;
  }
  return SVN_NO_ERROR;
}
static svn_error_t * update_blame ( void * baton ) { struct delta_baton * dbaton = baton ; struct file_rev_baton * frb = dbaton -> file_rev_baton ; struct blame_chain * chain ; if ( dbaton -> source_stream ) SVN_ERR ( svn_stream_close ( dbaton -> source_stream ) ) ; if ( frb -> include_merged_revisions ) chain = frb -> merged_chain ; else chain = frb -> chain ; SVN_ERR ( add_file_blame ( frb -> last_filename , dbaton -> filename , chain , dbaton -> rev , frb -> diff_options , frb -> ctx -> cancel_func , frb -> ctx -> cancel_baton , frb -> currpool ) ) ; if ( frb -> include_merged_revisions && ! dbaton -> is_merged_revision ) { apr_pool_t * tmppool ; SVN_ERR ( add_file_blame ( frb -> last_original_filename , dbaton -> filename , frb -> chain , dbaton -> rev , frb -> diff_options , frb -> ctx -> cancel_func , frb -> ctx -> cancel_baton , frb -> currpool ) ) ; svn_pool_clear ( frb -> prevfilepool ) ; tmppool = frb -> filepool ; frb -> filepool = frb -> prevfilepool ; frb -> prevfilepool = tmppool ; frb -> last_original_filename = apr_pstrdup ( frb -> filepool , dbaton -> filename ) ; } frb -> last_filename = dbaton -> filename ; { apr_pool_t * tmp_pool = frb -> lastpool ; frb -> lastpool = frb -> currpool ; frb -> currpool = tmp_pool ; } return SVN_NO_ERROR ; }
Record the blame information for the revision in BATON->file_rev_baton.
Record the blame information for the revision in BATON - > file_rev_baton .
/* Close the source file used for the delta.
     It is important to do this early, since otherwise, they will be deleted
     before all handles are closed, which leads to failures on some platforms
     when new tempfiles are to be created. */ /* If we are including merged revisions, we need to add each rev to the
     merged chain. */ /* Process this file. */ /* If we are including merged revisions, and the current revision is not a
     merged one, we need to add its blame info to the chain for the original
     line of history. */ /* This filename could be around for a while, potentially, so
         use the longer lifetime pool, and switch it with the previous one*/ /* Prepare for next revision. */ /* Remember the file name so we can diff it with the next revision. */ /* Switch pools. */