[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] Fix for Issue #651

From: <cmpilato_at_collab.net>
Date: 2002-04-25 22:26:22 CEST

Move deltification outside the commit process. The addresses Issue #651.

   ### REVIEW ME REVIEW ME REVIEW ME ###

   Though the deltification has been moved outside of the commit
   process...it's still in the same *process (pid)*, ya know? That
   is, ra-local still does the deltification before returning the
   commit's success to the user. Now, mod-dav-svn is (I *think*)
   finished transmitting the successful commit MERGE response back to
   the client before running the deltification, so that's goodness
   (before, the deltification ran before mod-dav-svn transmitted a
   single thing back to the client).
   
   Also, issue #651 calls for a property to be set on the revision,
   but Karl and I agreed that since an undeltified tree can be so
   determined by inspection, the metadata was an unnecessary
   invitation for mis-information.

* subversion/libsvn_fs/dag.c
  (stabilize_node): No longer call svn_fs__stable_node().

* subversion/mod_dav_svn/merge.c
  (dav_svn__merge_response): Perform post-commit deltification.

* subversion/libsvn_ra_local/commit_editor.c
  (close_edit): Perform post-commit deltification.

--
Index: ./subversion/libsvn_fs/dag.c
===================================================================
--- ./subversion/libsvn_fs/dag.c
+++ ./subversion/libsvn_fs/dag.c	Thu Apr 25 14:42:31 2002
@@ -1858,12 +1858,12 @@
 }
 
 
-/* If NODE is mutable, call svn_fs__stable_node(NODE) and make NODE
-   immutable (after recursively stabilizing all of its mutable
-   descendants), by setting it's revision to REV and immutating any
-   mutable representations referred to by NODE, as part of TRAIL.
-   NODE's revision skel is not reallocated, however its data field
-   will be allocated in TRAIL->pool.
+/* If NODE is mutable, make it immutable (after recursively
+   stabilizing all of its mutable descendants), by setting it's
+   revision to REV and immutating any mutable representations referred
+   to by NODE, as part of TRAIL.  NODE's revision skel is not
+   reallocated, however its data field will be allocated in
+   TRAIL->pool.
 
    If NODE is immutable, do nothing. */
 static svn_error_t *
@@ -1900,7 +1900,6 @@
         abort ();
       
       SVN_ERR (make_node_immutable (node, rev, trail));
-      SVN_ERR (svn_fs__stable_node (node->fs, node->id, trail));
     }
 
   return SVN_NO_ERROR;
Index: ./subversion/libsvn_ra_local/commit_editor.c
===================================================================
--- ./subversion/libsvn_ra_local/commit_editor.c
+++ ./subversion/libsvn_ra_local/commit_editor.c	Thu Apr 25 15:00:45 2002
@@ -481,6 +481,15 @@
       return err;
     }
 
+  /* Perform post-commit deltification. */
+  {
+    svn_fs_root_t *root;
+    
+    SVN_ERR (svn_fs_revision_root (&root, svn_repos_fs (eb->repos),
+                                   new_revision, eb->pool));
+    SVN_ERR (svn_fs_deltify (root, "/", TRUE, eb->pool));
+  }
+
   /* Pass new revision information to the caller's hook.  Note that
      this hook is unrelated to the standard repository post-commit
      hooks.  See svn_repos.h for more on this. */
Index: ./subversion/mod_dav_svn/merge.c
===================================================================
--- ./subversion/mod_dav_svn/merge.c
+++ ./subversion/mod_dav_svn/merge.c	Thu Apr 25 15:01:29 2002
@@ -454,6 +454,13 @@
   /* send whatever is left in the brigade */
   (void) ap_pass_brigade(output, bb);
 
+  /* oh, and now go and deltify the new revision. */
+  if ((serr = svn_fs_deltify (committed_root, "/", TRUE, pool)))
+    {
+      return dav_svn_convert_err(serr, HTTP_INTERNAL_SERVER_ERROR,
+                                 "could not deltify the new revision.");
+    }
+
   return NULL;
 }
 
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Apr 25 22:30:24 2002

This is an archived mail posted to the Subversion Dev mailing list.