You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2011/11/03 22:47:44 UTC

svn commit: r1197322 - /subversion/trunk/subversion/libsvn_delta/compat.c

Author: hwright
Date: Thu Nov  3 21:47:44 2011
New Revision: 1197322

URL: http://svn.apache.org/viewvc?rev=1197322&view=rev
Log:
Ev2 shims: open batons and close them if needed.

* subversion/libsvn_delta/compat.c
  (drive): Open child batons, depending on kind.  Close file batons.

Modified:
    subversion/trunk/subversion/libsvn_delta/compat.c

Modified: subversion/trunk/subversion/libsvn_delta/compat.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_delta/compat.c?rev=1197322&r1=1197321&r2=1197322&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_delta/compat.c (original)
+++ subversion/trunk/subversion/libsvn_delta/compat.c Thu Nov  3 21:47:44 2011
@@ -1012,6 +1012,18 @@ drive(const struct operation *operation,
       child = svn__apr_hash_index_val(hi);
       path = svn__apr_hash_index_key(hi);
 
+      if (child->operation == OP_OPEN || child->operation == OP_PROPSET)
+        {
+          if (child->kind == svn_kind_dir)
+            SVN_ERR(editor->open_directory(path, operation->baton,
+                                           SVN_INVALID_REVNUM,
+                                           iterpool, &child->baton));
+          else
+            SVN_ERR(editor->open_file(path, operation->baton,
+                                      SVN_INVALID_REVNUM,
+                                      iterpool, &child->baton));
+        }
+
       if (child->operation == OP_ADD)
         {
           if (child->kind == svn_kind_dir)
@@ -1042,6 +1054,11 @@ drive(const struct operation *operation,
           SVN_ERR(svn_stream_close(contents));
         }
 
+      if (file_baton)
+        {
+          SVN_ERR(editor->close_file(file_baton, NULL, iterpool));
+        }
+
       /*SVN_DBG(("child: '%s'; operation: %d\n", path, child->operation));*/
       if (child->kind == svn_kind_dir)
         SVN_ERR(drive(child, editor, iterpool));