FreeBSD/contrib/subversion/subversion/libsvn_wc/wc_db_update_move.c
/* Set *CAN_BUMP to TRUE if DEPTH is sufficient to cover the entire
   tree  LOCAL_RELPATH at OP_DEPTH, to FALSE otherwise. */
Set *CAN_BUMP to TRUE if DEPTH is sufficient to cover the entire
tree  LOCAL_RELPATH at OP_DEPTH, to FALSE otherwise.
Set * CAN_BUMP to TRUE if DEPTH is sufficient to cover the entire tree LOCAL_RELPATH at OP_DEPTH to FALSE otherwise .
static svn_error_t *
depth_sufficient_to_bump(svn_boolean_t *can_bump,
                         svn_wc__db_wcroot_t *wcroot,
                         const char *local_relpath,
                         int op_depth,
                         svn_depth_t depth,
                         apr_pool_t *scratch_pool)
{
  svn_sqlite__stmt_t *stmt;
  svn_boolean_t have_row;
  switch (depth)
    {
    case svn_depth_infinity:
      *can_bump = TRUE;
      return SVN_NO_ERROR;
    case svn_depth_empty:
      SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
                                        STMT_SELECT_OP_DEPTH_CHILDREN));
      SVN_ERR(svn_sqlite__bindf(stmt, "isd", wcroot->wc_id,
                                local_relpath, op_depth));
      break;
    case svn_depth_files:
      SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
                                        STMT_SELECT_HAS_NON_FILE_CHILDREN));
      SVN_ERR(svn_sqlite__bindf(stmt, "isd", wcroot->wc_id,
                                local_relpath, op_depth));
      break;
    case svn_depth_immediates:
      SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
                                        STMT_SELECT_HAS_GRANDCHILDREN));
      SVN_ERR(svn_sqlite__bindf(stmt, "isd", wcroot->wc_id,
                                local_relpath, op_depth));
      break;
    default:
      SVN_ERR_MALFUNCTION();
    }
  SVN_ERR(svn_sqlite__step(&have_row, stmt));
  SVN_ERR(svn_sqlite__reset(stmt));
  *can_bump = !have_row;
  return SVN_NO_ERROR;
}
static svn_error_t * depth_sufficient_to_bump ( svn_boolean_t * can_bump , svn_wc__db_wcroot_t * wcroot , const char * local_relpath , int op_depth , svn_depth_t depth , apr_pool_t * scratch_pool ) { svn_sqlite__stmt_t * stmt ; svn_boolean_t have_row ; switch ( depth ) { case svn_depth_infinity : * can_bump = TRUE ; return SVN_NO_ERROR ; case svn_depth_empty : SVN_ERR ( svn_sqlite__get_statement ( & stmt , wcroot -> sdb , STMT_SELECT_OP_DEPTH_CHILDREN ) ) ; SVN_ERR ( svn_sqlite__bindf ( stmt , " " , wcroot -> wc_id , local_relpath , op_depth ) ) ; break ; case svn_depth_files : SVN_ERR ( svn_sqlite__get_statement ( & stmt , wcroot -> sdb , STMT_SELECT_HAS_NON_FILE_CHILDREN ) ) ; SVN_ERR ( svn_sqlite__bindf ( stmt , " " , wcroot -> wc_id , local_relpath , op_depth ) ) ; break ; case svn_depth_immediates : SVN_ERR ( svn_sqlite__get_statement ( & stmt , wcroot -> sdb , STMT_SELECT_HAS_GRANDCHILDREN ) ) ; SVN_ERR ( svn_sqlite__bindf ( stmt , " " , wcroot -> wc_id , local_relpath , op_depth ) ) ; break ; default : SVN_ERR_MALFUNCTION ( ) ; } SVN_ERR ( svn_sqlite__step ( & have_row , stmt ) ) ; SVN_ERR ( svn_sqlite__reset ( stmt ) ) ; * can_bump = ! have_row ; return SVN_NO_ERROR ; }
Set *CAN_BUMP to TRUE if DEPTH is sufficient to cover the entire
tree  LOCAL_RELPATH at OP_DEPTH, to FALSE otherwise.
Set * CAN_BUMP to TRUE if DEPTH is sufficient to cover the entire tree LOCAL_RELPATH at OP_DEPTH to FALSE otherwise .