You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Neels J Hofmeyr <ne...@elego.de> on 2011/08/21 03:17:56 UTC
Re: svn commit: r1159880 - in /subversion/trunk/subversion/libsvn_client:
client.h diff.c merge.c repos_diff.c repos_diff_summarize.c
Julian!
Great stuff! :D
Well, I haven't looked at the patch in great detail, but the summary reads
like honey and cream. Ever since I waded through the diff code years ago
this task has been on my, er, long-term to-do list... Thanks! :)
Oh but it's not done yet, of course. The "Later we can drive...", does that
mean you'll continue to work on it in the coming weeks? Or are you off to
other tasks and it's going to be *a lot* later if it depended on you?
~Neels
On 08/20/2011 03:56 PM, julianfoad@apache.org wrote:
> Author: julianfoad
> Date: Sat Aug 20 13:56:52 2011
> New Revision: 1159880
>
> URL: http://svn.apache.org/viewvc?rev=1159880&view=rev
> Log:
> Change the implementation of 'svn diff --summarize' to use the standard
> 'diff callbacks' mechanism, so that it may be more easily extended. The
> summary mode currently supports only repos-repos diffs, and it was reporting
> the summary results directly from a delta editor drive. Instead, write a
> set of diff callbacks that produce summary information, and drive them via
> the existing svn_client__get_diff_editor() for a repos-repos diff. Later we
> can drive the same diff callbacks from WC-WC and WC-repos diff sources.
...
Re: diff copyfrom, and other inconsistencies [was: Re: diff
--summarize]
Posted by Stefan Sperling <st...@elego.de>.
On Tue, Aug 23, 2011 at 09:10:44PM +0200, Bert Huijben wrote:
> The problem is: You never know if the copy was done within that range.
> Assuming N < M
>
> You can get the information that the file was copied *from* N-1000, while
> that copy was performed in N-500.
> For diff you want to know when the copy occurred before you can use the
> information on what it was copied from.
Ah, right. Thanks!
What we really need here is copy-to info, not copy-from.
I remember now a discussion about this we had on IRC several months
back.
RE: diff copyfrom, and other inconsistencies [was: Re: diff --summarize]
Posted by Bert Huijben <be...@qqmail.nl>.
> -----Original Message-----
> From: Stefan Sperling [mailto:stsp@elego.de]
> Sent: dinsdag 23 augustus 2011 20:51
> To: Bert Huijben
> Cc: 'Julian Foad'; 'Neels J Hofmeyr'; 'Subversion Development'
> Subject: Re: diff copyfrom, and other inconsistencies [was: Re: diff --
> summarize]
>
> On Tue, Aug 23, 2011 at 07:01:18PM +0200, Bert Huijben wrote:
> > Note that one of the reasons we abandoned this approach here and in the
> > update editor was that there was no way to know when the revision was
> > copied.
>
> What do you mean, abandoned it "here"?
> AFAIK diff never used this.
>
> > E.g. there might be 100 new file revisions at the new path, after the
copy
> > was performed and you would still get it reported as a copy via the
editor
> > callback. We just send the previous path for additions.
>
> Why is this a problem for diff?
> If the copy happened anywhere within the diffed revision range -rN:M,
> I want to see the copy event. Even if there are subsequent edits on
> the copy destination path within the same revision range.
The problem is: You never know if the copy was done within that range.
Assuming N < M
You can get the information that the file was copied *from* N-1000, while
that copy was performed in N-500.
You really get where the file was copied *from*; not in which revision the
copy was performed. So if it is a copy from ^/iota@r1 you get that
information when you perform a 'svn diff ^/something -r 10000000:20000000'
(or you get nothing if the server can somehow find that the information is
too unrelated).
For diff you want to know when the copy occurred before you can use the
information on what it was copied from.
The only information copyfrom_rev gives you that it was copied sometime
after that revision and that instead of a delta against the empty stream you
receive a delta against that specific node at the copyfrom revision.
>
> > (The update editor approach also had different problems though)
> >
> > Making this more reliable requires editor changes or further requests to
> the
> > repository to validate the result.
>
> Which kind of reliability enhancements are you referring to?
For the update editor we interpreted the copyfrom revision as a revision in
a range where one of the values wasn't properly defined. (See some issues in
our issuetracker on how this could break your working copy)
Bert
Re: diff copyfrom, and other inconsistencies [was: Re: diff
--summarize]
Posted by Stefan Sperling <st...@elego.de>.
On Tue, Aug 23, 2011 at 07:01:18PM +0200, Bert Huijben wrote:
> Note that one of the reasons we abandoned this approach here and in the
> update editor was that there was no way to know when the revision was
> copied.
What do you mean, abandoned it "here"?
AFAIK diff never used this.
> E.g. there might be 100 new file revisions at the new path, after the copy
> was performed and you would still get it reported as a copy via the editor
> callback. We just send the previous path for additions.
Why is this a problem for diff?
If the copy happened anywhere within the diffed revision range -rN:M,
I want to see the copy event. Even if there are subsequent edits on
the copy destination path within the same revision range.
> (The update editor approach also had different problems though)
>
> Making this more reliable requires editor changes or further requests to the
> repository to validate the result.
Which kind of reliability enhancements are you referring to?
RE: diff copyfrom, and other inconsistencies [was: Re: diff --summarize]
Posted by Bert Huijben <be...@qqmail.nl>.
> -----Original Message-----
> From: Stefan Sperling [mailto:stsp@elego.de]
> Sent: dinsdag 23 augustus 2011 18:51
> To: Julian Foad
> Cc: Neels J Hofmeyr; Subversion Development
> Subject: diff copyfrom, and other inconsistencies [was: Re: diff
--summarize]
>
> On Mon, Aug 22, 2011 at 12:42:55PM +0100, Julian Foad wrote:
> > I'm noticing all sorts of nasty inconsistencies in diffs. For instance,
> > manual testing reveals that in svn_client_diff5(), show_copies_as_adds
> > is ignored for a repos-repos diff. Instead, a file is diffed against its
> > copyfrom source iff the file is the diff target and not if some parent
> > directory is the diff target. For a repos-WC diff, this is ignored if
> > the file is the diff target. Ugh. Later.
>
> This reminded me of a patch I have lying around.
>
> It aims at making 'svn diff' display correct copyfrom paths,
> which is especially important for the new --git style diffs
> which can display copies as first-class operations.
> Right now, the copyfrom revision shown in diff output is often incorrect.
>
> The patch reuses the send-copyfrom-args feature the client can use to
> request copyfrom information from the server. This was originally added
> for updates but was removed from the client side in 1.7 and later.
>
> The patch is not yet finished because it breaks merge tests.
> I haven't looked at the merge test failures in detail yet.
>
> The protocol changes for HTTP are also incomplete.
Note that one of the reasons we abandoned this approach here and in the
update editor was that there was no way to know when the revision was
copied.
E.g. there might be 100 new file revisions at the new path, after the copy
was performed and you would still get it reported as a copy via the editor
callback. We just send the previous path for additions.
(The update editor approach also had different problems though)
Making this more reliable requires editor changes or further requests to the
repository to validate the result.
Bert
diff copyfrom, and other inconsistencies [was: Re: diff --summarize]
Posted by Stefan Sperling <st...@elego.de>.
On Mon, Aug 22, 2011 at 12:42:55PM +0100, Julian Foad wrote:
> I'm noticing all sorts of nasty inconsistencies in diffs. For instance,
> manual testing reveals that in svn_client_diff5(), show_copies_as_adds
> is ignored for a repos-repos diff. Instead, a file is diffed against its
> copyfrom source iff the file is the diff target and not if some parent
> directory is the diff target. For a repos-WC diff, this is ignored if
> the file is the diff target. Ugh. Later.
This reminded me of a patch I have lying around.
It aims at making 'svn diff' display correct copyfrom paths,
which is especially important for the new --git style diffs
which can display copies as first-class operations.
Right now, the copyfrom revision shown in diff output is often incorrect.
The patch reuses the send-copyfrom-args feature the client can use to
request copyfrom information from the server. This was originally added
for updates but was removed from the client side in 1.7 and later.
The patch is not yet finished because it breaks merge tests.
I haven't looked at the merge test failures in detail yet.
The protocol changes for HTTP are also incomplete.
I'm mainly putting this here in case somebody looking at improving
diff is interested and/or wants to comment on the approach.
In any case, I agree that diff needs work in some areas.
Another bad spot is documented here:
http://subversion.tigris.org/issues/show_bug.cgi?id=2873
Index: subversion/libsvn_ra_local/ra_plugin.c
===================================================================
--- subversion/libsvn_ra_local/ra_plugin.c (revision 1156687)
+++ subversion/libsvn_ra_local/ra_plugin.c (working copy)
@@ -844,7 +844,7 @@ svn_ra_local__do_diff(svn_ra_session_t *session,
switch_url,
text_deltas,
depth,
- FALSE,
+ TRUE,
ignore_ancestry,
update_editor,
update_baton,
Index: subversion/libsvn_ra_svn/client.c
===================================================================
--- subversion/libsvn_ra_svn/client.c (revision 1156687)
+++ subversion/libsvn_ra_svn/client.c (working copy)
@@ -1327,10 +1327,11 @@ static svn_error_t *ra_svn_diff(svn_ra_session_t *
svn_boolean_t recurse = DEPTH_TO_RECURSE(depth);
/* Tell the server we want to start a diff. */
- SVN_ERR(svn_ra_svn_write_cmd(conn, pool, "diff", "(?r)cbbcbw", rev,
+ SVN_ERR(svn_ra_svn_write_cmd(conn, pool, "diff", "(?r)cbbcbwb", rev,
target, recurse, ignore_ancestry,
versus_url, text_deltas,
- svn_depth_to_word(depth)));
+ svn_depth_to_word(depth),
+ TRUE /* send_copyfrom_args */));
SVN_ERR(handle_auth_request(sess_baton, pool));
/* Fetch a reporter for the caller to drive. The reporter will drive
Index: subversion/libsvn_ra_svn/protocol
===================================================================
--- subversion/libsvn_ra_svn/protocol (revision 1156687)
+++ subversion/libsvn_ra_svn/protocol (working copy)
@@ -364,7 +364,8 @@ second place for auth-request point as noted below
diff
params: ( [ rev:number ] target:string recurse:bool ignore-ancestry:bool
- url:string ? text-deltas:bool ? depth:word )
+ url:string ? text-deltas:bool ? depth:word
+ ? send_copyfrom_param:bool )
Client switches to report command set.
Upon finish-report, server sends auth-request.
After auth exchange completes, server switches to editor command set.
Index: subversion/libsvn_ra_neon/fetch.c
===================================================================
--- subversion/libsvn_ra_neon/fetch.c (revision 1156687)
+++ subversion/libsvn_ra_neon/fetch.c (working copy)
@@ -2798,7 +2798,7 @@ svn_error_t * svn_ra_neon__do_diff(svn_ra_session_
diff_target,
versus_url,
depth,
- FALSE,
+ TRUE,
ignore_ancestry,
FALSE,
wc_diff,
Index: subversion/libsvn_client/repos_diff.c
===================================================================
--- subversion/libsvn_client/repos_diff.c (revision 1156687)
+++ subversion/libsvn_client/repos_diff.c (working copy)
@@ -209,6 +209,10 @@ struct file_baton {
/* A cache of any property changes (svn_prop_t) received for this file. */
apr_array_header_t *propchanges;
+ /* Copyfrom information for copied files. */
+ const char *copyfrom_path;
+ svn_revnum_t copyfrom_revision;
+
/* The pool passed in by add_file or open_file.
Also, the pool this file_baton is allocated in. */
apr_pool_t *pool;
@@ -253,6 +257,8 @@ make_dir_baton(const char *path,
static struct file_baton *
make_file_baton(const char *path,
svn_boolean_t added,
+ const char *copyfrom_path,
+ svn_revnum_t copyfrom_revision,
struct edit_baton *edit_baton,
apr_pool_t *pool)
{
@@ -268,6 +274,8 @@ make_file_baton(const char *path,
file_baton->wcpath = svn_dirent_join(edit_baton->target, path, file_pool);
file_baton->propchanges = apr_array_make(pool, 1, sizeof(svn_prop_t));
file_baton->base_revision = edit_baton->revision;
+ file_baton->copyfrom_path = copyfrom_path;
+ file_baton->copyfrom_revision = copyfrom_revision;
return file_baton;
}
@@ -536,7 +544,8 @@ diff_deleted_dir(const char *dir,
const char *mimetype1, *mimetype2;
/* Compare a file being deleted against an empty file */
- b = make_file_baton(path, FALSE, eb, iterpool);
+ b = make_file_baton(path, FALSE, NULL, SVN_INVALID_REVNUM,
+ eb, iterpool);
SVN_ERR(get_file_from_ra(b, FALSE, iterpool));
SVN_ERR(get_empty_file(b->edit_baton, &(b->path_end_revision)));
@@ -601,7 +610,8 @@ delete_entry(const char *path,
struct file_baton *b;
/* Compare a file being deleted against an empty file */
- b = make_file_baton(path, FALSE, eb, scratch_pool);
+ b = make_file_baton(path, FALSE, NULL, SVN_INVALID_REVNUM,
+ eb, scratch_pool);
SVN_ERR(get_file_from_ra(b, FALSE, scratch_pool));
SVN_ERR(get_empty_file(b->edit_baton, &(b->path_end_revision)));
@@ -804,9 +814,8 @@ add_file(const char *path,
struct dir_baton *pb = parent_baton;
struct file_baton *b;
- /* ### TODO: support copyfrom? */
-
- b = make_file_baton(path, TRUE, pb->edit_baton, pool);
+ b = make_file_baton(path, TRUE, copyfrom_path, copyfrom_revision,
+ pb->edit_baton, pool);
*file_baton = b;
/* Skip *everything* within a newly tree-conflicted directory.
@@ -833,7 +842,8 @@ open_file(const char *path,
struct dir_baton *pb = parent_baton;
struct file_baton *b;
struct edit_baton *eb = pb->edit_baton;
- b = make_file_baton(path, FALSE, pb->edit_baton, pool);
+ b = make_file_baton(path, FALSE, NULL, SVN_INVALID_REVNUM,
+ pb->edit_baton, pool);
*file_baton = b;
/* Skip *everything* within a newly tree-conflicted directory
@@ -997,26 +1007,75 @@ close_file(void *file_baton,
remove_non_prop_changes(b->pristine_props, b->propchanges);
}
- if (b->path_end_revision || b->propchanges->nelts > 0)
+ if (b->path_end_revision || b->propchanges->nelts > 0 || b->copyfrom_path)
{
const char *mimetype1, *mimetype2;
get_file_mime_types(&mimetype1, &mimetype2, b);
+ if (b->added)
+ {
+ if (b->copyfrom_path && !b->path_end_revision)
+ {
+ svn_stream_t *stream;
+ svn_error_t *err;
- if (b->added)
- SVN_ERR(eb->diff_callbacks->file_added(
- &content_state, &prop_state, &b->tree_conflicted,
- b->wcpath,
- b->path_end_revision ? b->path_start_revision : NULL,
- b->path_end_revision,
- 0,
- b->edit_baton->target_revision,
- mimetype1, mimetype2,
- NULL, SVN_INVALID_REVNUM,
- b->propchanges, b->pristine_props,
- b->edit_baton->diff_cmd_baton,
- scratch_pool));
- else
+ /* The file was copied and its content has not changed since.
+ * Compare the empty file to the copied file.
+ *
+ * ### This behaviour should really depend on the
+ * ### show_copies_as_adds flag. We should show an empty delta
+ * ### if the copy hasn't changed. But it seems that historically
+ * ### repos->repos diffs have always shown copies as adds
+ * ### in this case, so let's keep it this way. */
+ SVN_ERR(get_empty_file(b->edit_baton,
+ &(b->path_start_revision)));
+ SVN_ERR(svn_stream_open_unique(
+ &stream, &b->path_end_revision, NULL,
+ svn_io_file_del_on_pool_cleanup,
+ scratch_pool, scratch_pool));
+ err = svn_ra_get_file(eb->ra_session,
+ b->path,
+ eb->target_revision,
+ stream, NULL, NULL,
+ b->pool);
+ /* Ignore "path does not exist" errors. In some cases the file
+ * has copyfrom but does not exist in the repository (e.g. we
+ * might be merging an addition into a working copy of a branch
+ * where the file doesn't exist yet). */
+ if (err)
+ {
+ if (err->apr_err == SVN_ERR_FS_NOT_FOUND)
+ svn_error_clear(err);
+ else
+ {
+ SVN_ERR(svn_stream_close(stream));
+ return svn_error_trace(err);
+ }
+ }
+ else
+ {
+ /* Show all props as newly added, too. */
+ b->pristine_props = apr_hash_make(b->pool);
+ }
+
+ SVN_ERR(svn_stream_close(stream));
+ }
+
+ if (b->path_end_revision || b->propchanges->nelts > 0)
+ SVN_ERR(eb->diff_callbacks->file_added(
+ &content_state, &prop_state, &b->tree_conflicted,
+ b->wcpath,
+ b->path_end_revision ? b->path_start_revision : NULL,
+ b->path_end_revision,
+ 0,
+ b->edit_baton->target_revision,
+ mimetype1, mimetype2,
+ b->copyfrom_path, b->copyfrom_revision,
+ b->propchanges, b->pristine_props,
+ b->edit_baton->diff_cmd_baton,
+ scratch_pool));
+ }
+ else if (b->path_end_revision || b->propchanges->nelts > 0)
SVN_ERR(eb->diff_callbacks->file_changed(
&content_state, &prop_state,
&b->tree_conflicted, b->wcpath,
Index: subversion/libsvn_client/diff.c
===================================================================
--- subversion/libsvn_client/diff.c (revision 1156687)
+++ subversion/libsvn_client/diff.c (working copy)
@@ -401,23 +401,20 @@ print_git_diff_header_deleted(svn_stream_t *os, co
static svn_error_t *
print_git_diff_header_copied(svn_stream_t *os, const char *header_encoding,
const char *copyfrom_path,
- svn_revnum_t copyfrom_rev,
const char *path,
apr_pool_t *result_pool)
{
SVN_ERR(svn_stream_printf_from_utf8(os, header_encoding, result_pool,
"diff --git a/%s b/%s%s",
copyfrom_path, path, APR_EOL_STR));
- if (copyfrom_rev != SVN_INVALID_REVNUM)
- SVN_ERR(svn_stream_printf_from_utf8(os, header_encoding, result_pool,
- "copy from %s@%ld%s", copyfrom_path,
- copyfrom_rev, APR_EOL_STR));
- else
- SVN_ERR(svn_stream_printf_from_utf8(os, header_encoding, result_pool,
- "copy from %s%s", copyfrom_path,
- APR_EOL_STR));
SVN_ERR(svn_stream_printf_from_utf8(os, header_encoding, result_pool,
+ "copy from %s%s", copyfrom_path,
+ APR_EOL_STR));
+ SVN_ERR(svn_stream_printf_from_utf8(os, header_encoding, result_pool,
"copy to %s%s", path, APR_EOL_STR));
+
+ /* ### need some special git-diff header for copyfrom revision */
+
return SVN_NO_ERROR;
}
@@ -436,6 +433,9 @@ print_git_diff_header_renamed(svn_stream_t *os, co
APR_EOL_STR));
SVN_ERR(svn_stream_printf_from_utf8(os, header_encoding, result_pool,
"rename to %s%s", path, APR_EOL_STR));
+
+ /* ### need some special git-diff header for copyfrom revision */
+
return SVN_NO_ERROR;
}
@@ -473,13 +473,21 @@ print_git_diff_header(svn_stream_t *os,
svn_revnum_t rev1,
svn_revnum_t rev2,
const char *copyfrom_path,
- svn_revnum_t copyfrom_rev,
+ svn_revnum_t copyfrom_revision,
const char *header_encoding,
svn_ra_session_t *ra_session,
svn_wc_context_t *wc_ctx,
const char *wc_root_abspath,
apr_pool_t *scratch_pool)
{
+ if (copyfrom_path)
+ {
+ /* Copyfrom paths are always relative to the repository root.
+ * Strip leading slashes for display. */
+ while (copyfrom_path[0] == '/')
+ copyfrom_path++;
+ }
+
if (operation == svn_diff_op_deleted)
{
SVN_ERR(print_git_diff_header_deleted(os, header_encoding,
@@ -493,11 +501,12 @@ print_git_diff_header(svn_stream_t *os,
else if (operation == svn_diff_op_copied)
{
SVN_ERR(print_git_diff_header_copied(os, header_encoding,
- copyfrom_path, copyfrom_rev,
- repos_relpath2,
+ copyfrom_path, repos_relpath2,
scratch_pool));
+ /* Put the copyfrom revision into the label. It's the only place
+ * we can put it and stay compatible with git. */
*label1 = diff_label(apr_psprintf(scratch_pool, "a/%s", copyfrom_path),
- rev1, scratch_pool);
+ copyfrom_revision, scratch_pool);
*label2 = diff_label(apr_psprintf(scratch_pool, "b/%s", repos_relpath2),
rev2, scratch_pool);
}
@@ -515,8 +524,10 @@ print_git_diff_header(svn_stream_t *os,
SVN_ERR(print_git_diff_header_modified(os, header_encoding,
repos_relpath1, repos_relpath2,
scratch_pool));
+ /* Put the copyfrom revision into the label. It's the only place
+ * we can put it and stay compatible with git. */
*label1 = diff_label(apr_psprintf(scratch_pool, "a/%s", repos_relpath1),
- rev1, scratch_pool);
+ copyfrom_revision, scratch_pool);
*label2 = diff_label(apr_psprintf(scratch_pool, "b/%s", repos_relpath2),
rev2, scratch_pool);
}
@@ -910,7 +921,7 @@ diff_content_changed(const char *path,
const char *mimetype2,
svn_diff_operation_kind_t operation,
const char *copyfrom_path,
- svn_revnum_t copyfrom_rev,
+ svn_revnum_t copyfrom_revision,
void *diff_baton)
{
struct diff_cmd_baton *diff_cmd_baton = diff_baton;
@@ -1040,7 +1051,7 @@ diff_content_changed(const char *path,
SVN_ERR(print_git_diff_header(os, &label1, &label2, operation,
tmp_path1, tmp_path2, rev1, rev2,
copyfrom_path,
- copyfrom_rev,
+ copyfrom_revision,
diff_cmd_baton->header_encoding,
diff_cmd_baton->ra_session,
diff_cmd_baton->wc_ctx,
@@ -1056,6 +1067,20 @@ diff_content_changed(const char *path,
diff_cmd_baton->options.for_internal->show_c_function,
subpool));
+ if (diff_cmd_baton->use_git_diff_format &&
+ !svn_diff_contains_diffs(diff) &&
+ copyfrom_revision != SVN_INVALID_REVNUM)
+ {
+ /* Print the labels even though there is no content to diff.
+ * The labels contain the copyfrom revision.
+ * ### need some special git-diff header for this. */
+ SVN_ERR(svn_stream_printf_from_utf8(
+ os, diff_cmd_baton->header_encoding, subpool,
+ "--- %s" APR_EOL_STR
+ "+++ %s" APR_EOL_STR,
+ label1, label2));
+ }
+
/* We have a printed a diff for this path, mark it as visited. */
apr_hash_set(diff_cmd_baton->visited_paths, path,
APR_HASH_KEY_STRING, path);
@@ -1173,6 +1198,7 @@ diff_file_added(svn_wc_notify_state_t *content_sta
mimetype1, mimetype2,
svn_diff_op_added, NULL, SVN_INVALID_REVNUM,
diff_baton));
+
if (prop_changes->nelts > 0)
SVN_ERR(diff_props_changed(prop_state, tree_conflicted,
path, FALSE, prop_changes,
Index: subversion/libsvn_ra_serf/update.c
===================================================================
--- subversion/libsvn_ra_serf/update.c (revision 1156687)
+++ subversion/libsvn_ra_serf/update.c (working copy)
@@ -2722,7 +2722,7 @@ svn_ra_serf__do_diff(svn_ra_session_t *ra_session,
return make_update_reporter(ra_session, reporter, report_baton,
revision,
session->session_url.path, versus_url, diff_target,
- depth, ignore_ancestry, text_deltas, FALSE,
+ depth, ignore_ancestry, text_deltas, TRUE,
diff_editor, diff_baton, pool);
}
Index: subversion/svnserve/serve.c
===================================================================
--- subversion/svnserve/serve.c (revision 1156687)
+++ subversion/svnserve/serve.c (working copy)
@@ -1781,6 +1781,7 @@ static svn_error_t *diff(svn_ra_svn_conn_t *conn,
/* Default to unknown. Old clients won't send depth, but we'll
handle that by converting recurse if necessary. */
svn_depth_t depth = svn_depth_unknown;
+ svn_boolean_t send_copyfrom_args = FALSE;
/* Parse the arguments. */
if (params->nelts == 5)
@@ -1793,10 +1794,11 @@ static svn_error_t *diff(svn_ra_svn_conn_t *conn,
}
else
{
- SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "(?r)cbbcb?w",
+ SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "(?r)cbbcb?w?b",
&rev, &target, &recurse,
&ignore_ancestry, &versus_url,
- &text_deltas, &depth_word));
+ &text_deltas, &depth_word,
+ &send_copyfrom_args));
}
target = svn_relpath_canonicalize(target, pool);
versus_url = svn_uri_canonicalize(versus_url, pool);
@@ -1819,7 +1821,8 @@ static svn_error_t *diff(svn_ra_svn_conn_t *conn,
svn_revnum_t from_rev;
SVN_ERR(accept_report(NULL, &from_rev,
conn, pool, b, rev, target, versus_path,
- text_deltas, depth, FALSE, ignore_ancestry));
+ text_deltas, depth, send_copyfrom_args,
+ ignore_ancestry));
SVN_ERR(log_command(b, conn, pool, "%s",
svn_log__diff(full_path, from_rev, versus_path,
rev, depth, ignore_ancestry,
Re: diff --summarize [was: svn commit: r1159880 ...]
Posted by Neels J Hofmeyr <ne...@elego.de>.
On 08/22/2011 06:18 PM, Julian Foad wrote:
> I (Julian Foad) wrote:
>> Neels J Hofmeyr wrote:
>> [...]
>>> The map of diff code paths is still not entirely clear in my head (I still
>>> grep and backtrace a lot for analysis). Some ASCII art could be quite
>>> useful, also to see what parts of it affect 'merge'.
>>
>> Agreed. I'll take a shot at that.
>
> 'notes/diff-data-flows.txt' added in r1160318 is a start.
That's really cool, I finally understand it!
Thanks!
~Neels
Re: diff --summarize [was: svn commit: r1159880 ...]
Posted by Julian Foad <ju...@wandisco.com>.
I (Julian Foad) wrote:
> Neels J Hofmeyr wrote:
> [...]
> > The map of diff code paths is still not entirely clear in my head (I still
> > grep and backtrace a lot for analysis). Some ASCII art could be quite
> > useful, also to see what parts of it affect 'merge'.
>
> Agreed. I'll take a shot at that.
'notes/diff-data-flows.txt' added in r1160318 is a start.
- Julian
Re: diff --summarize [was: svn commit: r1159880 ...]
Posted by Julian Foad <ju...@wandisco.com>.
Neels J Hofmeyr wrote:
[...]
> The map of diff code paths is still not entirely clear in my head (I still
> grep and backtrace a lot for analysis). Some ASCII art could be quite
> useful, also to see what parts of it affect 'merge'.
Agreed. I'll take a shot at that.
- Julian
Re: diff --summarize [was: svn commit: r1159880 ...]
Posted by Neels J Hofmeyr <ne...@elego.de>.
On 08/22/2011 02:21 PM, Julian Foad wrote:
> Hi Neels.
>
> The new diff --summarize code presently still downloads the full text of
> each deleted file to supply to the diff callbacks. I have a patch in
> progress (attached) to eliminate this, but I shan't be working on it for
> a few days. With this patch, 'diff --summarize' still works but I
> haven't checked carefully (either by testing or analysis) that this is
> actually eliminating all the unnecessary downloads, and it could do with
> some documentation updates in the diff callbacks to say that this usage
> is allowed.
>
> Feel free to progress this if you wish, otherwise I'll get back to it
> later.
The things you write bring back memories. I too was finding inconsistencies
and cul-de-sacs in the separate diff paths, tried to analyze and found the
confusing, duplicating code paths there. Ever since, I was aware that the
diff cleanup is One Of The Great Things That Have To Be Done One Day. But I
kept pushing it down the to-do list. Right now I'm hacking on my new pet,
the svn:hold feature, so I might be tempted to push diff down the to-do list
some more...
OTOH, just yesterday I bumped the diff API to add an svn:hold related
parameter (on the 'hold' branch) and was confronted with diff code paths
again. So yeah, you'll be the first to know when I have contributions.
The map of diff code paths is still not entirely clear in my head (I still
grep and backtrace a lot for analysis). Some ASCII art could be quite
useful, also to see what parts of it affect 'merge'.
~Neels
Re: diff --summarize
Posted by Neels J Hofmeyr <ne...@elego.de>.
On 08/26/2011 05:47 PM, Julian Foad wrote:
> On Thu, 2011-08-25, I (Julian Foad) wrote:
>> I discovered today that the network traffic generated by my rewrite of
>> "diff --summarize" is ridiculously heavy - like apparently 100 times
>> what it was, in a simple real-world test. I have an obvious patch which
>> I'll apply soon which eliminates the requests for content of deleted
>> files, and that reduces it by a factor of ten
>
> Committed in r1162040.
Your diff-data-flows.txt is really nice for placing patches in the bigger
picture BTW :)
Patch makes sense to me. Unlike the rest:
> I think there's a correctness issue here, related to a quirk described
> in issue #3657 "dav update report handler in skelta mode can cause
> spurious conflicts", which is summarized in the doc string of
> repos_diff.c:remove_non_prop_changes(). Basically, sometimes the RA
> layer will send a no-op prop "change" which is not actually a change.
> If we want to know whether a reported prop "change" is actually a
> change, we have to fetch the original props and compare.
So do I get this right -- this only happens over mod_dav_svn, and basically,
in 'skelta' mode, mod_dav_svn decides not to care which props have changed,
and politely tells the client to just figure it out on its own by sending a
fetch-all-props response, as long as at least one prop has changed. That
*would* be entirely fine with us, but since sometimes this propchange is
just on an internal propkind that we don't care about, we can get a
prop-modified status that is false in our interpretation. Unless we actually
*do* download all props and compare them ourselves. The code has been fixed,
so it currently obediently downloads all props and compares them, and that's
too slow for --summarize.
Right?
That's what I thought first, but then I was reading from Paul's patch:
[[[
1) It stops mod_dav_svn from ever sending the 'fetch-props' response to a
client, even when in skelta (i.e. send-all=false) mode. The server
already knows what properties have changed so now it simply sends them,
rather than telling the client to ask for them later.
[...]
(upd_change_xxx_prop): Whether we are in send-all mode or not, we have the
property changes already so send them now, rather than telling the client
to 'fetch-props' later. The only time we don't send the props is for
additions while not in send-all mode (i.e. skelta mode) since property
fetching is implied in addition.
]]]
If I understood everything correctly, this thing, where we get a prop mod on
a non-interesting prop, can today only happen with a prop addition? Because
all other cases send all the props right away?
The more I try to converge all these details, the more I feel that I fail to
understand the status quo :)
i.e., if the server now never ever sends the fetch-props response anymore,
how can your code get 10x slower because it gets this response? (because
neon still sends it?)
/me increasingly guessing
~Neels
Re: diff --summarize
Posted by Julian Foad <ju...@wandisco.com>.
On Thu, 2011-08-25, I (Julian Foad) wrote:
> I discovered today that the network traffic generated by my rewrite of
> "diff --summarize" is ridiculously heavy - like apparently 100 times
> what it was, in a simple real-world test. I have an obvious patch which
> I'll apply soon which eliminates the requests for content of deleted
> files, and that reduces it by a factor of ten
Committed in r1162040.
> , but I haven't yet figured
> out where the other 10x is happening. I'll figure it out or else I'll
> have to revert it all, of course.
I figured out it's basically because of collecting info about prop
changes. The editor we're using now in repos_diff.c collects and
reports prop changes in full [1] through the diff callbacks. That
involves requesting the "pristine" (or "left-hand side") props, which
often requires another network round-trip. Previously, the dedicated
summarize editor just accepted any prop change reported by the
repository as being evidence enough.
The obvious fix is to make the client diff editory (repos_diff.c) not
fetch the original props when in summary mode, but that's not
necessarily the right thing to do.
I think there's a correctness issue here, related to a quirk described
in issue #3657 "dav update report handler in skelta mode can cause
spurious conflicts", which is summarized in the doc string of
repos_diff.c:remove_non_prop_changes(). Basically, sometimes the RA
layer will send a no-op prop "change" which is not actually a change.
If we want to know whether a reported prop "change" is actually a
change, we have to fetch the original props and compare.
The previous implementation of --summarize must have been reporting a
prop change if and only if the RA layer said so through the delta
editor. I think that must have been wrong. I'll try to come up with a
test case.
Note that there is also a separate complication in reporting prop
changes, which is that WC-props and entry-props also get reported but
are not relevant so we have to ignore them. That's unrelated to what
I'm talking about here.
[1] Prop changes are reported "in full" only to the extent that the RA
layer sends them. I discovered that RA-neon doesn't send the full prop
changes if it knows it's omitting text deltas. That's in
libsvn_ra_neon/fetch.c:start_element(), case ELEM_fetch_props, where
'fetch_content' is the 'text_deltas' parameter of
svn_ra_neon__do_diff().
- Julian
Re: diff --summarize
Posted by Julian Foad <ju...@wandisco.com>.
I discovered today that the network traffic generated by my rewrite of
"diff --summarize" is ridiculously heavy - like apparently 100 times
what it was, in a simple real-world test. I have an obvious patch which
I'll apply soon which eliminates the requests for content of deleted
files, and that reduces it by a factor of ten, but I haven't yet figured
out where the other 10x is happening. I'll figure it out or else I'll
have to revert it all, of course.
Neels J Hofmeyr wrote:
> On 08/24/2011 05:38 PM, Julian Foad wrote:
> > Even from a practical POV, the orthogonality is useful. I have a script
> > [...]
>
> heh yeah, you actually gave me that script back in the days, and with lesser
> tweaks, I use that code all the time to semi-auto-generate my log messages
> [...] I really like it, thank you very much indeed.
I'm very glad. I still use it all the time too.
> Oh, have you by any chance made it act super precise by now? That would be a
> treat.
In terms of "--show-c-function" correctly identifying
+/* New doc */
-/* old doc */
void foo(void);
as a change belonging to "foo"? No, haven't done that.
> But, I don't really understand, why do you want to semi-auto-generate a log
> message for already committed revisions?
I don't really want that, but there might come a time when I would want
that. I'm only fooling around with hypothetical use cases.
- Julian
Re: diff --summarize
Posted by Neels J Hofmeyr <ne...@elego.de>.
On 08/24/2011 05:38 PM, Julian Foad wrote:
> Even from a practical POV, the orthogonality is useful. I have a script
> that generates a patch file, basically by running "svn diff", but not
> quite. I want the files to appear in alphabetical order of their paths,
> and I want to output a list of their paths. So my script runs "svn
> status" to find out what paths will appear in the diff, and then runs
> "svn diff" on one at a time. If it can run "diff --summarize" instead
> of "status", then it can be trivially extended to work on repos paths,
> where at the moment it only supports WC paths.
heh yeah, you actually gave me that script back in the days, and with lesser
tweaks, I use that code all the time to semi-auto-generate my log messages
for svn patches :) It's not always precise, but it's easy to spot the errors
when reading through the diff (and the errors follow a pattern). It has
probably saved me *hours* of copy-pasting function names into log messages
by now. I really like it, thank you very much indeed.
Oh, have you by any chance made it act super precise by now? That would be a
treat.
But, I don't really understand, why do you want to semi-auto-generate a log
message for already committed revisions?
>> [[[
>> $ svn diff --summarize --old=wc/foo/ --new=wc/bar/
>> svn: E200004: Sorry, svn_client_diff5 was called in a way that is not yet
>> supported
>> svn: E200004: Only diffs between a path's text-base and its working files
>> are supported at this time
>> ]]]
>
> Yes, I want us to support that.
Ok.
~Neels
Re: diff --summarize
Posted by Julian Foad <ju...@wandisco.com>.
Neels J Hofmeyr wrote:
> I've examined your patch and did add something to wc_wc_diff_summarize,
> though it's not as plain as I first thought.
>
> I'll give you the elephant in the room first:
>
> Currently, 'svn diff --summarize <wc-path>' does *nothing else* than what a
> plain 'svn status' does. There is no way to get other wc-wc-diffs than the
> diff between BASE and WORKING/ACTUAL. So at this point in time, we could
> redirect diff_wc_wc_summarize to client_status and basically no-one would
> notice anything.
Yes, that's true: it provides little or no added value over 'status'.
It's also inconsistent with 'status' in minor ways, e.g. it prints 'A'
and 'D' for a replacement whereas 'status' prints 'R'. I noticed that,
and briefly wondered if there could be a way to combine the 'diff
--summarize' and 'status' code paths, but that's not the way to go.
The alternative and attractive option is (one day) to extend 'diff' to
be able to diff two arbitrary trees (in the repos and/or WC and/or
unversioned), and then 'diff --summarize' automatically gets that
ability too.
> This whole local --summarize only even *begins* to make sense when we can
> compare one subpath of a WC to another subpath, or even one checkout with a
> different checkout (i.e. locally compare between completely different WCs).
That stuff is lovely, I'd really like to see it. In some ways the local
summarize implementation restricted to a BASE-WORKING diff is totally
pointless because it just does what 'status' can do, but from an
architectural POV it is really important.
Even from a practical POV, the orthogonality is useful. I have a script
that generates a patch file, basically by running "svn diff", but not
quite. I want the files to appear in alphabetical order of their paths,
and I want to output a list of their paths. So my script runs "svn
status" to find out what paths will appear in the diff, and then runs
"svn diff" on one at a time. If it can run "diff --summarize" instead
of "status", then it can be trivially extended to work on repos paths,
where at the moment it only supports WC paths.
> Now back to pretending diff --summarize <wc-path> *is* in fact useful in
> itself:
>
> So I thought, during wc-wc diff, it would make sense to also have a
> text_deltas flag, so we don't need to do the keywords/nl translations. So I
> coded that. While I did, I hit this comment:
>
> /* Note that this might be the _second_ time we translate
> the file, as svn_wc__internal_file_modified_p() might have used a
> tmp translated copy too. But what the heck, diff is
> already expensive, translating twice for the sake of code
> modularity is liveable. */
>
> So there's this thing where diff translates pristine&working *anyway* to
> determine if they are different. That's just the check whether to skip the file.
>
> Then it translates them *again* to do the diff. And I think the "is it
> modified?" test uses streamy translation and the diff-producing part uses
> translation to a tempfile.
>
> So there's room for optimization there. Translate them only once, for
> comparison, if that's needed, and keep the result for producing the diff.
Ugh. Good catch. Room for improvement there, for sure.
> So all my part of the patch does is skip the second translation if
> text_deltas is false. The first translation can't generally be skipped since
> it determines the text-modified status. It has its own skip semantics.
>
> Looking at svn_wc__internal_file_modified_p()'s (the first translation's)
> heuristics to shortcut the decision whether a file was modified:
> - shortcut to "yes, modified" when
> - there is no pristine
> - the WC status gives away a modification
> - shortcut to "no, not modified" when
> - filesize and timestamp unchanged
> - else translate and compare
>
> So if it shortcuts to "yes, modified", the later diff-translation is the
> only translation. (1)
> If it shortcuts to "no, not modified", the diff-translation is always
> skipped as there is no diff.
> Else, basically if there are only text mods (which can only be verified
> after translation) there are always two translations. (2)
>
> So this patch makes local-diff translation-free in (1), and removes one of
> the two translations, i.e. removes the tempfile-based diff-producing
> translation, in (2).
>
> Considering that actually, in most default cases (with the lack of
> keywords/nl props), there is *no* translation at all and the callbacks get
> the direct pristine and working copy paths, my patch *is* a bit overkill.
>
> But when a user is coming from the other side, say if translating their
> files takes a really really long time, well, this might be a noticeable
> speedup seen on --summarize. Same of which is obtained by running 'status'.
>
> ...If I haven't confused you too much by now, do you think it's worth
> touching wc_wc diff like my patch does?
OK, I think this optimization is certainly worth considering. I haven't
looked at your patch for it yet.
> If you said yes, you do probably also think that we shall support diffing
> separate wc-paths at some point?
>
> [[[
> $ svn diff --summarize --old=wc/foo/ --new=wc/bar/
> svn: E200004: Sorry, svn_client_diff5 was called in a way that is not yet
> supported
> svn: E200004: Only diffs between a path's text-base and its working files
> are supported at this time
> ]]]
Yes, I want us to support that.
> (The attached file is your patch and my questionable one combined. And I did
> add two printf()s next to DBG()s to show the file_mod paths (whether and how
> they're empty), sorry about that)
I'll take a look.
- Julian
> On 08/22/2011 02:21 PM, Julian Foad wrote:
> > Hi Neels.
> >
> > The new diff --summarize code presently still downloads the full text of
> > each deleted file to supply to the diff callbacks. I have a patch in
> > progress (attached) to eliminate this, but I shan't be working on it for
> > a few days. With this patch, 'diff --summarize' still works but I
> > haven't checked carefully (either by testing or analysis) that this is
> > actually eliminating all the unnecessary downloads, and it could do with
> > some documentation updates in the diff callbacks to say that this usage
> > is allowed.
> >
> > Feel free to progress this if you wish, otherwise I'll get back to it
> > later.
> >
> > - Julian
> >
Re: diff --summarize
Posted by Neels J Hofmeyr <ne...@elego.de>.
Hi Julian,
I've examined your patch and did add something to wc_wc_diff_summarize,
though it's not as plain as I first thought.
I'll give you the elephant in the room first:
Currently, 'svn diff --summarize <wc-path>' does *nothing else* than what a
plain 'svn status' does. There is no way to get other wc-wc-diffs than the
diff between BASE and WORKING/ACTUAL. So at this point in time, we could
redirect diff_wc_wc_summarize to client_status and basically no-one would
notice anything.
This whole local --summarize only even *begins* to make sense when we can
compare one subpath of a WC to another subpath, or even one checkout with a
different checkout (i.e. locally compare between completely different WCs).
Now back to pretending diff --summarize <wc-path> *is* in fact useful in
itself:
So I thought, during wc-wc diff, it would make sense to also have a
text_deltas flag, so we don't need to do the keywords/nl translations. So I
coded that. While I did, I hit this comment:
/* Note that this might be the _second_ time we translate
the file, as svn_wc__internal_file_modified_p() might have used a
tmp translated copy too. But what the heck, diff is
already expensive, translating twice for the sake of code
modularity is liveable. */
So there's this thing where diff translates pristine&working *anyway* to
determine if they are different. That's just the check whether to skip the file.
Then it translates them *again* to do the diff. And I think the "is it
modified?" test uses streamy translation and the diff-producing part uses
translation to a tempfile.
So there's room for optimization there. Translate them only once, for
comparison, if that's needed, and keep the result for producing the diff.
So all my part of the patch does is skip the second translation if
text_deltas is false. The first translation can't generally be skipped since
it determines the text-modified status. It has its own skip semantics.
Looking at svn_wc__internal_file_modified_p()'s (the first translation's)
heuristics to shortcut the decision whether a file was modified:
- shortcut to "yes, modified" when
- there is no pristine
- the WC status gives away a modification
- shortcut to "no, not modified" when
- filesize and timestamp unchanged
- else translate and compare
So if it shortcuts to "yes, modified", the later diff-translation is the
only translation. (1)
If it shortcuts to "no, not modified", the diff-translation is always
skipped as there is no diff.
Else, basically if there are only text mods (which can only be verified
after translation) there are always two translations. (2)
So this patch makes local-diff translation-free in (1), and removes one of
the two translations, i.e. removes the tempfile-based diff-producing
translation, in (2).
Considering that actually, in most default cases (with the lack of
keywords/nl props), there is *no* translation at all and the callbacks get
the direct pristine and working copy paths, my patch *is* a bit overkill.
But when a user is coming from the other side, say if translating their
files takes a really really long time, well, this might be a noticeable
speedup seen on --summarize. Same of which is obtained by running 'status'.
...If I haven't confused you too much by now, do you think it's worth
touching wc_wc diff like my patch does?
If you said yes, you do probably also think that we shall support diffing
separate wc-paths at some point?
[[[
$ svn diff --summarize --old=wc/foo/ --new=wc/bar/
svn: E200004: Sorry, svn_client_diff5 was called in a way that is not yet
supported
svn: E200004: Only diffs between a path's text-base and its working files
are supported at this time
]]]
(The attached file is your patch and my questionable one combined. And I did
add two printf()s next to DBG()s to show the file_mod paths (whether and how
they're empty), sorry about that)
~Neels
On 08/22/2011 02:21 PM, Julian Foad wrote:
> Hi Neels.
>
> The new diff --summarize code presently still downloads the full text of
> each deleted file to supply to the diff callbacks. I have a patch in
> progress (attached) to eliminate this, but I shan't be working on it for
> a few days. With this patch, 'diff --summarize' still works but I
> haven't checked carefully (either by testing or analysis) that this is
> actually eliminating all the unnecessary downloads, and it could do with
> some documentation updates in the diff callbacks to say that this usage
> is allowed.
>
> Feel free to progress this if you wish, otherwise I'll get back to it
> later.
>
> - Julian
>
Re: diff --summarize [was: svn commit: r1159880 ...]
Posted by Julian Foad <ju...@wandisco.com>.
Hi Neels.
The new diff --summarize code presently still downloads the full text of
each deleted file to supply to the diff callbacks. I have a patch in
progress (attached) to eliminate this, but I shan't be working on it for
a few days. With this patch, 'diff --summarize' still works but I
haven't checked carefully (either by testing or analysis) that this is
actually eliminating all the unnecessary downloads, and it could do with
some documentation updates in the diff callbacks to say that this usage
is allowed.
Feel free to progress this if you wish, otherwise I'll get back to it
later.
- Julian
Re: diff --summarize [was: svn commit: r1159880 ...]
Posted by Julian Foad <ju...@wandisco.com>.
I (Julian Foad) wrote:
> On Sun, 2011-08-21, Neels J Hofmeyr wrote:
> > Julian!
> >
> > Great stuff! :D
> >
> > Well, I haven't looked at the patch in great detail, but the summary reads
> > like honey and cream. Ever since I waded through the diff code years ago
> > this task has been on my, er, long-term to-do list... Thanks! :)
> >
> > Oh but it's not done yet, of course. The "Later we can drive...", does that
> > mean you'll continue to work on it in the coming weeks? Or are you off to
> > other tasks and it's going to be *a lot* later if it depended on you?
>
> I've got a working patch for enabling WC-WC diff summaries, so I'll
> finish that very soon,
r1160204.
> and I'll probably do WC-repos as well, since I
> don't think that can be much more work.
But not yet. Feel free to jump in there.
I'm noticing all sorts of nasty inconsistencies in diffs. For instance,
manual testing reveals that in svn_client_diff5(), show_copies_as_adds
is ignored for a repos-repos diff. Instead, a file is diffed against its
copyfrom source iff the file is the diff target and not if some parent
directory is the diff target. For a repos-WC diff, this is ignored if
the file is the diff target. Ugh. Later.
- Julian
> > On 08/20/2011 03:56 PM, julianfoad@apache.org wrote:
> > > Author: julianfoad
> > > Date: Sat Aug 20 13:56:52 2011
> > > New Revision: 1159880
> > >
> > > URL: http://svn.apache.org/viewvc?rev=1159880&view=rev
> > > Log:
> > > Change the implementation of 'svn diff --summarize' to use the standard
> > > 'diff callbacks' mechanism, so that it may be more easily extended. The
> > > summary mode currently supports only repos-repos diffs, and it was reporting
> > > the summary results directly from a delta editor drive. Instead, write a
> > > set of diff callbacks that produce summary information, and drive them via
> > > the existing svn_client__get_diff_editor() for a repos-repos diff. Later we
> > > can drive the same diff callbacks from WC-WC and WC-repos diff sources.
> > ...
>
>
diff --summarize [was: svn commit: r1159880 ...]
Posted by Julian Foad <ju...@wandisco.com>.
On Sun, 2011-08-21, Neels J Hofmeyr wrote:
> Julian!
>
> Great stuff! :D
>
> Well, I haven't looked at the patch in great detail, but the summary reads
> like honey and cream. Ever since I waded through the diff code years ago
> this task has been on my, er, long-term to-do list... Thanks! :)
>
> Oh but it's not done yet, of course. The "Later we can drive...", does that
> mean you'll continue to work on it in the coming weeks? Or are you off to
> other tasks and it's going to be *a lot* later if it depended on you?
I've got a working patch for enabling WC-WC diff summaries, so I'll
finish that very soon, and I'll probably do WC-repos as well, since I
don't think that can be much more work.
- Julian
> On 08/20/2011 03:56 PM, julianfoad@apache.org wrote:
> > Author: julianfoad
> > Date: Sat Aug 20 13:56:52 2011
> > New Revision: 1159880
> >
> > URL: http://svn.apache.org/viewvc?rev=1159880&view=rev
> > Log:
> > Change the implementation of 'svn diff --summarize' to use the standard
> > 'diff callbacks' mechanism, so that it may be more easily extended. The
> > summary mode currently supports only repos-repos diffs, and it was reporting
> > the summary results directly from a delta editor drive. Instead, write a
> > set of diff callbacks that produce summary information, and drive them via
> > the existing svn_client__get_diff_editor() for a repos-repos diff. Later we
> > can drive the same diff callbacks from WC-WC and WC-repos diff sources.
> ...