FreeBSD/contrib/subversion/subversion/libsvn_fs_x/tree.c
/* Check if the contents of PATH1 under ROOT1 are different from the
   contents of PATH2 under ROOT2.  If they are different set
   *CHANGED_P to TRUE, otherwise set it to FALSE. */
Check if the contents of PATH1 under ROOT1 are different from the
contents of PATH2 under ROOT2.  If they are different set
CHANGED_P to TRUE, otherwise set it to FALSE.
Check if the contents of PATH1 under ROOT1 are different from the contents of PATH2 under ROOT2 . If they are different set CHANGED_P to TRUE otherwise set it to FALSE .
static svn_error_t *
x_contents_changed(svn_boolean_t *changed_p,
                   svn_fs_root_t *root1,
                   const char *path1,
                   svn_fs_root_t *root2,
                   const char *path2,
                   svn_boolean_t strict,
                   apr_pool_t *scratch_pool)
{
  dag_node_t *node1, *node2;
  apr_pool_t *subpool = svn_pool_create(scratch_pool);
  if (root1->fs != root2->fs)
    return svn_error_create
      (SVN_ERR_FS_GENERAL, NULL,
       _("Cannot compare file contents between two different filesystems"));
  {
    svn_node_kind_t kind;
    SVN_ERR(svn_fs_x__check_path(&kind, root1, path1, subpool));
    if (kind != svn_node_file)
      return svn_error_createf
        (SVN_ERR_FS_GENERAL, NULL, _("'%s' is not a file"), path1);
    SVN_ERR(svn_fs_x__check_path(&kind, root2, path2, subpool));
    if (kind != svn_node_file)
      return svn_error_createf
        (SVN_ERR_FS_GENERAL, NULL, _("'%s' is not a file"), path2);
  }
  SVN_ERR(get_dag(&node1, root1, path1, subpool));
  SVN_ERR(get_dag(&node2, root2, path2, subpool));
  SVN_ERR(svn_fs_x__dag_things_different(NULL, changed_p, node1, node2,
                                         strict, subpool));
  svn_pool_destroy(subpool);
  return SVN_NO_ERROR;
}
static svn_error_t * x_contents_changed ( svn_boolean_t * changed_p , svn_fs_root_t * root1 , const char * path1 , svn_fs_root_t * root2 , const char * path2 , svn_boolean_t strict , apr_pool_t * scratch_pool ) { dag_node_t * node1 , * node2 ; apr_pool_t * subpool = svn_pool_create ( scratch_pool ) ; if ( root1 -> fs != root2 -> fs ) return svn_error_create ( SVN_ERR_FS_GENERAL , NULL , _ ( " " ) ) ; { svn_node_kind_t kind ; SVN_ERR ( svn_fs_x__check_path ( & kind , root1 , path1 , subpool ) ) ; if ( kind != svn_node_file ) return svn_error_createf ( SVN_ERR_FS_GENERAL , NULL , _ ( " " ) , path1 ) ; SVN_ERR ( svn_fs_x__check_path ( & kind , root2 , path2 , subpool ) ) ; if ( kind != svn_node_file ) return svn_error_createf ( SVN_ERR_FS_GENERAL , NULL , _ ( " " ) , path2 ) ; } SVN_ERR ( get_dag ( & node1 , root1 , path1 , subpool ) ) ; SVN_ERR ( get_dag ( & node2 , root2 , path2 , subpool ) ) ; SVN_ERR ( svn_fs_x__dag_things_different ( NULL , changed_p , node1 , node2 , strict , subpool ) ) ; svn_pool_destroy ( subpool ) ; return SVN_NO_ERROR ; }
Check if the contents of PATH1 under ROOT1 are different from the
contents of PATH2 under ROOT2.
Check if the contents of PATH1 under ROOT1 are different from the contents of PATH2 under ROOT2 .
/* Check that roots are in the same fs. */ /* Check that both paths are files. */