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

[PATCH] v2. replace adm_access batons in wc_diff_callback file_changed()

From: Daniel Näslund <daniel_at_longitudo.com>
Date: Mon, 14 Sep 2009 22:53:32 +0200

Hi!

I'm touching a lot of code here. The callbacks not only gets called from
the outside but they call each other too. I had to make some temporary
wc_ctx objects to be passed around. The fact that there are three(!)
different diff-functions got me a bit confused. The fact that one of
them is placed in libsvn_client though it uses wc_diff_callbacks got me
even more confused.

Passes make check with no failures.

[[[
As part of WC-NG, replace adm_access parameter with wc_ctx in
wc_diff_callback file_changed().

* subversion/include/svn_wc.h
  (file_changed): Replaced adm_access parameter with wc_ctx.

* subversion/libsvn_wc_deprecated.c
  (wrap_4to3_file_changed): Replaced adm_access parameter with wc_ctx.
    Create an adm_access for calling older callbacks.

* subversion/libsvn_client/repos_diff.c
  (edit_baton): Add wc_ctx field.
  (close_file): Call file_changed() callback with wc_ctx instead of adm_access.
  (svn_client__get_diff_editor): Add ctx parameter. Set eb->wc_ctx to
    ctx->wc_ctx.

* subversion/libsvn_client/client.h
  (svn_client__get_diff_editor): Add ctx parameter.

* subversion/libsvn_client/merge.c
  (merge_file_changed): Replaced adm_access parameter with wc_ctx.
    Retrieve adm_access from wc_ctx for calling other wc functions.
  (drive_merge_report_editor): Add ctx parameter when calling
    svn_client__get_diff_editor().
  (do_file_merge): Replace adm_access parameter with ctx->wc_ctx when
    calling merge_file_changed().

* subversion/libsvn_client/diff.c
  (diff_file_changed): Replace adm_access parameter with wc_ctx. Add
    temporary adm_access for calling diff_props_changed(). Set to NULL since
    it was called with NULL.
  (diff_file_added): Create temporary wc_ctx for calling
    diff_file_changed(). Should be removed when diff_file_added() uses
    wc_ctx.
  (diff_file_deleted_with_diff): Create temporary wc_ctx for calling
    diff_file_changed(). Should be removed when
    diff_file_deleted_with_diff() uses wc_ctx.
  (diff_repos_repos): Add ctx parameter when calling
    svn_client__get_diff_editor().
]]]

Daniel Näslund

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2394783

Received on 2009-09-14 22:53:50 CEST

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.