FreeBSD/contrib/subversion/subversion/libsvn_client/delete.c
/* An svn_wc_status_func4_t callback function for finding
   status structures which are not safely deletable. */
An svn_wc_status_func4_t callback function for finding
status structures which are not safely deletable.
An svn_wc_status_func4_t callback function for finding status structures which are not safely deletable .
static svn_error_t *
find_undeletables(void *baton,
                  const char *local_abspath,
                  const svn_wc_status3_t *status,
                  apr_pool_t *pool)
{
  if (status->node_status == svn_wc_status_missing)
    {
      struct can_delete_baton_t *cdt = baton;
      if (strcmp(cdt->root_abspath, local_abspath) == 0)
        cdt->target_missing = TRUE;
    }
  if (status->node_status == svn_wc_status_obstructed)
    return svn_error_createf(SVN_ERR_NODE_UNEXPECTED_KIND, NULL,
                             _("'%s' is in the way of the resource "
                               "actually under version control"),
                             svn_dirent_local_style(local_abspath, pool));
  else if (! status->versioned)
    return svn_error_createf(SVN_ERR_UNVERSIONED_RESOURCE, NULL,
                             _("'%s' is not under version control"),
                             svn_dirent_local_style(local_abspath, pool));
  else if ((status->node_status == svn_wc_status_added
            || status->node_status == svn_wc_status_replaced)
           && status->text_status == svn_wc_status_normal
           && (status->prop_status == svn_wc_status_normal
               || status->prop_status == svn_wc_status_none))
    {
    }
  else if (status->node_status != svn_wc_status_normal
           && status->node_status != svn_wc_status_deleted
           && status->node_status != svn_wc_status_missing)
    return svn_error_createf(SVN_ERR_CLIENT_MODIFIED, NULL,
                             _("'%s' has local modifications -- commit or "
                               "revert them first"),
                             svn_dirent_local_style(local_abspath, pool));
  return SVN_NO_ERROR;
}
static svn_error_t * find_undeletables ( void * baton , const char * local_abspath , const svn_wc_status3_t * status , apr_pool_t * pool ) { if ( status -> node_status == svn_wc_status_missing ) { struct can_delete_baton_t * cdt = baton ; if ( strcmp ( cdt -> root_abspath , local_abspath ) == 0 ) cdt -> target_missing = TRUE ; } if ( status -> node_status == svn_wc_status_obstructed ) return svn_error_createf ( SVN_ERR_NODE_UNEXPECTED_KIND , NULL , _ ( " " " " ) , svn_dirent_local_style ( local_abspath , pool ) ) ; else if ( ! status -> versioned ) return svn_error_createf ( SVN_ERR_UNVERSIONED_RESOURCE , NULL , _ ( " " ) , svn_dirent_local_style ( local_abspath , pool ) ) ; else if ( ( status -> node_status == svn_wc_status_added || status -> node_status == svn_wc_status_replaced ) && status -> text_status == svn_wc_status_normal && ( status -> prop_status == svn_wc_status_normal || status -> prop_status == svn_wc_status_none ) ) { } else if ( status -> node_status != svn_wc_status_normal && status -> node_status != svn_wc_status_deleted && status -> node_status != svn_wc_status_missing ) return svn_error_createf ( SVN_ERR_CLIENT_MODIFIED , NULL , _ ( " " " " ) , svn_dirent_local_style ( local_abspath , pool ) ) ; return SVN_NO_ERROR ; }
An svn_wc_status_func4_t callback function for finding
status structures which are not safely deletable.
An svn_wc_status_func4_t callback function for finding status structures which are not safely deletable .
/* Check for error-ful states. */ /* Unmodified copy. Go ahead, remove it */