FreeBSD/contrib/subversion/subversion/libsvn_wc/wc_db_update_move.c
/* Checks if a specific local path is shadowed as seen from the move root.
   Helper for update_moved_away_node() */
Checks if a specific local path is shadowed as seen from the move root.
Checks if a specific local path is shadowed as seen from the move root .
static svn_error_t *
check_node_shadowed(svn_boolean_t *shadowed,
                    svn_wc__db_wcroot_t *wcroot,
                    const char *local_relpath,
                    int move_root_dst_op_depth,
                    apr_pool_t *scratch_pool)
{
  svn_sqlite__stmt_t *stmt;
  svn_boolean_t have_row;
  SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
                                    STMT_SELECT_WORKING_NODE));
  SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, local_relpath));
  SVN_ERR(svn_sqlite__step(&have_row, stmt));
  if (have_row)
    {
      int op_depth = svn_sqlite__column_int(stmt, 0);
      *shadowed = (op_depth > move_root_dst_op_depth);
    }
  else
    *shadowed = FALSE;
  SVN_ERR(svn_sqlite__reset(stmt));
  return SVN_NO_ERROR;
}
static svn_error_t * check_node_shadowed ( svn_boolean_t * shadowed , svn_wc__db_wcroot_t * wcroot , const char * local_relpath , int move_root_dst_op_depth , apr_pool_t * scratch_pool ) { svn_sqlite__stmt_t * stmt ; svn_boolean_t have_row ; SVN_ERR ( svn_sqlite__get_statement ( & stmt , wcroot -> sdb , STMT_SELECT_WORKING_NODE ) ) ; SVN_ERR ( svn_sqlite__bindf ( stmt , " " , wcroot -> wc_id , local_relpath ) ) ; SVN_ERR ( svn_sqlite__step ( & have_row , stmt ) ) ; if ( have_row ) { int op_depth = svn_sqlite__column_int ( stmt , 0 ) ; * shadowed = ( op_depth > move_root_dst_op_depth ) ; } else * shadowed = FALSE ; SVN_ERR ( svn_sqlite__reset ( stmt ) ) ; return SVN_NO_ERROR ; }
Checks if a specific local path is shadowed as seen from the move root.
Checks if a specific local path is shadowed as seen from the move root .