Fix "svn diff --summarize" to stop printing the path twice. (It was printing e.g. "path/to/file/path/to/file".) ### This also makes it omit the prefix of URLs, which is not good. ### Normal diff does its prefix stuff differently: optional relative_to_dir ### parameter can be used to suppress a leading path part, but otherwise ### it already gives a relative path or absolute URL, just as invoked. ### Can summarize do the same? * subversion/svn/diff-cmd.c (summarize_xml, summarize_regular): Stop appending the path passed in via the baton. Document that the baton is no longer used. (svn_cl__diff): Stop passing a path for the baton argument of the two summarize functions. (This also clears a "casting away 'const' warning.) Index: subversion/svn/diff-cmd.c =================================================================== --- subversion/svn/diff-cmd.c (revision 33600) +++ subversion/svn/diff-cmd.c (working copy) @@ -71,24 +71,16 @@ } } -/* Print summary information about a given change as XML, implements the - * svn_client_diff_summarize_func_t interface. The @a baton is a 'char *' - * representing the either the path to the working copy root or the url - * the path the working copy root corresponds to. */ +/* Print summary information about a given change as XML. Implements the + * svn_client_diff_summarize_func_t interface. BATON is not used. */ static svn_error_t * summarize_xml(const svn_client_diff_summarize_t *summary, - void *baton, - apr_pool_t *pool) + void *baton, + apr_pool_t *pool) { - /* Full path to the object being diffed. This is created by taking the - * baton, and appending the target's relative path. */ - const char *path = baton; + const char *path = summary->path; svn_stringbuf_t *sb = svn_stringbuf_create("", pool); - /* Tack on the target path, so we can differentiate between different parts - * of the output when we're given multiple targets. */ - path = svn_path_join(path, summary->path, pool); - /* Convert non-urls to local style, so that things like "" show up as "." */ if (! svn_path_is_url(path)) path = svn_path_local_style(path, pool); @@ -105,18 +97,14 @@ return svn_cl__error_checked_fputs(sb->data, stdout); } -/* Print summary information about a given change, implements the - * svn_client_diff_summarize_func_t interface. */ +/* Print summary information about a given change. Implements the + * svn_client_diff_summarize_func_t interface. BATON is not used. */ static svn_error_t * summarize_regular(const svn_client_diff_summarize_t *summary, - void *baton, - apr_pool_t *pool) + void *baton, + apr_pool_t *pool) { - const char *path = baton; - - /* Tack on the target path, so we can differentiate between different parts - * of the output when we're given multiple targets. */ - path = svn_path_join(path, summary->path, pool); + const char *path = summary->path; /* Convert non-urls to local style, so that things like "" show up as "." */ if (! svn_path_is_url(path)) @@ -323,8 +311,7 @@ opt_state->depth, opt_state->notice_ancestry ? FALSE : TRUE, opt_state->changelists, - summarize_func, - (void *) target1, + summarize_func, NULL, ctx, iterpool)); else SVN_ERR(svn_client_diff4 @@ -367,8 +354,7 @@ opt_state->depth, opt_state->notice_ancestry ? FALSE : TRUE, opt_state->changelists, - summarize_func, - (void *) truepath, + summarize_func, NULL, ctx, iterpool)); else SVN_ERR(svn_client_diff_peg4