[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] svn diff --summarize

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2006-02-15 03:55:27 CET

Julian Foad wrote:
> Garrett Rooney wrote:
>
>> Diff simply does not send copyfrom data, that's one of the reasons I
>> wrote ra_replay.
>
> Eventually I expect we will want "diff" to provide that info, so that
> someone can implement an svn-aware diff and patch pair; however, that's
> not likely to happen soon. Therefore we'd better remove that apparent
> capability from the diff-summarize API before it gets released in v1.4.
> Sorry Martin; please could you send a patch for that.

Here's a patch to remove "copy from" support from the "diff-summarize" feature.
  Is this what we want to do for now?

> svn_ra_do_diff2():
>
>> * When finished, the client calls @a reporter->finish_report(). The
>> * RA layer then does a complete drive of @a diff_editor, ending with
>> * close_edit(), to transmit the diff.
>
> Should we add here, "Copy-from information is not supplied to the editor
> callbacks." ?

The patch adds this too. Is that OK?

- Julian

Remove apparent support for "copy from" info in the "diff summarize" feature,
because the diff mechanism does not in fact supply this information.

* subversion/include/svn_ra.h
  (svn_ra_do_diff2): Mention that it does not supply "copy from" info.

* subversion/include/svn_client.h
  (svn_client_diff_summarize_t): Remove copyfrom_path and copyfrom_rev fields.

* subversion/libsvn_client/repos_diff_summarize.c
  (ensure_summarize, delete_entry, add_directory): Don't set "copyfrom" fields.

* subversion/svn/diff-cmd.c
  (summarize_func): Remove printing of a "+" flag for copied items.

Index: subversion/include/svn_client.h
===================================================================
--- subversion/include/svn_client.h (revision 18462)
+++ subversion/include/svn_client.h (working copy)
@@ -524,13 +524,6 @@ typedef struct svn_client_diff_summarize
   /** Path relative to the target. */
   const char *path;
 
- /** The path from which this item was copied, else NULL. */
- const char *copyfrom_path;
-
- /** The revision from which this item was copied, else
- * @c SVN_INVALID_REVNUM. */
- svn_revnum_t copyfrom_rev;
-
   /** Change kind */
   svn_client_diff_summarize_kind_t summarize_kind;
 
Index: subversion/include/svn_ra.h
===================================================================
--- subversion/include/svn_ra.h (revision 18462)
+++ subversion/include/svn_ra.h (working copy)
@@ -863,6 +863,8 @@ svn_error_t *svn_ra_do_status (svn_ra_se
  * RA layer then does a complete drive of @a diff_editor, ending with
  * close_edit(), to transmit the diff.
  *
+ * Copy-from information is NOT SUPPLIED to the editor callbacks.
+ *
  * @a diff_target is an optional single path component will restrict
  * the scope of the diff to an entry in the directory represented by
  * the @a session's URL, or empty if the entire directory is meant to be
Index: subversion/libsvn_client/repos_diff_summarize.c
===================================================================
--- subversion/libsvn_client/repos_diff_summarize.c (revision 18462)
+++ subversion/libsvn_client/repos_diff_summarize.c (working copy)
@@ -96,7 +96,6 @@ ensure_summarize (struct item_baton *ib,
   sum->node_kind = ib->node_kind;
   sum->summarize_kind = sum_kind;
   sum->path = ib->path;
- sum->copyfrom_rev = SVN_INVALID_REVNUM;
 
   ib->summarize = sum;
 }
@@ -139,7 +138,6 @@ delete_entry (const char *path,
   sum->summarize_kind = svn_client_diff_summarize_kind_deleted;
   sum->path = path;
   sum->node_kind = kind;
- sum->copyfrom_rev = SVN_INVALID_REVNUM;
 
   SVN_ERR (eb->summarize_func (sum, eb->summarize_func_baton, pool));
 
@@ -160,8 +158,6 @@ add_directory (const char *path,
 
   cb = create_item_baton (pb->edit_baton, path, svn_node_dir, pool);
   ensure_summarize (cb, svn_client_diff_summarize_kind_added);
- cb->summarize->copyfrom_path = copyfrom_path;
- cb->summarize->copyfrom_rev = copyfrom_rev;
 
   *child_baton = cb;
   return SVN_NO_ERROR;
Index: subversion/svn/diff-cmd.c
===================================================================
--- subversion/svn/diff-cmd.c (revision 18462)
+++ subversion/svn/diff-cmd.c (working copy)
@@ -78,10 +78,9 @@ summarize_func (const svn_client_diff_su
    * a diff summary would go. */
 
   SVN_ERR (svn_cmdline_printf (pool,
- "%c%c %c %s\n",
+ "%c%c %s\n",
                                text_mod_char (summary->summarize_kind),
                                summary->prop_changed ? 'M' : ' ',
- summary->copyfrom_path ? '+' : ' ',
                                path));
 
   return SVN_NO_ERROR;

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Feb 15 03:55:53 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.