Index: subversion/svn/blame-cmd.c =================================================================== --- subversion/svn/blame-cmd.c (revision 955339) +++ subversion/svn/blame-cmd.c (working copy) @@ -51,6 +51,8 @@ XML to stdout. */ static svn_error_t * blame_receiver_xml(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, @@ -117,14 +119,24 @@ const char *date, const char *path, svn_boolean_t verbose, + svn_revnum_t end_revnum, apr_pool_t *pool) { const char *time_utf8; const char *time_stdout; - const char *rev_str = SVN_IS_VALID_REVNUM(revision) - ? apr_psprintf(pool, "%6ld", revision) - : " -"; + const char *rev_str; + int rev_maxlength = 0; + while (end_revnum != 0) + { + rev_maxlength++; + end_revnum = end_revnum / 10; + } + + rev_str = SVN_IS_VALID_REVNUM(revision) + ? apr_psprintf(pool, "%*ld", rev_maxlength, revision) + : apr_psprintf(pool, "%*s", rev_maxlength, "-"); + if (verbose) { if (date) @@ -162,6 +174,8 @@ /* 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, @@ -199,14 +213,16 @@ SVN_PROP_REVISION_AUTHOR), svn_prop_get_value(merged_rev_props, SVN_PROP_REVISION_DATE), - merged_path, opt_state->verbose, pool)); + 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, pool)); + NULL, opt_state->verbose, end_revnum, + pool)); return svn_stream_printf(out, pool, "%s%s", line, APR_EOL_STR); } Index: subversion/include/svn_client.h =================================================================== --- subversion/include/svn_client.h (revision 955339) +++ subversion/include/svn_client.h (working copy) @@ -681,7 +681,12 @@ * which has the revision properties @a rev_props, and that the contents were * @a line. * - * If svn_client_blame4() was called with @a include_merged_revisions set to + * @a start_revnum and @a end_revnum contain the start and end revision + * number of the entire blame operation, as determined from the repository + * inside svn_client_blame5(). This can be useful for the blame receiver + * to format the blame output. + * + * If svn_client_blame5() was called with @a include_merged_revisions set to * TRUE, @a merged_revision, @a merged_rev_props and @a merged_path will be * set, otherwise they will be NULL. @a merged_path will be set to the * absolute repository path. @@ -697,6 +702,8 @@ */ typedef svn_error_t *(*svn_client_blame_receiver3_t)( 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, Index: subversion/libsvn_client/deprecated.c =================================================================== --- subversion/libsvn_client/deprecated.c (revision 955339) +++ subversion/libsvn_client/deprecated.c (working copy) @@ -119,6 +119,8 @@ static svn_error_t * blame_wrapper_receiver2(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, Index: subversion/libsvn_client/blame.c =================================================================== --- subversion/libsvn_client/blame.c (revision 955339) +++ subversion/libsvn_client/blame.c (working copy) @@ -787,13 +787,16 @@ if (!eof || sb->len) { if (walk->rev) - SVN_ERR(receiver(receiver_baton, line_no, walk->rev->revision, + SVN_ERR(receiver(receiver_baton, start_revnum, end_revnum, + line_no, walk->rev->revision, walk->rev->rev_props, merged_rev, merged_rev_props, merged_path, sb->data, FALSE, iterpool)); else - SVN_ERR(receiver(receiver_baton, line_no, SVN_INVALID_REVNUM, - NULL, SVN_INVALID_REVNUM, NULL, NULL, + SVN_ERR(receiver(receiver_baton, start_revnum, end_revnum, + line_no, SVN_INVALID_REVNUM, + NULL, SVN_INVALID_REVNUM, + NULL, NULL, sb->data, TRUE, iterpool)); } if (eof) break;