FreeBSD/contrib/subversion/subversion/libsvn_client/diff.c
/* Perform a diff between two working-copy paths.

   PATH1 and PATH2 are both working copy paths.  REVISION1 and
   REVISION2 are their respective revisions.

   All other options are the same as those passed to svn_client_diff6(). */
Perform a diff between two working-copy paths.
PATH1 and PATH2 are both working copy paths.  REVISION1 and
REVISION2 are their respective revisions.

All other options are the same as those passed to svn_client_diff6().
Perform a diff between two working - copy paths . PATH1 and PATH2 are both working copy paths . REVISION1 and REVISION2 are their respective revisions . All other options are the same as those passed to svn_client_diff6 () .
static svn_error_t *
diff_wc_wc(const char **root_relpath,
           svn_boolean_t *root_is_dir,
           struct diff_driver_info_t *ddi,
           const char *path1,
           const svn_opt_revision_t *revision1,
           const char *path2,
           const svn_opt_revision_t *revision2,
           svn_depth_t depth,
           svn_boolean_t ignore_ancestry,
           const apr_array_header_t *changelists,
           const svn_diff_tree_processor_t *diff_processor,
           svn_client_ctx_t *ctx,
           apr_pool_t *result_pool,
           apr_pool_t *scratch_pool)
{
  const char *abspath1;
  SVN_ERR_ASSERT(! svn_path_is_url(path1));
  SVN_ERR_ASSERT(! svn_path_is_url(path2));
  SVN_ERR(svn_dirent_get_absolute(&abspath1, path1, scratch_pool));
  if ((strcmp(path1, path2) != 0)
      || (! ((revision1->kind == svn_opt_revision_base)
             && (revision2->kind == svn_opt_revision_working))))
    return unsupported_diff_error(
       svn_error_create(SVN_ERR_INCORRECT_PARAMS, NULL,
                        _("Only diffs between a path's text-base "
                          "and its working files are supported at this time"
                          )));
  if (ddi)
    {
      svn_node_kind_t kind;
      SVN_ERR(svn_wc_read_kind2(&kind, ctx->wc_ctx, abspath1,
                              TRUE, FALSE, scratch_pool));
      if (kind != svn_node_dir)
        ddi->anchor = svn_dirent_dirname(path1, scratch_pool);
      else
        ddi->anchor = path1;
    }
  SVN_ERR(svn_wc__diff7(root_relpath, root_is_dir,
                        ctx->wc_ctx, abspath1, depth,
                        ignore_ancestry, changelists,
                        diff_processor,
                        ctx->cancel_func, ctx->cancel_baton,
                        result_pool, scratch_pool));
  return SVN_NO_ERROR;
}
static svn_error_t * diff_wc_wc ( const char * * root_relpath , svn_boolean_t * root_is_dir , struct diff_driver_info_t * ddi , const char * path1 , const svn_opt_revision_t * revision1 , const char * path2 , const svn_opt_revision_t * revision2 , svn_depth_t depth , svn_boolean_t ignore_ancestry , const apr_array_header_t * changelists , const svn_diff_tree_processor_t * diff_processor , svn_client_ctx_t * ctx , apr_pool_t * result_pool , apr_pool_t * scratch_pool ) { const char * abspath1 ; SVN_ERR_ASSERT ( ! svn_path_is_url ( path1 ) ) ; SVN_ERR_ASSERT ( ! svn_path_is_url ( path2 ) ) ; SVN_ERR ( svn_dirent_get_absolute ( & abspath1 , path1 , scratch_pool ) ) ; if ( ( strcmp ( path1 , path2 ) != 0 ) || ( ! ( ( revision1 -> kind == svn_opt_revision_base ) && ( revision2 -> kind == svn_opt_revision_working ) ) ) ) return unsupported_diff_error ( svn_error_create ( SVN_ERR_INCORRECT_PARAMS , NULL , _ ( " " " " ) ) ) ; if ( ddi ) { svn_node_kind_t kind ; SVN_ERR ( svn_wc_read_kind2 ( & kind , ctx -> wc_ctx , abspath1 , TRUE , FALSE , scratch_pool ) ) ; if ( kind != svn_node_dir ) ddi -> anchor = svn_dirent_dirname ( path1 , scratch_pool ) ; else ddi -> anchor = path1 ; } SVN_ERR ( svn_wc__diff7 ( root_relpath , root_is_dir , ctx -> wc_ctx , abspath1 , depth , ignore_ancestry , changelists , diff_processor , ctx -> cancel_func , ctx -> cancel_baton , result_pool , scratch_pool ) ) ; return SVN_NO_ERROR ; }
Perform a diff between two working-copy paths.
Perform a diff between two working - copy paths .
/* Currently we support only the case where path1 and path2 are the
     same path. */