You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by gs...@apache.org on 2010/04/28 05:58:41 UTC

svn commit: r938774 - in /subversion/trunk/subversion/libsvn_wc: wc_db.c wc_db.h workqueue.c

Author: gstein
Date: Wed Apr 28 03:58:41 2010
New Revision: 938774

URL: http://svn.apache.org/viewvc?rev=938774&view=rev
Log:
Provide a mechanism for passing work items into the commit processing.

* subversion/libsvn_wc/wc_db.h:
  (svn_wc__db_global_commit): add WORK_ITEMS parameter

* subversion/libsvn_wc/wc_db.c:
  (struct commit_baton): add WORK_ITEMS member
  (commit_node): queue any work items that were provided
  (svn_wc__db_global_commit): add WORK_ITEMS parameter and store into the
    baton for queueing within the transaction.

* subversion/libsvn_wc/workqueue.c:
  (log_do_committed): adjust the calls to db_global_commits

Modified:
    subversion/trunk/subversion/libsvn_wc/wc_db.c
    subversion/trunk/subversion/libsvn_wc/wc_db.h
    subversion/trunk/subversion/libsvn_wc/workqueue.c

Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=938774&r1=938773&r2=938774&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Wed Apr 28 03:58:41 2010
@@ -4533,6 +4533,8 @@ struct commit_baton {
 
   apr_int64_t repos_id;
   const char *repos_relpath;
+
+  const svn_skel_t *work_items;
 };
 
 
@@ -4731,6 +4733,9 @@ commit_node(void *baton, svn_sqlite__db_
       /* ### process the children  */
     }
 
+  /* Install any work items into the queue, as part of this transaction.  */
+  SVN_ERR(add_work_items(sdb, cb->work_items, scratch_pool));
+
   return SVN_NO_ERROR;
 }
 
@@ -4814,6 +4819,7 @@ svn_wc__db_global_commit(svn_wc__db_t *d
                          const apr_array_header_t *new_children,
                          apr_hash_t *new_dav_cache,
                          svn_boolean_t keep_changelist,
+                         const svn_skel_t *work_items,
                          apr_pool_t *scratch_pool)
 {
   svn_wc__db_pdh_t *pdh;
@@ -4839,6 +4845,7 @@ svn_wc__db_global_commit(svn_wc__db_t *d
   cb.new_children = new_children;
   cb.new_dav_cache = new_dav_cache;
   cb.keep_changelist = keep_changelist;
+  cb.work_items = work_items;
 
   /* If we are adding a directory (no BASE_NODE), then we need to get
      repository information from an ancestor node (start scanning from the

Modified: subversion/trunk/subversion/libsvn_wc/wc_db.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.h?rev=938774&r1=938773&r2=938774&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.h (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.h Wed Apr 28 03:58:41 2010
@@ -1522,6 +1522,8 @@ svn_wc__db_global_relocate(svn_wc__db_t 
      files: NEW_CHILDREN should be NULL
      dirs: NEW_CHECKSUM should be NULL
      symlinks: both should be NULL
+
+   WORK_ITEMS will be place into the work queue.
 */
 svn_error_t *
 svn_wc__db_global_commit(svn_wc__db_t *db,
@@ -1533,6 +1535,7 @@ svn_wc__db_global_commit(svn_wc__db_t *d
                          const apr_array_header_t *new_children,
                          apr_hash_t *new_dav_cache,
                          svn_boolean_t keep_changelist,
+                         const svn_skel_t *work_items,
                          apr_pool_t *scratch_pool);
 
 

Modified: subversion/trunk/subversion/libsvn_wc/workqueue.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/workqueue.c?rev=938774&r1=938773&r2=938774&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/workqueue.c (original)
+++ subversion/trunk/subversion/libsvn_wc/workqueue.c Wed Apr 28 03:58:41 2010
@@ -1407,6 +1407,7 @@ log_do_committed(svn_wc__db_t *db,
                                        NULL /* new_children */,
                                        new_dav_cache,
                                        keep_changelist,
+                                       NULL /* work_items */,
                                        pool));
 
       /* Install the new file, which may involve expanding keywords.
@@ -1487,6 +1488,7 @@ log_do_committed(svn_wc__db_t *db,
                                    NULL /* new_children */,
                                    new_dav_cache,
                                    keep_changelist,
+                                   NULL /* work_items */,
                                    pool));
 
   /* For directories, we also have to reset the state in the parent's