You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Joe Swatosh <jo...@gmail.com> on 2009/06/06 15:43:35 UTC

[Patch-incomplete] fix regressions in deprecated libsvn_wc functions (addresses ruby bindings buildbot failures)

The ruby bindings have been segfaulting locally ever since the svnpatch was
merged to trunk.  I suspect the exact reasons for the segfaults has changed as
deprecated.c has been modified since then, but the problem seems to be the
"thunking" between the versions of the different apis and editors.

I don't believe this patch addresses all of the possible regressions.
It merely
addresses the issues that caused the ruby bindings segfaults.  It may
or may not
address the Python bindings segfaults.  I am hoping that this will inspire
someone with expertise in libsvn_wc to take a closer look.

I'd like to suggest that perhaps we need a tiered testing strategy that keeps
around the tests of the deprecated apis (perhaps we do and I just don't know
about it).  These tests would be run by the buildbots, but (to save time) not
necessarily every time by the developers.

Enough talk-talk below is the patch.

--
Joe



Index: subversion/libsvn_wc/deprecated.c
===================================================================
--- subversion/libsvn_wc/deprecated.c   (revision 37947)
+++ subversion/libsvn_wc/deprecated.c   (working copy)
@@ -928,6 +928,34 @@
 /* An svn_wc_diff_callbacks4_t function for wrapping
  * svn_wc_diff_callbacks3_t. */
 static svn_error_t *
+file_changed3(svn_wc_adm_access_t *adm_access,
+              svn_wc_notify_state_t *contentstate,
+              svn_wc_notify_state_t *propstate,
+              svn_boolean_t *tree_conflicted,
+              const char *path,
+              const char *tmpfile1,
+              const char *tmpfile2,
+              svn_revnum_t rev1,
+              svn_revnum_t rev2,
+              const char *mimetype1,
+              const char *mimetype2,
+              const apr_array_header_t *propchanges,
+              apr_hash_t *originalprops,
+              void *diff_baton)
+{
+  struct callbacks3_wrapper_baton *b = diff_baton;
+
+  if (tree_conflicted)
+    *tree_conflicted = FALSE;
+
+  return b->callbacks3->file_changed(adm_access, contentstate,
propstate, tree_conflicted,
+                                     path, tmpfile1, tmpfile2,
+                                     rev1, rev2, mimetype1, mimetype2,
+                                     propchanges, originalprops, b->baton);
+}
+/* An svn_wc_diff_callbacks4_t function for wrapping
+ * svn_wc_diff_callbacks3_t. */
+static svn_error_t *
 file_added3(svn_wc_adm_access_t *adm_access,
             svn_wc_notify_state_t *contentstate,
             svn_wc_notify_state_t *propstate,
@@ -970,14 +998,29 @@
   return b->callbacks3->dir_added(adm_access, state, tree_conflicted,
path, rev, b->baton);
 }

+static svn_error_t *
+dir_props_changed3(svn_wc_adm_access_t *adm_access,
+                  svn_wc_notify_state_t *state,
+                  svn_boolean_t *tree_conflicted,
+                  const char *path,
+                  const apr_array_header_t *propchanges,
+                  apr_hash_t *originalprops,
+                  void *diff_baton)
+{
+  struct callbacks3_wrapper_baton *b = diff_baton;
+  if (tree_conflicted)
+    *tree_conflicted = FALSE;
+  return b->callbacks3->dir_props_changed(adm_access, state,
tree_conflicted, path, propchanges,
+                                          originalprops, b->baton);
+}
 /* Used to wrap svn_diff_callbacks3_t as an svn_wc_diff_callbacks4_t. */
 static struct svn_wc_diff_callbacks4_t callbacks3_wrapper = {
-  file_changed2,
+  file_changed3,
   file_added3,
   file_deleted2,
   dir_added3,
   dir_deleted2,
-  dir_props_changed2,
+  dir_props_changed3,
   dir_opened,
   dir_closed
 };

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