Author: hwright
Date: Thu Sep 22 10:17:22 2011
New Revision: 1174041
URL: http://svn.apache.org/viewvc?rev=1174041&view=rev
Log:
Ev2 shims: Add a callback function for obtain the type of an object.
* subversion/libsvn_ra_svn/editorp.c
* subversion/include/svn_delta.h
(svn_delta_fetch_kind_cb_func_t): New.
(svn_editor_from_delta, svn_editor__insert_shims): Add fetch kind func/baton.
* subversion/libsvn_ra_neon/commit.c
subversion/svnsync/main.c
subversion/svnrdump/dump_editor.c
subversion/libsvn_wc/diff_editor.c
subversion/libsvn_wc/update_editor.c
subversion/libsvn_wc/status.c
subversion/libsvn_client/repos_diff.c
subversion/libsvn_client/mergeinfo.c
subversion/libsvn_client/export.c
subversion/libsvn_ra_serf/commit.c
subversion/libsvn_repos/commit.c
subversion/libsvn_repos/dump.c
* subversion/libsvn_delta/compat.c
(editor_baton): Add new members.
(svn_editor_from_delta): Add params and save into the baton.
(svn_edit__insert_shims): Add params and pass 'em down.
Modified:
subversion/trunk/subversion/include/svn_delta.h
subversion/trunk/subversion/libsvn_client/export.c
subversion/trunk/subversion/libsvn_client/mergeinfo.c
subversion/trunk/subversion/libsvn_client/repos_diff.c
subversion/trunk/subversion/libsvn_delta/compat.c
subversion/trunk/subversion/libsvn_ra_neon/commit.c
subversion/trunk/subversion/libsvn_ra_serf/commit.c
subversion/trunk/subversion/libsvn_ra_svn/editorp.c
subversion/trunk/subversion/libsvn_repos/commit.c
subversion/trunk/subversion/libsvn_repos/dump.c
subversion/trunk/subversion/libsvn_wc/diff_editor.c
subversion/trunk/subversion/libsvn_wc/status.c
subversion/trunk/subversion/libsvn_wc/update_editor.c
subversion/trunk/subversion/svnrdump/dump_editor.c
subversion/trunk/subversion/svnsync/main.c
Modified: subversion/trunk/subversion/include/svn_delta.h
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_delta.h?rev=1174041&r1=1174040&r2=1174041&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_delta.h (original)
+++ subversion/trunk/subversion/include/svn_delta.h Thu Sep 22 10:17:22 2011
@@ -1099,6 +1099,18 @@ typedef svn_error_t *(*svn_delta_fetch_p
apr_pool_t *scratch_pool
);
+/** Callback to retrieve a node's kind. This is needed by the various editor
+ * shims in order to effect backward compat.
+ *
+ * @since New in 1.8.
+ */
+typedef svn_error_t *(*svn_delta_fetch_kind_cb_func_t)(
+ svn_node_kind_t *kind,
+ void *baton,
+ const char *path,
+ apr_pool_t *scratch_pool
+ );
+
/* Return a delta editor and baton which will forward calls to @a editor,
* allocated in @a pool.
*
@@ -1132,6 +1144,8 @@ svn_editor_from_delta(svn_editor_t **edi
void *dedit_baton,
svn_cancel_func_t cancel_func,
void *cancel_baton,
+ svn_delta_fetch_kind_cb_func_t fetch_kind_func,
+ void *fetch_kind_baton,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
@@ -1154,6 +1168,8 @@ svn_editor__insert_shims(const svn_delta
void *dedit_baton_in,
svn_delta_fetch_props_cb_func_t fetch_props_func,
void *fetch_props_baton,
+ svn_delta_fetch_kind_cb_func_t fetch_kind_func,
+ void *fetch_kind_baton,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
Modified: subversion/trunk/subversion/libsvn_client/export.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/export.c?rev=1174041&r1=1174040&r2=1174041&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/export.c (original)
+++ subversion/trunk/subversion/libsvn_client/export.c Thu Sep 22 10:17:22 2011
@@ -1180,7 +1180,7 @@ svn_client_export5(svn_revnum_t *result_
SVN_ERR(svn_editor__insert_shims(&export_editor, &edit_baton,
export_editor, edit_baton,
- NULL, NULL,
+ NULL, NULL, NULL, NULL,
pool, pool));
/* Manufacture a basic 'report' to the update reporter. */
Modified: subversion/trunk/subversion/libsvn_client/mergeinfo.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/mergeinfo.c?rev=1174041&r1=1174040&r2=1174041&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/mergeinfo.c (original)
+++ subversion/trunk/subversion/libsvn_client/mergeinfo.c Thu Sep 22 10:17:22
2011
@@ -1234,7 +1234,8 @@ svn_client__elide_mergeinfo_catalog(svn_
eb = mergeinfo_catalog;
SVN_ERR(svn_editor__insert_shims((const svn_delta_editor_t **)&editor, &eb,
- editor, eb, NULL, NULL, pool, pool));
+ editor, eb, NULL, NULL, NULL, NULL,
+ pool, pool));
/* Walk over the paths, and build up a list of elidable ones. */
SVN_ERR(svn_hash_keys(&paths, mergeinfo_catalog, pool));
Modified: subversion/trunk/subversion/libsvn_client/repos_diff.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/repos_diff.c?rev=1174041&r1=1174040&r2=1174041&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/repos_diff.c (original)
+++ subversion/trunk/subversion/libsvn_client/repos_diff.c Thu Sep 22 10:17:22
2011
@@ -1388,7 +1388,8 @@ svn_client__get_diff_editor(const svn_de
eb->pool));
SVN_ERR(svn_editor__insert_shims(editor, edit_baton, *editor, *edit_baton,
- NULL, NULL, result_pool, result_pool));
+ NULL, NULL, NULL, NULL,
+ result_pool, result_pool));
return SVN_NO_ERROR;
}
Modified: subversion/trunk/subversion/libsvn_delta/compat.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_delta/compat.c?rev=1174041&r1=1174040&r2=1174041&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_delta/compat.c (original)
+++ subversion/trunk/subversion/libsvn_delta/compat.c Thu Sep 22 10:17:22 2011
@@ -562,6 +562,9 @@ struct editor_baton
const svn_delta_editor_t *deditor;
void *dedit_baton;
+ svn_delta_fetch_kind_cb_func_t fetch_kind_func;
+ void *fetch_kind_baton;
+
struct operation root;
apr_hash_t *paths;
@@ -972,6 +975,8 @@ svn_editor_from_delta(svn_editor_t **edi
void *dedit_baton,
svn_cancel_func_t cancel_func,
void *cancel_baton,
+ svn_delta_fetch_kind_cb_func_t fetch_kind_func,
+ void *fetch_kind_baton,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
@@ -997,6 +1002,9 @@ svn_editor_from_delta(svn_editor_t **edi
eb->edit_pool = result_pool;
eb->paths = apr_hash_make(result_pool);
+ eb->fetch_kind_func = fetch_kind_func;
+ eb->fetch_kind_baton = fetch_kind_baton;
+
SVN_ERR(svn_editor_create(&editor, eb, cancel_func, cancel_baton,
result_pool, scratch_pool));
SVN_ERR(svn_editor_setcb_many(editor, &editor_cbs, scratch_pool));
@@ -1018,6 +1026,8 @@ svn_editor__insert_shims(const svn_delta
void *dedit_baton_in,
svn_delta_fetch_props_cb_func_t fetch_props_func,
void *fetch_props_baton,
+ svn_delta_fetch_kind_cb_func_t fetch_kind_func,
+ void *fetch_kind_baton,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
@@ -1035,6 +1045,7 @@ svn_editor__insert_shims(const svn_delta
NULL, NULL, result_pool, scratch_pool));
SVN_ERR(svn_delta_from_editor(deditor_out, dedit_baton_out, editor,
fetch_props_func, fetch_props_baton,
+ fetch_kind_func, fetch_kind_baton,
result_pool));
#endif
Modified: subversion/trunk/subversion/libsvn_ra_neon/commit.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_neon/commit.c?rev=1174041&r1=1174040&r2=1174041&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_neon/commit.c (original)
+++ subversion/trunk/subversion/libsvn_ra_neon/commit.c Thu Sep 22 10:17:22 2011
@@ -1622,7 +1622,7 @@ svn_error_t * svn_ra_neon__get_commit_ed
*edit_baton = cc;
SVN_ERR(svn_editor__insert_shims(editor, edit_baton, *editor, *edit_baton,
- NULL, NULL, pool, pool));
+ NULL, NULL, NULL, NULL, pool, pool));
return SVN_NO_ERROR;
}
Modified: subversion/trunk/subversion/libsvn_ra_serf/commit.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/commit.c?rev=1174041&r1=1174040&r2=1174041&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/commit.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/commit.c Thu Sep 22 10:17:22 2011
@@ -2367,7 +2367,8 @@ svn_ra_serf__get_commit_editor(svn_ra_se
*edit_baton = ctx;
SVN_ERR(svn_editor__insert_shims(ret_editor, edit_baton, *ret_editor,
- *edit_baton, NULL, NULL, pool, pool));
+ *edit_baton, NULL, NULL, NULL, NULL,
+ pool, pool));
return SVN_NO_ERROR;
}
Modified: subversion/trunk/subversion/libsvn_ra_svn/editorp.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_svn/editorp.c?rev=1174041&r1=1174040&r2=1174041&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_svn/editorp.c (original)
+++ subversion/trunk/subversion/libsvn_ra_svn/editorp.c Thu Sep 22 10:17:22 2011
@@ -438,7 +438,7 @@ void svn_ra_svn_get_editor(const svn_del
svn_error_clear(svn_editor__insert_shims(editor, edit_baton, *editor,
*edit_baton, NULL, NULL,
- pool, pool));
+ NULL, NULL, pool, pool));
}
/* --- DRIVING AN EDITOR --- */
Modified: subversion/trunk/subversion/libsvn_repos/commit.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/commit.c?rev=1174041&r1=1174040&r2=1174041&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/commit.c (original)
+++ subversion/trunk/subversion/libsvn_repos/commit.c Thu Sep 22 10:17:22 2011
@@ -854,7 +854,7 @@ svn_repos_get_commit_editor5(const svn_d
*editor = e;
SVN_ERR(svn_editor__insert_shims(editor, edit_baton, *editor, *edit_baton,
- NULL, NULL, pool, pool));
+ NULL, NULL, NULL, NULL, pool, pool));
return SVN_NO_ERROR;
}
Modified: subversion/trunk/subversion/libsvn_repos/dump.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/dump.c?rev=1174041&r1=1174040&r2=1174041&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/dump.c (original)
+++ subversion/trunk/subversion/libsvn_repos/dump.c Thu Sep 22 10:17:22 2011
@@ -897,7 +897,7 @@ get_dump_editor(const svn_delta_editor_t
*editor = dump_editor;
SVN_ERR(svn_editor__insert_shims(editor, edit_baton, *editor, *edit_baton,
- NULL, NULL, pool, pool));
+ NULL, NULL, NULL, NULL, pool, pool));
return SVN_NO_ERROR;
}
Modified: subversion/trunk/subversion/libsvn_wc/diff_editor.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/diff_editor.c?rev=1174041&r1=1174040&r2=1174041&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/diff_editor.c (original)
+++ subversion/trunk/subversion/libsvn_wc/diff_editor.c Thu Sep 22 10:17:22 2011
@@ -1932,7 +1932,8 @@ svn_wc_get_diff_editor6(const svn_delta_
result_pool));
SVN_ERR(svn_editor__insert_shims(editor, edit_baton, *editor, *edit_baton,
- NULL, NULL, result_pool, scratch_pool));
+ NULL, NULL, NULL, NULL,
+ result_pool, scratch_pool));
return SVN_NO_ERROR;
}
Modified: subversion/trunk/subversion/libsvn_wc/status.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/status.c?rev=1174041&r1=1174040&r2=1174041&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/status.c (original)
+++ subversion/trunk/subversion/libsvn_wc/status.c Thu Sep 22 10:17:22 2011
@@ -2503,7 +2503,8 @@ svn_wc_get_status_editor5(const svn_delt
*set_locks_baton = eb;
SVN_ERR(svn_editor__insert_shims(editor, edit_baton, *editor, *edit_baton,
- NULL, NULL, result_pool, scratch_pool));
+ NULL, NULL, NULL, NULL,
+ result_pool, scratch_pool));
return SVN_NO_ERROR;
}
Modified: subversion/trunk/subversion/libsvn_wc/update_editor.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/update_editor.c?rev=1174041&r1=1174040&r2=1174041&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/trunk/subversion/libsvn_wc/update_editor.c Thu Sep 22 10:17:22
2011
@@ -4848,7 +4848,7 @@ make_editor(svn_revnum_t *target_revisio
fpb->db = db;
fpb->target_abspath = eb->target_abspath;
SVN_ERR(svn_editor__insert_shims(editor, edit_baton, *editor, *edit_baton,
- fetch_props_func, fpb,
+ fetch_props_func, fpb, NULL, NULL,
result_pool, scratch_pool));
return SVN_NO_ERROR;
Modified: subversion/trunk/subversion/svnrdump/dump_editor.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/svnrdump/dump_editor.c?rev=1174041&r1=1174040&r2=1174041&view=diff
==============================================================================
--- subversion/trunk/subversion/svnrdump/dump_editor.c (original)
+++ subversion/trunk/subversion/svnrdump/dump_editor.c Thu Sep 22 10:17:22 2011
@@ -892,7 +892,7 @@ svn_rdump__get_dump_editor(const svn_del
de, eb, editor, edit_baton, pool));
SVN_ERR(svn_editor__insert_shims(editor, edit_baton, *editor, *edit_baton,
- NULL, NULL, pool, pool));
+ NULL, NULL, NULL, NULL, pool, pool));
return SVN_NO_ERROR;
}
Modified: subversion/trunk/subversion/svnsync/main.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/svnsync/main.c?rev=1174041&r1=1174040&r2=1174041&view=diff
==============================================================================
--- subversion/trunk/subversion/svnsync/main.c (original)
+++ subversion/trunk/subversion/svnsync/main.c Thu Sep 22 10:17:22 2011
@@ -1119,7 +1119,7 @@ replay_rev_started(svn_revnum_t revision
*edit_baton = cancel_baton;
SVN_ERR(svn_editor__insert_shims(editor, edit_baton, *editor, *edit_baton,
- NULL, NULL, pool, pool));
+ NULL, NULL, NULL, NULL, pool, pool));
return SVN_NO_ERROR;
}