FreeBSD/contrib/subversion/subversion/libsvn_wc/wc_db_update_move.c
/* Send all notifications stored in the notification list, and then
 * remove the temporary database table. */
Send all notifications stored in the notification list, and then
remove the temporary database table.
Send all notifications stored in the notification list and then remove the temporary database table .
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;
  if (notify_func)
    {
      apr_pool_t *iterpool;
      svn_boolean_t have_row;
      SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
                                        STMT_SELECT_UPDATE_MOVE_LIST));
      SVN_ERR(svn_sqlite__step(&have_row, stmt));
      iterpool = svn_pool_create(scratch_pool);
      while (have_row)
        {
          const char *local_relpath;
          svn_wc_notify_action_t action;
          svn_wc_notify_t *notify;
          svn_pool_clear(iterpool);
          local_relpath = svn_sqlite__column_text(stmt, 0, NULL);
          action = svn_sqlite__column_int(stmt, 1);
          notify = svn_wc_create_notify(svn_dirent_join(wcroot->abspath,
                                                        local_relpath,
                                                        iterpool),
                                        action, iterpool);
          notify->kind = svn_sqlite__column_token(stmt, 2, kind_map_none);
          notify->content_state = svn_sqlite__column_int(stmt, 3);
          notify->prop_state = svn_sqlite__column_int(stmt, 4);
          notify->old_revision = old_revision;
          notify->revision = new_revision;
          notify_func(notify_baton, notify, scratch_pool);
          SVN_ERR(svn_sqlite__step(&have_row, stmt));
        }
      svn_pool_destroy(iterpool);
      SVN_ERR(svn_sqlite__reset(stmt));
    }
  SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
                                    STMT_FINALIZE_UPDATE_MOVE));
  SVN_ERR(svn_sqlite__step_done(stmt));
  return SVN_NO_ERROR;
}
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 ; if ( notify_func ) { apr_pool_t * iterpool ; svn_boolean_t have_row ; SVN_ERR ( svn_sqlite__get_statement ( & stmt , wcroot -> sdb , STMT_SELECT_UPDATE_MOVE_LIST ) ) ; SVN_ERR ( svn_sqlite__step ( & have_row , stmt ) ) ; iterpool = svn_pool_create ( scratch_pool ) ; while ( have_row ) { const char * local_relpath ; svn_wc_notify_action_t action ; svn_wc_notify_t * notify ; svn_pool_clear ( iterpool ) ; local_relpath = svn_sqlite__column_text ( stmt , 0 , NULL ) ; action = svn_sqlite__column_int ( stmt , 1 ) ; notify = svn_wc_create_notify ( svn_dirent_join ( wcroot -> abspath , local_relpath , iterpool ) , action , iterpool ) ; notify -> kind = svn_sqlite__column_token ( stmt , 2 , kind_map_none ) ; notify -> content_state = svn_sqlite__column_int ( stmt , 3 ) ; notify -> prop_state = svn_sqlite__column_int ( stmt , 4 ) ; notify -> old_revision = old_revision ; notify -> revision = new_revision ; notify_func ( notify_baton , notify , scratch_pool ) ; SVN_ERR ( svn_sqlite__step ( & have_row , stmt ) ) ; } svn_pool_destroy ( iterpool ) ; SVN_ERR ( svn_sqlite__reset ( stmt ) ) ; } SVN_ERR ( svn_sqlite__get_statement ( & stmt , wcroot -> sdb , STMT_FINALIZE_UPDATE_MOVE ) ) ; SVN_ERR ( svn_sqlite__step_done ( stmt ) ) ; return SVN_NO_ERROR ; }
Send all notifications stored in the notification list, and then
 remove the temporary database table.
Send all notifications stored in the notification list and then remove the temporary database table .