subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From phi...@apache.org
Subject svn commit: r1446163 - in /subversion/trunk/subversion/libsvn_wc: externals.c update_editor.c wc_db.c wc_db.h wc_db_private.h wc_db_update_move.c
Date Thu, 14 Feb 2013 13:14:00 GMT
Author: philip
Date: Thu Feb 14 13:13:59 2013
New Revision: 1446163

URL: http://svn.apache.org/r1446163
Log:
Add notification for tree-conflicts raised during move-update bumping.

* subversion/libsvn_wc/wc_db_private.h
  (svn_wc__db_update_move_list_notify): New.

* subversion/libsvn_wc/wc_db_update_move.c
  (update_move_list_notify): Rename to ...
  (svn_wc__db_update_move_list_notify): ... this.
  (tc_editor_complete,
   svn_wc__db_resolve_delete_raise_moved_away): Adjust call.
  (bump_mark_tree_conflict): Add notification parameters, store notification.
  (bump_moved_away): Add notification parameters.
  (svn_wc__db_bump_moved_away): Add notification parameters, create
   notification list.

* subversion/libsvn_wc/wc_db.h
  (svn_wc__db_op_bump_revisions_post_update): Add notification parameters.

* subversion/libsvn_wc/wc_db.c
  (bump_revisions_post_update): Add notification parameters, produce
   notifications.
  (svn_wc__db_op_bump_revisions_post_update): Add notification parameters.

* subversion/libsvn_wc/externals.c
  (close_edit): Pass notification variables.

* subversion/libsvn_wc/update_editor.c
  (close_edit): Pass notification variables.

Modified:
    subversion/trunk/subversion/libsvn_wc/externals.c
    subversion/trunk/subversion/libsvn_wc/update_editor.c
    subversion/trunk/subversion/libsvn_wc/wc_db.c
    subversion/trunk/subversion/libsvn_wc/wc_db.h
    subversion/trunk/subversion/libsvn_wc/wc_db_private.h
    subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c

Modified: subversion/trunk/subversion/libsvn_wc/externals.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/externals.c?rev=1446163&r1=1446162&r2=1446163&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/externals.c (original)
+++ subversion/trunk/subversion/libsvn_wc/externals.c Thu Feb 14 13:13:59 2013
@@ -965,6 +965,8 @@ close_edit(void *edit_baton,
                                                        *eb->target_revision,
                                                        apr_hash_make(pool),
                                                        wcroot_iprops,
+                                                       eb->notify_func,
+                                                       eb->notify_baton,
                                                        pool));
     }
 

Modified: subversion/trunk/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/update_editor.c?rev=1446163&r1=1446162&r2=1446163&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/trunk/subversion/libsvn_wc/update_editor.c Thu Feb 14 13:13:59 2013
@@ -4593,6 +4593,8 @@ close_edit(void *edit_baton,
                                                        *(eb->target_revision),
                                                        eb->skipped_trees,
                                                        eb->wcroot_iprops,
+                                                       eb->notify_func,
+                                                       eb->notify_baton,
                                                        eb->pool));
 
       if (*eb->target_basename != '\0')

Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1446163&r1=1446162&r2=1446163&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Thu Feb 14 13:13:59 2013
@@ -10760,6 +10760,8 @@ bump_revisions_post_update(svn_wc__db_wc
                            svn_revnum_t new_revision,
                            apr_hash_t *exclude_relpaths,
                            apr_hash_t *wcroot_iprops,
+                           svn_wc_notify_func2_t notify_func,
+                           void *notify_baton,
                            apr_pool_t *scratch_pool)
 {
   svn_wc__db_status_t status;
@@ -10805,7 +10807,11 @@ bump_revisions_post_update(svn_wc__db_wc
                              scratch_pool));
 
   SVN_ERR(svn_wc__db_bump_moved_away(wcroot, local_relpath, depth, db,
-                                     scratch_pool));
+                                     notify_func, notify_baton, scratch_pool));
+
+  SVN_ERR(svn_wc__db_update_move_list_notify(wcroot, SVN_INVALID_REVNUM,
+                                             SVN_INVALID_REVNUM, notify_func,
+                                             notify_baton, scratch_pool));
 
   return SVN_NO_ERROR;
 }
@@ -10820,6 +10826,8 @@ svn_wc__db_op_bump_revisions_post_update
                                          svn_revnum_t new_revision,
                                          apr_hash_t *exclude_relpaths,
                                          apr_hash_t *wcroot_iprops,
+                                         svn_wc_notify_func2_t notify_func,
+                                         void *notify_baton,
                                          apr_pool_t *scratch_pool)
 {
   const char *local_relpath;
@@ -10840,7 +10848,8 @@ svn_wc__db_op_bump_revisions_post_update
     bump_revisions_post_update(wcroot, local_relpath, db,
                                depth, new_repos_relpath, new_repos_root_url,
                                new_repos_uuid, new_revision,
-                               exclude_relpaths, wcroot_iprops, scratch_pool),
+                               exclude_relpaths, wcroot_iprops,
+                               notify_func, notify_baton, scratch_pool),
     wcroot);
 
   return SVN_NO_ERROR;

Modified: subversion/trunk/subversion/libsvn_wc/wc_db.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.h?rev=1446163&r1=1446162&r2=1446163&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.h (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.h Thu Feb 14 13:13:59 2013
@@ -2499,6 +2499,8 @@ svn_wc__db_op_bump_revisions_post_update
                                          svn_revnum_t new_revision,
                                          apr_hash_t *exclude_relpaths,
                                          apr_hash_t *wcroot_iprops,
+                                         svn_wc_notify_func2_t notify_func,
+                                         void *notify_baton,
                                          apr_pool_t *scratch_pool);
 
 

Modified: subversion/trunk/subversion/libsvn_wc/wc_db_private.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db_private.h?rev=1446163&r1=1446162&r2=1446163&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db_private.h (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db_private.h Thu Feb 14 13:13:59 2013
@@ -429,6 +429,8 @@ svn_wc__db_bump_moved_away(svn_wc__db_wc
                            const char *local_relpath,
                            svn_depth_t depth,
                            svn_wc__db_t *db,
+                           svn_wc_notify_func2_t notify_func,
+                           void *notify_baton,
                            apr_pool_t *scratch_pool);
 
 svn_error_t *
@@ -436,4 +438,12 @@ svn_wc__db_resolve_break_moved_away_inte
                                              const char *local_relpath,
                                              apr_pool_t *scratch_pool);
 
+svn_error_t *
+svn_wc__db_update_move_list_notify(svn_wc__db_wcroot_t *wcroot,
+                                   svn_revnum_t old_revision,
+                                   svn_revnum_t new_revision,
+                                   svn_wc_notify_func2_t notify_func,
+                                   void *notify_baton,
+                                   apr_pool_t *scratch_pool);
+
 #endif /* WC_DB_PRIVATE_H */

Modified: subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c?rev=1446163&r1=1446162&r2=1446163&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c Thu Feb 14 13:13:59 2013
@@ -161,13 +161,13 @@ update_move_list_add(svn_wc__db_wcroot_t
 
 /* Send all notifications stored in the notification list, and then
  * remove the temporary database table. */
-static svn_error_t *
-update_move_list_notify(svn_wc__db_wcroot_t *wcroot,
-                        svn_revnum_t old_revision,
-                        svn_revnum_t new_revision,
-                        svn_wc_notify_func2_t notify_func,
-                        void *notify_baton,
-                        apr_pool_t *scratch_pool)
+svn_error_t *
+svn_wc__db_update_move_list_notify(svn_wc__db_wcroot_t *wcroot,
+                                   svn_revnum_t old_revision,
+                                   svn_revnum_t new_revision,
+                                   svn_wc_notify_func2_t notify_func,
+                                   void *notify_baton,
+                                   apr_pool_t *scratch_pool)
 {
   svn_sqlite__stmt_t *stmt;
 
@@ -1235,11 +1235,11 @@ tc_editor_complete(void *baton,
      ### This is notifying too early.  One reason for using the
      ### update_move_list is to do the notifications after the
      ### transaction has completeted. */
-  SVN_ERR(update_move_list_notify(b->wcroot,
-                                  b->old_version->peg_rev,
-                                  b->new_version->peg_rev,
-                                  b->notify_func, b->notify_baton,
-                                  scratch_pool));
+  SVN_ERR(svn_wc__db_update_move_list_notify(b->wcroot,
+                                             b->old_version->peg_rev,
+                                             b->new_version->peg_rev,
+                                             b->notify_func, b->notify_baton,
+                                             scratch_pool));
   if (b->notify_func)
     {
       svn_wc_notify_t *notify;
@@ -1981,6 +1981,8 @@ bump_mark_tree_conflict(svn_wc__db_wcroo
                         const char *move_src_root_relpath,
                         const char *move_src_op_root_relpath,
                         svn_wc__db_t *db,
+                        svn_wc_notify_func2_t notify_func,
+                        void *notify_baton,
                         apr_pool_t *scratch_pool)
 {
   svn_skel_t *conflict = svn_wc__conflict_skel_create(scratch_pool);
@@ -2003,6 +2005,12 @@ bump_mark_tree_conflict(svn_wc__db_wcroo
   SVN_ERR(svn_wc__db_mark_conflict_internal(wcroot, move_src_root_relpath,
                                             conflict, scratch_pool));
 
+  if (notify_func)
+    SVN_ERR(update_move_list_add(wcroot, move_src_root_relpath,
+                                 svn_wc_notify_tree_conflict,
+                                 svn_node_dir,
+                                 svn_wc_notify_state_inapplicable,
+                                 svn_wc_notify_state_inapplicable));
   return SVN_NO_ERROR;
 }
 
@@ -2017,6 +2025,8 @@ bump_moved_away(svn_wc__db_wcroot_t *wcr
                 apr_hash_t *src_done,
                 svn_depth_t depth,
                 svn_wc__db_t *db,
+                svn_wc_notify_func2_t notify_func,
+                void *notify_baton,
                 apr_pool_t *result_pool,
                 apr_pool_t *scratch_pool)
 {
@@ -2111,7 +2121,8 @@ bump_moved_away(svn_wc__db_wcroot_t *wcr
                 {
                   err = bump_mark_tree_conflict(wcroot, src_relpath,
                                                 src_root_relpath,
-                                                db, scratch_pool);
+                                                db, notify_func, notify_baton,
+                                                scratch_pool);
                   if (err)
                     return svn_error_compose_create(err,
                                                     svn_sqlite__reset(stmt));
@@ -2141,6 +2152,7 @@ bump_moved_away(svn_wc__db_wcroot_t *wcr
                         err = bump_moved_away(wcroot, dst_relpath,
                                               relpath_depth(dst_relpath),
                                               src_done, depth, db,
+                                              notify_func, notify_baton,
                                               result_pool, iterpool);
                     }
                 }
@@ -2164,12 +2176,17 @@ svn_wc__db_bump_moved_away(svn_wc__db_wc
                            const char *local_relpath,
                            svn_depth_t depth,
                            svn_wc__db_t *db,
+                           svn_wc_notify_func2_t notify_func,
+                           void *notify_baton,
                            apr_pool_t *scratch_pool)
 {
   const char *dummy1, *dummy2;
   const char *move_src_root_relpath, *move_src_op_root_relpath;
   apr_hash_t *src_done;
 
+  SVN_ERR(svn_sqlite__exec_statements(wcroot->sdb,
+                                      STMT_CREATE_UPDATE_MOVE_LIST));
+
   SVN_ERR(svn_wc__db_op_depth_moved_to(&dummy1, &dummy2,
                                        &move_src_root_relpath,
                                        &move_src_op_root_relpath, 0,
@@ -2182,7 +2199,8 @@ svn_wc__db_bump_moved_away(svn_wc__db_wc
         {
           SVN_ERR(bump_mark_tree_conflict(wcroot, move_src_root_relpath,
                                           move_src_op_root_relpath,
-                                          db, scratch_pool));
+                                          db, notify_func, notify_baton,
+                                          scratch_pool));
           return SVN_NO_ERROR;
         }
 
@@ -2190,6 +2208,7 @@ svn_wc__db_bump_moved_away(svn_wc__db_wc
 
   src_done = apr_hash_make(scratch_pool);
   SVN_ERR(bump_moved_away(wcroot, local_relpath, 0, src_done, depth, db,
+                          notify_func, notify_baton,
                           scratch_pool, scratch_pool));
 
   return SVN_NO_ERROR;
@@ -2287,13 +2306,13 @@ svn_wc__db_resolve_delete_raise_moved_aw
                                     scratch_pool),
     wcroot);
 
-  SVN_ERR(update_move_list_notify(wcroot,
-                                  old_version->peg_rev,
-                                  (new_version 
-                                   ? new_version->peg_rev
-                                   : SVN_INVALID_REVNUM),
-                                  notify_func, notify_baton,
-                                  scratch_pool));
+  SVN_ERR(svn_wc__db_update_move_list_notify(wcroot,
+                                             old_version->peg_rev,
+                                             (new_version 
+                                              ? new_version->peg_rev
+                                              : SVN_INVALID_REVNUM),
+                                             notify_func, notify_baton,
+                                             scratch_pool));
 
   return SVN_NO_ERROR;
 }



Mime
View raw message