FreeBSD/contrib/subversion/subversion/libsvn_client/blame.c
/* Add the blame for the diffs between LAST_FILE and CUR_FILE to CHAIN,
   for revision REV.  LAST_FILE may be NULL in which
   case blame is added for every line of CUR_FILE. */
Add the blame for the diffs between LAST_FILE and CUR_FILE to CHAIN,
for revision REV.  LAST_FILE may be NULL in which
case blame is added for every line of CUR_FILE.
Add the blame for the diffs between LAST_FILE and CUR_FILE to CHAIN for revision REV . LAST_FILE may be NULL in which case blame is added for every line of CUR_FILE .
static svn_error_t *
add_file_blame(const char *last_file,
               const char *cur_file,
               struct blame_chain *chain,
               struct rev *rev,
               const svn_diff_file_options_t *diff_options,
               svn_cancel_func_t cancel_func,
               void *cancel_baton,
               apr_pool_t *pool)
{
  if (!last_file)
    {
      SVN_ERR_ASSERT(chain->blame == NULL);
      chain->blame = blame_create(chain, rev, 0);
    }
  else
    {
      svn_diff_t *diff;
      struct diff_baton diff_baton;
      diff_baton.chain = chain;
      diff_baton.rev = rev;
      SVN_ERR(svn_diff_file_diff_2(&diff, last_file, cur_file,
                                   diff_options, pool));
      SVN_ERR(svn_diff_output2(diff, &diff_baton, &output_fns,
                               cancel_func, cancel_baton));
    }
  return SVN_NO_ERROR;
}
static svn_error_t * add_file_blame ( const char * last_file , const char * cur_file , struct blame_chain * chain , struct rev * rev , const svn_diff_file_options_t * diff_options , svn_cancel_func_t cancel_func , void * cancel_baton , apr_pool_t * pool ) { if ( ! last_file ) { SVN_ERR_ASSERT ( chain -> blame == NULL ) ; chain -> blame = blame_create ( chain , rev , 0 ) ; } else { svn_diff_t * diff ; struct diff_baton diff_baton ; diff_baton . chain = chain ; diff_baton . rev = rev ; SVN_ERR ( svn_diff_file_diff_2 ( & diff , last_file , cur_file , diff_options , pool ) ) ; SVN_ERR ( svn_diff_output2 ( diff , & diff_baton , & output_fns , cancel_func , cancel_baton ) ) ; } return SVN_NO_ERROR ; }
Add the blame for the diffs between LAST_FILE and CUR_FILE to CHAIN,
for revision REV.
Add the blame for the diffs between LAST_FILE and CUR_FILE to CHAIN for revision REV .
/* We have a previous file.  Get the diff and adjust blame info. */