aboutsummaryrefslogtreecommitdiffstats
path: root/subversion/svn/blame-cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'subversion/svn/blame-cmd.c')
-rw-r--r--subversion/svn/blame-cmd.c42
1 files changed, 20 insertions, 22 deletions
diff --git a/subversion/svn/blame-cmd.c b/subversion/svn/blame-cmd.c
index 3911a64258f8..8f955766b7c3 100644
--- a/subversion/svn/blame-cmd.c
+++ b/subversion/svn/blame-cmd.c
@@ -44,6 +44,7 @@ typedef struct blame_baton_t
svn_stream_t *out;
svn_stringbuf_t *sbuf;
+ svn_revnum_t start_revnum, end_revnum;
int rev_maxlength;
} blame_baton_t;
@@ -54,15 +55,13 @@ typedef struct blame_baton_t
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,
svn_revnum_t merged_revision,
apr_hash_t *merged_rev_props,
const char *merged_path,
- const char *line,
+ const svn_string_t *line,
svn_boolean_t local_change,
apr_pool_t *pool)
{
@@ -170,15 +169,13 @@ print_line_info(svn_stream_t *out,
/* 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,
+ const svn_string_t *line,
svn_boolean_t local_change,
apr_pool_t *pool)
{
@@ -188,19 +185,19 @@ blame_receiver(void *baton,
svn_boolean_t use_merged = FALSE;
if (!bb->rev_maxlength)
- {
- svn_revnum_t max_revnum = MAX(start_revnum, end_revnum);
- /* The standard column width for the revision number is 6 characters.
- If the revision number can potentially be larger (i.e. if the end_revnum
- is larger than 1000000), we increase the column width as needed. */
-
- bb->rev_maxlength = 6;
- while (max_revnum >= 1000000)
- {
- bb->rev_maxlength++;
- max_revnum = max_revnum / 10;
- }
- }
+ {
+ svn_revnum_t max_revnum = MAX(bb->start_revnum, bb->end_revnum);
+ /* The standard column width for the revision number is 6 characters.
+ If the revision number can potentially be larger (i.e. if the end_revnum
+ is larger than 1000000), we increase the column width as needed. */
+
+ bb->rev_maxlength = 6;
+ while (max_revnum >= 1000000)
+ {
+ bb->rev_maxlength++;
+ max_revnum = max_revnum / 10;
+ }
+ }
if (opt_state->use_merge_history)
{
@@ -237,7 +234,7 @@ blame_receiver(void *baton,
bb->rev_maxlength,
pool));
- return svn_stream_printf(out, pool, "%s%s", line, APR_EOL_STR);
+ return svn_stream_printf(out, pool, "%s%s", line->data, APR_EOL_STR);
}
@@ -333,7 +330,7 @@ svn_cl__blame(apr_getopt_t *os,
const char *target = APR_ARRAY_IDX(targets, i, const char *);
const char *truepath;
svn_opt_revision_t peg_revision;
- svn_client_blame_receiver3_t receiver;
+ svn_client_blame_receiver4_t receiver;
svn_pool_clear(subpool);
SVN_ERR(svn_cl__check_cancel(ctx->cancel_baton));
@@ -368,7 +365,8 @@ svn_cl__blame(apr_getopt_t *os,
else
receiver = blame_receiver;
- err = svn_client_blame5(truepath,
+ err = svn_client_blame6(&bl.start_revnum, &bl.end_revnum,
+ truepath,
&peg_revision,
&opt_state->start_revision,
&opt_state->end_revision,