/* This implements the svn_client_blame_receiver3_t interface. */ static svn_error_t * blame_receiver(void *baton, svn_revnum_t start_revnum, svn_revnum_t end_revnum, apr_int64_t line_no, svn_revnum_t revision, apr_hash_t *rev_props, svn_revnum_t merged_revision, apr_hash_t *merged_rev_props, const char *merged_path, const char *line, svn_boolean_t local_change, apr_pool_t *pool) { svn_cl__opt_state_t *opt_state = ((blame_baton_t *) baton)->opt_state; svn_stream_t *out = ((blame_baton_t *)baton)->out; svn_boolean_t use_merged = FALSE; if (opt_state->use_merge_history) { /* Choose which revision to use. If they aren't equal, prefer the earliest revision. Since we do a forward blame, we want to the first revision which put the line in its current state, so we use the earliest revision. If we ever switch to a backward blame algorithm, we may need to adjust this. */ if (merged_revision < revision) { SVN_ERR(svn_stream_printf(out, pool, "G ")); use_merged = TRUE; } else SVN_ERR(svn_stream_printf(out, pool, " ")); } if (use_merged) SVN_ERR(print_line_info(out, merged_revision, svn_prop_get_value(merged_rev_props, SVN_PROP_REVISION_AUTHOR), svn_prop_get_value(merged_rev_props, SVN_PROP_REVISION_DATE), merged_path, opt_state->verbose, end_revnum, pool)); else SVN_ERR(print_line_info(out, revision, svn_prop_get_value(rev_props, SVN_PROP_REVISION_AUTHOR), svn_prop_get_value(rev_props, SVN_PROP_REVISION_DATE), NULL, opt_state->verbose, end_revnum, pool)); return svn_stream_printf(out, pool, "%s%s", line, APR_EOL_STR); }
int history_flag_none(t_data *data, char **scmd, t_cmd *cmd) { t_history *tmp_deb; int flag_time; int i; int arg; if ((arg = get_history_flag_none_arg(scmd, cmd)) == -2) return (1); i = 1; if (arg == -1) tmp_deb = history_flag_none_no_nb(data->history, &i); else tmp_deb = history_flag_none_with_nb(data->history, &i, arg); flag_time = get_history_flag_time(data); while (tmp_deb) { print_line_info(tmp_deb, i, flag_time, cmd); i++; tmp_deb = tmp_deb->next; } return (0); }