FreeBSD/contrib/subversion/subversion/libsvn_client/status.c
/* A status callback function which wraps the *real* status
   function/baton.   This sucker takes care of any status tweaks we
   need to make (such as noting that the target of the status is
   missing from HEAD in the repository).

   This implements the 'svn_wc_status_func4_t' function type.  */
A status callback function which wraps the *real* status
function/baton.   This sucker takes care of any status tweaks we
need to make (such as noting that the target of the status is
missing from HEAD in the repository).

This implements the 'svn_wc_status_func4_t' function type.
A status callback function which wraps the * real * status function / baton . This sucker takes care of any status tweaks we need to make ( such as noting that the target of the status is missing from HEAD in the repository ) . This implements the ' svn_wc_status_func4_t ' function type .
static svn_error_t *
tweak_status(void *baton,
             const char *local_abspath,
             const svn_wc_status3_t *status,
             apr_pool_t *scratch_pool)
{
  struct status_baton *sb = baton;
  const char *path = local_abspath;
  svn_client_status_t *cst;
  if (sb->anchor_abspath)
    path = svn_dirent_join(sb->anchor_relpath,
                           svn_dirent_skip_ancestor(sb->anchor_abspath, path),
                           scratch_pool);
  if (sb->changelist_hash
      && (! status->changelist
          || ! svn_hash_gets(sb->changelist_hash, status->changelist)))
    {
      return SVN_NO_ERROR;
    }
  if (sb->deleted_in_repos)
    {
      svn_wc_status3_t *new_status = svn_wc_dup_status3(status, scratch_pool);
      new_status->repos_node_status = svn_wc_status_deleted;
      status = new_status;
    }
  SVN_ERR(svn_client__create_status(&cst, sb->wc_ctx, local_abspath, status,
                                    scratch_pool, scratch_pool));
  return sb->real_status_func(sb->real_status_baton, path, cst,
                              scratch_pool);
}
static svn_error_t * tweak_status ( void * baton , const char * local_abspath , const svn_wc_status3_t * status , apr_pool_t * scratch_pool ) { struct status_baton * sb = baton ; const char * path = local_abspath ; svn_client_status_t * cst ; if ( sb -> anchor_abspath ) path = svn_dirent_join ( sb -> anchor_relpath , svn_dirent_skip_ancestor ( sb -> anchor_abspath , path ) , scratch_pool ) ; if ( sb -> changelist_hash && ( ! status -> changelist || ! svn_hash_gets ( sb -> changelist_hash , status -> changelist ) ) ) { return SVN_NO_ERROR ; } if ( sb -> deleted_in_repos ) { svn_wc_status3_t * new_status = svn_wc_dup_status3 ( status , scratch_pool ) ; new_status -> repos_node_status = svn_wc_status_deleted ; status = new_status ; } SVN_ERR ( svn_client__create_status ( & cst , sb -> wc_ctx , local_abspath , status , scratch_pool , scratch_pool ) ) ; return sb -> real_status_func ( sb -> real_status_baton , path , cst , scratch_pool ) ; }
A status callback function which wraps the *real* status
function/baton.
A status callback function which wraps the * real * status function / baton .
/* If the status item has an entry, but doesn't belong to one of the
     changelists our caller is interested in, we filter out this status
     transmission.  */ /* If we know that the target was deleted in HEAD of the repository,
     we need to note that fact in all the status structures that come
     through here. */ /* Call the real status function/baton. */