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 2012/05/07 19:59:28 UTC

svn commit: r1335160 - /subversion/trunk/subversion/libsvn_fs/editor.c

Author: hwright
Date: Mon May  7 17:59:28 2012
New Revision: 1335160

URL: http://svn.apache.org/viewvc?rev=1335160&view=rev
Log:
alter_file() can set either the props or the content or both, but is not
required to set both.  Allow this either/or behavior in the FS receiver.

* subversion/libsvn_fs/editor.c
  (alter_file_cb): Allow changing the props or the content without the other.

Modified:
    subversion/trunk/subversion/libsvn_fs/editor.c

Modified: subversion/trunk/subversion/libsvn_fs/editor.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs/editor.c?rev=1335160&r1=1335159&r2=1335160&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs/editor.c (original)
+++ subversion/trunk/subversion/libsvn_fs/editor.c Mon May  7 17:59:28 2012
@@ -410,9 +410,17 @@ alter_file_cb(void *baton,
   SVN_ERR(get_root(&root, eb));
   SVN_ERR(can_modify(root, fspath, revision, scratch_pool));
 
-  SVN_ERR(set_text(root, fspath, checksum, contents,
-                   eb->cancel_func, eb->cancel_baton, scratch_pool));
-  SVN_ERR(alter_props(root, fspath, props, scratch_pool));
+  if (contents != NULL)
+    {
+      SVN_ERR_ASSERT(checksum != NULL);
+      SVN_ERR(set_text(root, fspath, checksum, contents,
+                       eb->cancel_func, eb->cancel_baton, scratch_pool));
+    }
+
+  if (props != NULL)
+    {
+      SVN_ERR(alter_props(root, fspath, props, scratch_pool));
+    }
 
   return SVN_NO_ERROR;
 }