subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hwri...@apache.org
Subject svn commit: r1166900 - in /subversion/trunk/subversion: libsvn_client/ libsvn_ra_neon/ libsvn_ra_serf/ libsvn_ra_svn/ libsvn_repos/ libsvn_wc/ svnrdump/ svnsync/
Date Thu, 08 Sep 2011 20:58:12 GMT
Author: hwright
Date: Thu Sep  8 20:58:11 2011
New Revision: 1166900

URL: http://svn.apache.org/viewvc?rev=1166900&view=rev
Log:
Optionally insert matching editor shims in the many places which we use editors.
When compiled with ENABLE_EDITOR_SHIMS this will cause severe breakage.

Some of these may be redundant, since there are editors which wrap others,
but that doesn't hurt anything, just introduces additional overhead (but only
in the case when shims are enabled).

* subversion/libsvn_ra_svn/editorp.c
  (svn_ra_svn_get_editor),
* subversion/libsvn_ra_neon/commit.c
  (svn_ra_neon__get_commit_editor),
* subversion/svnsync/main.c
  (replay_rev_started),
* subversion/svnrdump/dump_editor.c
  (svn_rdump__get_dump_editor),
* subversion/libsvn_wc/diff_editor.c
  (svn_wc_get_diff_editor6),
* subversion/libsvn_wc/update_editor.c
  (make_editor),
* subversion/libsvn_wc/status.c
  (svn_wc_get_status_editor5),
* subversion/libsvn_client/repos_diff.c
  (svn_client__get_diff_editor),
* subversion/libsvn_client/mergeinfo.c
  (svn_client__elide_mergeinfo_catalog),
* subversion/libsvn_client/export.c
  (svn_client_export5),
* subversion/libsvn_client/commit.c
  (get_ra_editor),
* subversion/libsvn_ra_serf/commit.c
  (svn_ra_sert__get_commit_editor),
* subversion/libsvn_repos/commit.c
  (svn_repos_get_commit_editor5),
* subversion/libsvn_repos/dump.c
  (get_dump_editor):
    Insert a pair of matched shims before returning the created or fetched
    editor to the caller.

Modified:
    subversion/trunk/subversion/libsvn_client/commit.c
    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_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/libsvn_client/commit.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/commit.c?rev=1166900&r1=1166899&r2=1166900&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/commit.c (original)
+++ subversion/trunk/subversion/libsvn_client/commit.c Thu Sep  8 20:58:11 2011
@@ -667,10 +667,15 @@ get_ra_editor(svn_ra_session_t **ra_sess
                                            log_msg, ctx, pool));
 
   /* Fetch RA commit editor. */
-  return svn_ra_get_commit_editor3(*ra_session, editor, edit_baton,
-                                   commit_revprops, commit_callback,
-                                   commit_baton, lock_tokens, keep_locks,
-                                   pool);
+  SVN_ERR(svn_ra_get_commit_editor3(*ra_session, editor, edit_baton,
+                                    commit_revprops, commit_callback,
+                                    commit_baton, lock_tokens, keep_locks,
+                                    pool));
+
+  SVN_ERR(svn_editor__insert_shims(editor, edit_baton, *editor, *edit_baton,
+                                   pool, pool));
+
+  return SVN_NO_ERROR;
 }
 
 

Modified: subversion/trunk/subversion/libsvn_client/export.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/export.c?rev=1166900&r1=1166899&r2=1166900&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/export.c (original)
+++ subversion/trunk/subversion/libsvn_client/export.c Thu Sep  8 20:58:11 2011
@@ -1182,6 +1182,8 @@ svn_client_export5(svn_revnum_t *result_
                                                     &edit_baton,
                                                     pool));
 
+          SVN_ERR(svn_editor__insert_shims(&editor, &eb, editor, eb,
+                                           pool, pool));
 
           /* Manufacture a basic 'report' to the update reporter. */
           SVN_ERR(svn_ra_do_update2(ra_session,

Modified: subversion/trunk/subversion/libsvn_client/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/mergeinfo.c?rev=1166900&r1=1166899&r2=1166900&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/mergeinfo.c (original)
+++ subversion/trunk/subversion/libsvn_client/mergeinfo.c Thu Sep  8 20:58:11 2011
@@ -1281,6 +1281,7 @@ svn_client__elide_mergeinfo_catalog(svn_
                                                       sizeof(const char *));
   svn_delta_editor_t *editor = svn_delta_default_editor(pool);
   struct elide_mergeinfo_catalog_cb_baton cb = { 0 };
+  void *eb;
   int i;
 
   cb.elidable_paths = elidable_paths;
@@ -1290,10 +1291,13 @@ svn_client__elide_mergeinfo_catalog(svn_
   editor->open_root = elide_mergeinfo_catalog_open_root;
   editor->open_directory = elide_mergeinfo_catalog_open_directory;
 
+  eb = mergeinfo_catalog;
+  SVN_ERR(svn_editor__insert_shims(&editor, &eb, editor, eb, pool, pool));
+
   /* Walk over the paths, and build up a list of elidable ones. */
   SVN_ERR(svn_hash_keys(&paths, mergeinfo_catalog, pool));
   SVN_ERR(svn_delta_path_driver(editor,
-                                mergeinfo_catalog, /* as edit_baton */
+                                eb,
                                 SVN_INVALID_REVNUM,
                                 paths,
                                 elide_mergeinfo_catalog_cb,

Modified: subversion/trunk/subversion/libsvn_client/repos_diff.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/repos_diff.c?rev=1166900&r1=1166899&r2=1166900&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/repos_diff.c (original)
+++ subversion/trunk/subversion/libsvn_client/repos_diff.c Thu Sep  8 20:58:11 2011
@@ -1382,8 +1382,13 @@ svn_client__get_diff_editor(const svn_de
   tree_editor->absent_directory = absent_directory;
   tree_editor->absent_file = absent_file;
 
-  return svn_delta_get_cancellation_editor(cancel_func, cancel_baton,
-                                           tree_editor, eb,
-                                           editor, edit_baton,
-                                           eb->pool);
+  SVN_ERR(svn_delta_get_cancellation_editor(cancel_func, cancel_baton,
+                                            tree_editor, eb,
+                                            editor, edit_baton,
+                                            eb->pool));
+
+  SVN_ERR(svn_editor__insert_shims(editor, edit_baton, *editor, *edit_baton,
+                                   result_pool, result_pool));
+
+  return SVN_NO_ERROR;
 }

Modified: subversion/trunk/subversion/libsvn_ra_neon/commit.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_neon/commit.c?rev=1166900&r1=1166899&r2=1166900&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_neon/commit.c (original)
+++ subversion/trunk/subversion/libsvn_ra_neon/commit.c Thu Sep  8 20:58:11 2011
@@ -1620,5 +1620,9 @@ svn_error_t * svn_ra_neon__get_commit_ed
 
   *editor = commit_editor;
   *edit_baton = cc;
+
+  SVN_ERR(svn_editor__insert_shims(editor, edit_baton, *editor, *edit_baton,
+                                   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=1166900&r1=1166899&r2=1166900&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/commit.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/commit.c Thu Sep  8 20:58:11 2011
@@ -2366,6 +2366,9 @@ svn_ra_serf__get_commit_editor(svn_ra_se
   *ret_editor = editor;
   *edit_baton = ctx;
 
+  SVN_ERR(svn_editor__insert_shims(ret_editor, edit_baton, *ret_editor,
+                                   *edit_baton, 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=1166900&r1=1166899&r2=1166900&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_svn/editorp.c (original)
+++ subversion/trunk/subversion/libsvn_ra_svn/editorp.c Thu Sep  8 20:58:11 2011
@@ -435,6 +435,9 @@ void svn_ra_svn_get_editor(const svn_del
 
   *editor = ra_svn_editor;
   *edit_baton = eb;
+
+  svn_error_clear(svn_editor__insert_shims(editor, edit_baton, *editor,
+                                           *edit_baton, 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=1166900&r1=1166899&r2=1166900&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/commit.c (original)
+++ subversion/trunk/subversion/libsvn_repos/commit.c Thu Sep  8 20:58:11 2011
@@ -853,5 +853,8 @@ svn_repos_get_commit_editor5(const svn_d
   *edit_baton = eb;
   *editor = e;
 
+  SVN_ERR(svn_editor__insert_shims(editor, edit_baton, *editor, *edit_baton,
+                                   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=1166900&r1=1166899&r2=1166900&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/dump.c (original)
+++ subversion/trunk/subversion/libsvn_repos/dump.c Thu Sep  8 20:58:11 2011
@@ -896,6 +896,9 @@ get_dump_editor(const svn_delta_editor_t
   *edit_baton = eb;
   *editor = dump_editor;
 
+  SVN_ERR(svn_editor__insert_shims(editor, edit_baton, *editor, *edit_baton,
+                                   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=1166900&r1=1166899&r2=1166900&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/diff_editor.c (original)
+++ subversion/trunk/subversion/libsvn_wc/diff_editor.c Thu Sep  8 20:58:11 2011
@@ -1923,11 +1923,16 @@ svn_wc_get_diff_editor6(const svn_delta_
                                                 inner_baton,
                                                 result_pool));
 
-  return svn_delta_get_cancellation_editor(cancel_func,
-                                           cancel_baton,
-                                           inner_editor,
-                                           inner_baton,
-                                           editor,
-                                           edit_baton,
-                                           result_pool);
+  SVN_ERR(svn_delta_get_cancellation_editor(cancel_func,
+                                            cancel_baton,
+                                            inner_editor,
+                                            inner_baton,
+                                            editor,
+                                            edit_baton,
+                                            result_pool));
+
+  SVN_ERR(svn_editor__insert_shims(editor, edit_baton, *editor, *edit_baton,
+                                   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=1166900&r1=1166899&r2=1166900&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/status.c (original)
+++ subversion/trunk/subversion/libsvn_wc/status.c Thu Sep  8 20:58:11 2011
@@ -2352,6 +2352,9 @@ svn_wc_get_status_editor5(const svn_delt
   if (set_locks_baton)
     *set_locks_baton = eb;
 
+  SVN_ERR(svn_editor__insert_shims(editor, edit_baton, *editor, *edit_baton,
+                                   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=1166900&r1=1166899&r2=1166900&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/trunk/subversion/libsvn_wc/update_editor.c Thu Sep  8 20:58:11 2011
@@ -4802,13 +4802,18 @@ make_editor(svn_revnum_t *target_revisio
                                                 inner_baton,
                                                 result_pool));
 
-  return svn_delta_get_cancellation_editor(cancel_func,
-                                           cancel_baton,
-                                           inner_editor,
-                                           inner_baton,
-                                           editor,
-                                           edit_baton,
-                                           result_pool);
+  SVN_ERR(svn_delta_get_cancellation_editor(cancel_func,
+                                            cancel_baton,
+                                            inner_editor,
+                                            inner_baton,
+                                            editor,
+                                            edit_baton,
+                                            result_pool));
+
+  SVN_ERR(svn_editor__insert_shims(editor, edit_baton, *editor, *edit_baton,
+                                   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=1166900&r1=1166899&r2=1166900&view=diff
==============================================================================
--- subversion/trunk/subversion/svnrdump/dump_editor.c (original)
+++ subversion/trunk/subversion/svnrdump/dump_editor.c Thu Sep  8 20:58:11 2011
@@ -888,6 +888,11 @@ svn_rdump__get_dump_editor(const svn_del
   *editor = de;
 
   /* Wrap this editor in a cancellation editor. */
-  return svn_delta_get_cancellation_editor(cancel_func, cancel_baton,
-                                           de, eb, editor, edit_baton, pool);
+  SVN_ERR(svn_delta_get_cancellation_editor(cancel_func, cancel_baton,
+                                            de, eb, editor, edit_baton, pool));
+
+  SVN_ERR(svn_editor__insert_shims(editor, edit_baton, *editor, *edit_baton,
+                                   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=1166900&r1=1166899&r2=1166900&view=diff
==============================================================================
--- subversion/trunk/subversion/svnsync/main.c (original)
+++ subversion/trunk/subversion/svnsync/main.c Thu Sep  8 20:58:11 2011
@@ -1118,6 +1118,9 @@ replay_rev_started(svn_revnum_t revision
   *editor = cancel_editor;
   *edit_baton = cancel_baton;
 
+  SVN_ERR(svn_editor__insert_shims(editor, edit_baton, *editor, *edit_baton,
+                                   pool, pool));
+
   return SVN_NO_ERROR;
 }
 



Mime
View raw message