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

Will send_copyfrom_args be reverted for 'ra' layers too just like in issue #3711

From: prabhugnanasundar <prabhugs_at_collab.net>
Date: Wed, 24 Nov 2010 21:08:18 +0530

Hi all,

 I am in the process of implementing the '--diff-copy-from' in svn diff,
just similar to the '--diff-copy-from' in the svnlook diff. I have done
the coding part for all the 'ra' layers, except the 'svnserve'.

Meanwhile I came to know that the 'send_copyfrom_args' for 'svn
update' (client side) has been rolled back by Mike, with reference to
the issue #3711. But now, in my case, I genuinely need the
'send_copyfrom_args' for getting the 'copyfrom_revision' and the
'copyfrom_path' of the file getting diffed.

I use the existing ra_(neon|serf|local) API to send_copy_from_args to

After learning the rollback in #3711 I am worried whether similar
reverts are possible in ra_layer also.

I am attaching the patch and log so far just to show the progress.

Thanks and regards

Make svn diff to accept "--diff-copy-from" inorder to compare/diff
against the copy-source file.

* subversion/libsvn_ra/deprecated.c
  (): deprecated svn_ra_do_diff3
  (svn_ra_do_diff2): pass FALSE for 'diff_copy_from' argument in do_diff function.

* subversion/libsvn_ra/wrapper_template.h
  (compat_do_diff): pass FALSE for 'diff_copy_from' argument in do_diff function.

* subversion/libsvn_ra/ra_loader.c
  (svn_ra_do_diff4): introduced 'diff_copy_from' argument.
                     pass 'diff_copy_from' argument in do_diff function.

* subversion/libsvn_ra/ra_loader.h
  svn_ra__vtable_t: introduced 'diff-copy-from' argument in do_diff.

* subversion/libsvn_ra_local/ra_plugin.c
  (svn_ra_local__do_diff): introduced 'diff_copy_from' argument.
                           if 'diff_copy_from', pass true for send_copyfrom_args
                           if 'diff_copy_from', pass false for ignore_ancestry
* subversion/svn/cl.h
  svn_cl__opt_state_t: introduced 'diff_copy_from' option.

* subversion/svn/diff-cmd.c
  (svn_cl__diff): passed 'diff_copy_from' option to svn_client_diff5 function
                  and the svn_client_diff_peg5 function.

* subversion/svn/log-cmd.c
  (log_entry_receiver): passed false for diff_copy_from to svn_client_diff5 function.

* subversion/svn/main.c
  (): introduced the diff_copy_from option and display information to user.
  svn_cl__options[]: added information about the diff_copy_from option.
  svn_cl__cmd_table[]: added diff-copy-from to the subcommand table.
  (main): handle the 'diff-copy-from' case.

* subversion/include/svn_client.h
  (svn_client_diff5): introduced the 'diff_copy_from' argument.
  (svn_client_diff_peg5): introduced the 'diff_copy_from' argument.

* subversion/include/svn_ra.h
  (): deprecated svn_ra_do_diff3 and introduced the
      svn_ra_do_diff4 to accept 'diff_copy_from' argument.

* subversion/libsvn_client/deprecated.c
  (svn_client_diff4): pass false for diff_copy_from in svn_client_diff5 for
                      backporting purpose.
  (svn_client_diff_peg4):pass false for diff_copy_from in svn_client_diff_peg5
                         for backporting purpose.

* subversion/libsvn_client/repos_diff.c
  edit_baton: store the value of diff_copy_from.
  (get_file_from_ra): introduced the 'path' argument to pass the copyfrom_path.
  (diff_deleted_dir): passed path in the 'path' argument.
  (delete_entry): pass 'path' in the get_file_from_ra function.
  (add_file): if 'diff_copy_from' and copyfrom_revision are valid, add the file
              from the copy-source.
  (close_file): if diff_copy_from is set, call the file_changed callback.
  (svn_client__get_diff_editor): introduced the 'diff_copy_from' argument and
                                 assigned it in the edit baton.

* subversion/libsvn_client/client.h
  (svn_client__get_diff_editor): introduced the 'diff_copy_from' argument.

* subversion/libsvn_client/merge.c
  (drive_merge_report_editor): pass false for diff_copy_from to svn_ra_do_diff4
                               function and svn_client__get_diff_editor funtion.

* subversion/libsvn_client/diff.c
  (diff_repos_repos): if diff_copy_from is set, perform diff with respect to the
  (diff_repos_wc): if diff_copy_from is set, perform diff with respect to the
  (do_diff): perform diff with respect to the diff_copy_from argument.
  (diff_summarize_repos_repos): pass false for 'diff_copy_from' to
                                svn_ra_do_diff4 function.
  (svn_client_diff5): introduced the 'diff_copy_from' argument and pass it to
                      do_diff function.
  (svn_client_diff_peg5): introduced the 'diff_copy_from' argument and pass it
                          to do_diff function.

* subversion/libsvn_ra_neon/ra_neon.h
  (svn_ra_neon__do_diff): introduced the 'diff_copy_from' argument.

* subversion/libsvn_ra_neon/fetch.c
  (svn_ra_neon__do_diff): introduced the 'diff_copy_from' argument and pass it to

* subversion/libsvn_ra_serf/ra_serf.h
  (svn_ra_serf__do_diff): introduced the 'diff_copy_from' argument.

* subversion/libsvn_ra_serf/update.c
  (svn_ra_serf__do_diff): introduced the 'diff_copy_from' argument and pass it to

Patch by: Prabhu Gnana Sundar <prabhugs_at_collab.net>
Suggested by: Kamesh Jayachandran <kamesh_at_collab.net>

Received on 2010-11-24 16:43:13 CET

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