subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hwri...@apache.org
Subject svn commit: r1177691 [5/6] - in /subversion/branches/fs-py: ./ build/ build/ac-macros/ build/generator/templates/ notes/wc-ng/ subversion/bindings/javahl/native/ subversion/bindings/javahl/src/org/apache/subversion/javahl/ subversion/bindings/javahl/sr...
Date Fri, 30 Sep 2011 15:02:47 GMT
Modified: subversion/branches/fs-py/subversion/libsvn_wc/status.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_wc/status.c?rev=1177691&r1=1177690&r2=1177691&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_wc/status.c (original)
+++ subversion/branches/fs-py/subversion/libsvn_wc/status.c Fri Sep 30 15:02:43 2011
@@ -1058,29 +1058,189 @@ send_unversioned_item(const struct walk_
   return SVN_NO_ERROR;
 }
 
-/* Send svn_wc_status3_t * structures for the directory LOCAL_ABSPATH and
-   for all its entries through STATUS_FUNC/STATUS_BATON, or, if SELECTED
-   is non-NULL, only for that directory entry.
+static svn_error_t *
+get_dir_status(const struct walk_status_baton *wb,
+               const char *local_abspath,
+               svn_boolean_t skip_this_dir,
+               const char *parent_repos_root_url,
+               const char *parent_repos_relpath,
+               const char *parent_repos_uuid,
+               const struct svn_wc__db_info_t *dir_info,
+               const svn_io_dirent2_t *dirent,
+               const apr_array_header_t *ignore_patterns,
+               svn_depth_t depth,
+               svn_boolean_t get_all,
+               svn_boolean_t no_ignore,
+               svn_wc_status_func4_t status_func,
+               void *status_baton,
+               svn_cancel_func_t cancel_func,
+               void *cancel_baton,
+               apr_pool_t *scratch_pool);
 
-   PARENT_ENTRY is the entry for the parent of the directory or NULL
-   if LOCAL_ABSPATH is a working copy root.
+/* Send out a status structure according to the information gathered on one
+ * child node. (Basically this function is the guts of the loop in
+ * get_dir_status() and of get_child_status().)
+ *
+ * Send a status structure of LOCAL_ABSPATH. PARENT_ABSPATH must be the
+ * dirname of LOCAL_ABSPATH.
+ *
+ * INFO should reflect the information on LOCAL_ABSPATH; LOCAL_ABSPATH must
+ * be an unversioned file or dir, or a versioned file.  For versioned
+ * directories use get_dir_status() instead.
+ *
+ * INFO may be NULL for an unversioned node. If such node has a tree conflict,
+ * UNVERSIONED_TREE_CONFLICTED may be set to TRUE. If INFO is non-NULL,
+ * UNVERSIONED_TREE_CONFLICTED is ignored.
+ *
+ * DIRENT should reflect LOCAL_ABSPATH's dirent information.
+ *
+ * DIR_REPOS_* should reflect LOCAL_ABSPATH's parent URL, i.e. LOCAL_ABSPATH's
+ * URL treated with svn_uri_dirname(). ### TODO verify this (externals)
+ *
+ * If *COLLECTED_IGNORE_PATTERNS is NULL and ignore patterns are needed in
+ * this call, *COLLECTED_IGNORE_PATTERNS will be set to an apr_array_header_t*
+ * containing all ignore patterns, as returned by collect_ignore_patterns() on
+ * PARENT_ABSPATH and IGNORE_PATTERNS. If *COLLECTED_IGNORE_PATTERNS is passed
+ * non-NULL, it is assumed to already hold that result. This speeds up
+ * repeated calls with the same PARENT_ABSPATH.
+ *
+ * *COLLECTED_IGNORE_PATTERNS will be allocated in RESULT_POOL. All other
+ * allocations are made in SCRATCH_POOL.
+ *
+ * The remaining parameters correspond to get_dir_status(). */
+static svn_error_t*
+one_child_status(const struct walk_status_baton *wb,
+                 const char *local_abspath,
+                 const char *parent_abspath,
+                 const struct svn_wc__db_info_t *info,
+                 const svn_io_dirent2_t *dirent,
+                 const char *dir_repos_root_url,
+                 const char *dir_repos_relpath,
+                 const char *dir_repos_uuid,
+                 svn_boolean_t unversioned_tree_conflicted,
+                 apr_array_header_t **collected_ignore_patterns,
+                 const apr_array_header_t *ignore_patterns,
+                 svn_depth_t depth,
+                 svn_boolean_t get_all,
+                 svn_boolean_t no_ignore,
+                 svn_wc_status_func4_t status_func,
+                 void *status_baton,
+                 svn_cancel_func_t cancel_func,
+                 void *cancel_baton,
+                 apr_pool_t *result_pool,
+                 apr_pool_t *scratch_pool)
+{
+  svn_boolean_t conflicted = info ? info->conflicted
+                                  : unversioned_tree_conflicted;
+
+  if (info
+      && info->status != svn_wc__db_status_not_present
+      && info->status != svn_wc__db_status_excluded
+      && info->status != svn_wc__db_status_server_excluded
+      && !(info->kind == svn_wc__db_kind_unknown
+           && info->status == svn_wc__db_status_normal))
+    {
+      if (depth == svn_depth_files
+          && info->kind == svn_wc__db_kind_dir)
+        {
+          return SVN_NO_ERROR;
+        }
+
+      SVN_ERR(send_status_structure(wb, local_abspath,
+                                    dir_repos_root_url,
+                                    dir_repos_relpath,
+                                    dir_repos_uuid,
+                                    info, dirent, get_all,
+                                    status_func, status_baton,
+                                    scratch_pool));
+
+      /* Descend in subdirectories. */
+      if (depth == svn_depth_infinity
+          && info->kind == svn_wc__db_kind_dir)
+        {
+          SVN_ERR(get_dir_status(wb, local_abspath, TRUE,
+                                 dir_repos_root_url, dir_repos_relpath,
+                                 dir_repos_uuid, info,
+                                 dirent, ignore_patterns,
+                                 svn_depth_infinity, get_all,
+                                 no_ignore,
+                                 status_func, status_baton,
+                                 cancel_func, cancel_baton,
+                                 scratch_pool));
+        }
+
+      return SVN_NO_ERROR;
+    }
+
+  /* If conflicted, fall right through to unversioned.
+   * With depth_files, show all conflicts, even if their report is only
+   * about directories. A tree conflict may actually report two different
+   * kinds, so it's not so easy to define what depth=files means. We could go
+   * look up the kinds in the conflict ... just show all. */
+  if (! conflicted)
+    {
+      /* Selected node, but not found */
+      if (dirent == NULL)
+        return SVN_NO_ERROR;
+
+      if (depth == svn_depth_files && dirent->kind == svn_node_dir)
+        return SVN_NO_ERROR;
+
+      if (svn_wc_is_adm_dir(svn_dirent_basename(local_abspath, scratch_pool),
+                            scratch_pool))
+        return SVN_NO_ERROR;
+    }
+
+  /* The node exists on disk but there is no versioned information about it,
+   * or it doesn't exist but is a tree conflicted path or should be
+   * reported not-present. */
+   
+  /* Why pass ignore patterns on a tree conflicted node, even if it should
+   * always show up in clients' status reports anyway? Because the calling
+   * client decides whether to ignore, and thus this flag needs to be
+   * determined.  For example, in 'svn status', plain unversioned nodes show
+   * as '?  C', where ignored ones show as 'I  C'. */
+
+  if (ignore_patterns && ! *collected_ignore_patterns)
+    SVN_ERR(collect_ignore_patterns(collected_ignore_patterns, wb->db,
+                                    parent_abspath, ignore_patterns,
+                                    result_pool, scratch_pool));
+
+  SVN_ERR(send_unversioned_item(wb,
+                                local_abspath,
+                                dirent,
+                                conflicted,
+                                *collected_ignore_patterns,
+                                no_ignore,
+                                status_func, status_baton,
+                                scratch_pool));
+
+  return SVN_NO_ERROR;
+}
+
+/* Send svn_wc_status3_t * structures for the directory LOCAL_ABSPATH and
+   for all its child nodes (according to DEPTH) through STATUS_FUNC /
+   STATUS_BATON.
 
    If SKIP_THIS_DIR is TRUE, the directory's own status will not be reported.
-   However, upon recursing, all subdirs *will* be reported, regardless of this
+   All subdirs reached by recursion will be reported regardless of this
    parameter's value.
 
-   DIRENT is LOCAL_ABSPATH's own dirent and is only needed if it is reported,
-   so if SKIP_THIS_DIR or SELECTED is not-NULL DIRENT can be left NULL.
+   PARENT_REPOS_* parameters can be set to refer to LOCAL_ABSPATH's parent's
+   URL, i.e. the URL the WC reflects at the dirname of LOCAL_ABSPATH, to avoid
+   retrieving them again. Otherwise they must be NULL.
 
    DIR_INFO can be set to the information of LOCAL_ABSPATH, to avoid retrieving
-   it again.
+   it again. Otherwise it must be NULL.
+
+   DIRENT is LOCAL_ABSPATH's own dirent and is only needed if it is reported,
+   so if SKIP_THIS_DIR is TRUE, DIRENT can be left NULL.
 
    Other arguments are the same as those passed to
    svn_wc_get_status_editor5().  */
 static svn_error_t *
 get_dir_status(const struct walk_status_baton *wb,
                const char *local_abspath,
-               const char *selected,
                svn_boolean_t skip_this_dir,
                const char *parent_repos_root_url,
                const char *parent_repos_relpath,
@@ -1102,7 +1262,7 @@ get_dir_status(const struct walk_status_
   const char *dir_repos_relpath;
   const char *dir_repos_uuid;
   apr_hash_t *dirents, *nodes, *conflicts, *all_children;
-  apr_array_header_t *patterns = NULL;
+  apr_array_header_t *collected_ignore_patterns = NULL;
   apr_pool_t *iterpool, *subpool = svn_pool_create(scratch_pool);
   svn_error_t *err;
 
@@ -1135,178 +1295,156 @@ get_dir_status(const struct walk_status_
                                      parent_repos_root_url, parent_repos_uuid,
                                      wb->db, local_abspath,
                                      subpool, iterpool));
-  if (selected == NULL)
-    {
-      /* Create a hash containing all children.  The source hashes
-         don't all map the same types, but only the keys of the result
-         hash are subsequently used. */
-      SVN_ERR(svn_wc__db_read_children_info(&nodes, &conflicts,
-                                            wb->db, local_abspath,
-                                            subpool, iterpool));
-
-      all_children = apr_hash_overlay(subpool, nodes, dirents);
-      if (apr_hash_count(conflicts) > 0)
-        all_children = apr_hash_overlay(subpool, conflicts, all_children);
-    }
-  else
-    {
-      const struct svn_wc__db_info_t *info;
-      const char *selected_abspath = svn_dirent_join(local_abspath, selected,
-                                                     iterpool);
-      /* Create a hash containing just selected */
-      all_children = apr_hash_make(subpool);
-      nodes = apr_hash_make(subpool);
-      conflicts = apr_hash_make(subpool);
-
-      err = read_info(&info, selected_abspath, wb->db, subpool, iterpool);
 
-      if (err)
-        {
-          if (err->apr_err != SVN_ERR_WC_PATH_NOT_FOUND)
-            return svn_error_trace(err);
-          svn_error_clear(err);
-          /* The node is neither a tree conflict nor a versioned node */
-        }
-      else
-        {
-          if (!info->conflicted
-              || info->status != svn_wc__db_status_normal
-              || info->kind != svn_wc__db_kind_unknown)
-             {
-               /* The node is a normal versioned node */
-               apr_hash_set(nodes, selected, APR_HASH_KEY_STRING, info);
-             }
-
-          /* Drop it in the list of possible conflicts */
-          if (info->conflicted)
-            apr_hash_set(conflicts, selected, APR_HASH_KEY_STRING, info);
-        }
-
-      apr_hash_set(all_children, selected, APR_HASH_KEY_STRING, selected);
-    }
-
-  if (!selected)
-    {
-      /* Handle "this-dir" first. */
-      if (! skip_this_dir)
-        SVN_ERR(send_status_structure(wb, local_abspath,
-                                      parent_repos_root_url,
-                                      parent_repos_relpath,
-                                      parent_repos_uuid,
-                                      dir_info, dirent, get_all,
-                                      status_func, status_baton,
-                                      iterpool));
+  /* Create a hash containing all children.  The source hashes
+     don't all map the same types, but only the keys of the result
+     hash are subsequently used. */
+  SVN_ERR(svn_wc__db_read_children_info(&nodes, &conflicts,
+                                        wb->db, local_abspath,
+                                        subpool, iterpool));
+
+  all_children = apr_hash_overlay(subpool, nodes, dirents);
+  if (apr_hash_count(conflicts) > 0)
+    all_children = apr_hash_overlay(subpool, conflicts, all_children);
+
+  /* Handle "this-dir" first. */
+  if (! skip_this_dir)
+    SVN_ERR(send_status_structure(wb, local_abspath,
+                                  parent_repos_root_url,
+                                  parent_repos_relpath,
+                                  parent_repos_uuid,
+                                  dir_info, dirent, get_all,
+                                  status_func, status_baton,
+                                  iterpool));
 
-      /* If the requested depth is empty, we only need status on this-dir. */
-      if (depth == svn_depth_empty)
-        return SVN_NO_ERROR;
-    }
+  /* If the requested depth is empty, we only need status on this-dir. */
+  if (depth == svn_depth_empty)
+    return SVN_NO_ERROR;
 
   /* Walk all the children of this directory. */
   for (hi = apr_hash_first(subpool, all_children); hi; hi = apr_hash_next(hi))
     {
       const void *key;
       apr_ssize_t klen;
-      const char *node_abspath;
-      svn_io_dirent2_t *dirent_p;
-      const struct svn_wc__db_info_t *info;
+      const char *child_abspath;
+      svn_io_dirent2_t *child_dirent;
+      const struct svn_wc__db_info_t *child_info;
 
       svn_pool_clear(iterpool);
 
       apr_hash_this(hi, &key, &klen, NULL);
 
-      node_abspath = svn_dirent_join(local_abspath, key, iterpool);
+      child_abspath = svn_dirent_join(local_abspath, key, iterpool);
 
-      dirent_p = apr_hash_get(dirents, key, klen);
+      child_dirent = apr_hash_get(dirents, key, klen);
+      child_info = apr_hash_get(nodes, key, klen);
 
-      info = apr_hash_get(nodes, key, klen);
-      if (info)
-        {
-          if (info->status != svn_wc__db_status_not_present
-              && info->status != svn_wc__db_status_excluded
-              && info->status != svn_wc__db_status_server_excluded)
-            {
-              if (depth == svn_depth_files
-                  && info->kind == svn_wc__db_kind_dir)
-                {
-                  continue;
-                }
+      SVN_ERR(one_child_status(wb,
+                               child_abspath,
+                               local_abspath,
+                               child_info,
+                               child_dirent,
+                               dir_repos_root_url,
+                               dir_repos_relpath,
+                               dir_repos_uuid,
+                               apr_hash_get(conflicts, key, klen) != NULL,
+                               &collected_ignore_patterns,
+                               ignore_patterns,
+                               depth,
+                               get_all,
+                               no_ignore,
+                               status_func,
+                               status_baton,
+                               cancel_func,
+                               cancel_baton,
+                               subpool,
+                               iterpool));
+    }
 
-              SVN_ERR(send_status_structure(wb, node_abspath,
-                                            dir_repos_root_url,
-                                            dir_repos_relpath,
-                                            dir_repos_uuid,
-                                            info, dirent_p, get_all,
-                                            status_func, status_baton,
-                                            iterpool));
-
-              /* Descend in subdirectories. */
-              if (depth == svn_depth_infinity
-                  && info->kind == svn_wc__db_kind_dir)
-                {
-                  SVN_ERR(get_dir_status(wb, node_abspath, NULL, TRUE,
-                                         dir_repos_root_url, dir_repos_relpath,
-                                         dir_repos_uuid, info,
-                                         dirent_p, ignore_patterns,
-                                         svn_depth_infinity, get_all,
-                                         no_ignore,
-                                         status_func, status_baton,
-                                         cancel_func, cancel_baton,
-                                         iterpool));
-                }
+  /* Destroy our subpools. */
+  svn_pool_destroy(subpool);
 
-              continue;
-            }
-        }
+  return SVN_NO_ERROR;
+}
 
-      if (apr_hash_get(conflicts, key, klen))
-        {
-          /* Tree conflict */
+/* Send an svn_wc_status3_t * structure for the versioned file, or for the
+ * unversioned file or directory, LOCAL_ABSPATH, which is not ignored (an
+ * explicit target). Does not recurse.
+ *
+ * INFO should reflect LOCAL_ABSPATH's information, but should be NULL for
+ * unversioned nodes. An unversioned and tree-conflicted node however should
+ * pass a non-NULL INFO as returned by read_info() (INFO->CONFLICTED = TRUE).
+ *
+ * DIRENT should reflect LOCAL_ABSPATH.
+ *
+ * All allocations made in SCRATCH_POOL.
+ *
+ * The remaining parameters correspond to get_dir_status(). */
+static svn_error_t *
+get_child_status(const struct walk_status_baton *wb,
+                 const char *local_abspath,
+                 const struct svn_wc__db_info_t *info,
+                 const svn_io_dirent2_t *dirent,
+                 const apr_array_header_t *ignore_patterns,
+                 svn_boolean_t get_all,
+                 svn_wc_status_func4_t status_func,
+                 void *status_baton,
+                 svn_cancel_func_t cancel_func,
+                 void *cancel_baton,
+                 apr_pool_t *scratch_pool)
+{
+  const char *dir_repos_root_url;
+  const char *dir_repos_relpath;
+  const char *dir_repos_uuid;
+  const struct svn_wc__db_info_t *dir_info;
+  apr_array_header_t *collected_ignore_patterns = NULL;
+  const svn_io_dirent2_t *dirent_p;
+  const char *parent_abspath = svn_dirent_dirname(local_abspath,
+                                                  scratch_pool);
 
-          if (ignore_patterns && ! patterns)
-            SVN_ERR(collect_ignore_patterns(&patterns, wb->db, local_abspath,
-                                            ignore_patterns, subpool,
-                                            iterpool));
-
-          SVN_ERR(send_unversioned_item(wb,
-                                        node_abspath,
-                                        dirent_p, TRUE,
-                                        patterns,
-                                        no_ignore,
-                                        status_func,
-                                        status_baton,
-                                        iterpool));
+  if (cancel_func)
+    SVN_ERR(cancel_func(cancel_baton));
 
-          continue;
-        }
+  SVN_ERR(svn_io_stat_dirent(&dirent_p, local_abspath, TRUE,
+                             scratch_pool, scratch_pool));
 
-      /* Unversioned node */
-      if (dirent_p == NULL)
-        continue; /* Selected node, but not found */
-
-      if (depth == svn_depth_files && dirent_p->kind == svn_node_dir)
-        continue;
-
-      if (svn_wc_is_adm_dir(key, iterpool))
-        continue;
-
-      if (ignore_patterns && ! patterns)
-        SVN_ERR(collect_ignore_patterns(&patterns, wb->db, local_abspath,
-                                        ignore_patterns, subpool,
-                                        iterpool));
-
-      SVN_ERR(send_unversioned_item(wb,
-                                    node_abspath,
-                                    dirent_p, FALSE,
-                                    patterns,
-                                    no_ignore || selected,
-                                    status_func, status_baton,
-                                    iterpool));
-    }
+  if (dirent_p->kind == svn_node_none)
+    dirent_p = NULL;
 
-  /* Destroy our subpools. */
-  svn_pool_destroy(subpool);
+  SVN_ERR(read_info(&dir_info, parent_abspath, wb->db,
+                    scratch_pool, scratch_pool));
 
+  SVN_ERR(get_repos_root_url_relpath(&dir_repos_relpath, &dir_repos_root_url,
+                                     &dir_repos_uuid, dir_info,
+                                     NULL, NULL, NULL,
+                                     wb->db, parent_abspath,
+                                     scratch_pool, scratch_pool));
+
+  /* An unversioned node with a tree conflict will see an INFO != NULL here,
+   * in which case the FALSE passed for UNVERSIONED_TREE_CONFLICTED has no
+   * effect and INFO->CONFLICTED counts.
+   * ### Maybe svn_wc__db_read_children_info() and read_info() should be more
+   * ### alike? */
+  SVN_ERR(one_child_status(wb,
+                           local_abspath,
+                           parent_abspath,
+                           info,
+                           dirent_p,
+                           dir_repos_root_url,
+                           dir_repos_relpath,
+                           dir_repos_uuid,
+                           FALSE, /* unversioned_tree_conflicted */
+                           &collected_ignore_patterns,
+                           ignore_patterns,
+                           svn_depth_empty,
+                           get_all,
+                           TRUE, /* no_ignore. This is an explicit target. */
+                           status_func,
+                           status_baton,
+                           cancel_func,
+                           cancel_baton,
+                           scratch_pool,
+                           scratch_pool));
   return SVN_NO_ERROR;
 }
 
@@ -1578,7 +1716,7 @@ make_dir_baton(void **dir_baton,
       const svn_wc_status3_t *this_dir_status;
       const apr_array_header_t *ignores = eb->ignores;
 
-      SVN_ERR(get_dir_status(&eb->wb, local_abspath, NULL, TRUE,
+      SVN_ERR(get_dir_status(&eb->wb, local_abspath, TRUE,
                              status_in_parent->repos_root_url,
                              NULL /*parent_repos_relpath*/,
                              status_in_parent->repos_uuid,
@@ -1761,7 +1899,7 @@ handle_statii(struct edit_baton *eb,
               || depth == svn_depth_infinity))
         {
           SVN_ERR(get_dir_status(&eb->wb,
-                                 local_abspath, NULL, TRUE,
+                                 local_abspath, TRUE,
                                  dir_repos_root_url, dir_repos_relpath,
                                  dir_repos_uuid,
                                  NULL,
@@ -2033,7 +2171,7 @@ close_directory(void *dir_baton,
                   && tgt_status->kind == svn_node_dir)
                 {
                   SVN_ERR(get_dir_status(&eb->wb,
-                                         eb->target_abspath, NULL, TRUE,
+                                         eb->target_abspath, TRUE,
                                          NULL, NULL, NULL, NULL,
                                          NULL /* dirent */,
                                          eb->ignores,
@@ -2365,6 +2503,7 @@ svn_wc_get_status_editor5(const svn_delt
     *set_locks_baton = eb;
 
   SVN_ERR(svn_editor__insert_shims(editor, edit_baton, *editor, *edit_baton,
+                                   NULL, NULL, NULL, NULL,
                                    result_pool, scratch_pool));
 
   return SVN_NO_ERROR;
@@ -2386,9 +2525,7 @@ svn_wc__internal_walk_status(svn_wc__db_
 {
   struct walk_status_baton wb;
   const svn_io_dirent2_t *dirent;
-  const char *anchor_abspath, *target_name;
-  svn_boolean_t skip_root;
-  const struct svn_wc__db_info_t *dir_info;
+  const struct svn_wc__db_info_t *info;
   svn_error_t *err;
 
   wb.db = db;
@@ -2410,45 +2547,53 @@ svn_wc__internal_walk_status(svn_wc__db_
       ignore_patterns = ignores;
     }
 
-  err = read_info(&dir_info, local_abspath, db, scratch_pool, scratch_pool);
+  err = read_info(&info, local_abspath, db, scratch_pool, scratch_pool);
 
-  if (!err && dir_info->kind == svn_wc__db_kind_dir)
+  if (err)
     {
-      anchor_abspath = local_abspath;
-      target_name = NULL;
-      skip_root = FALSE;
-    }
-  else if (err && err->apr_err != SVN_ERR_WC_PATH_NOT_FOUND)
-    return svn_error_trace(err);
-  else
-    {
-      svn_error_clear(err);
-      dir_info = NULL; /* Don't pass information of the child */
-
-      /* Walk the status of the parent of LOCAL_ABSPATH, but only report
-         status on its child LOCAL_ABSPATH. */
-      anchor_abspath = svn_dirent_dirname(local_abspath, scratch_pool);
-      target_name = svn_dirent_basename(local_abspath, NULL);
-      skip_root = TRUE;
+      if (err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
+        {
+          svn_error_clear(err);
+          info = NULL;
+        }
+      else
+        return svn_error_trace(err);
     }
 
   SVN_ERR(svn_io_stat_dirent(&dirent, local_abspath, TRUE,
                              scratch_pool, scratch_pool));
 
-  SVN_ERR(get_dir_status(&wb,
-                         anchor_abspath,
-                         target_name,
-                         skip_root,
-                         NULL, NULL, NULL,
-                         dir_info,
-                         dirent,
-                         ignore_patterns,
-                         depth,
-                         get_all,
-                         no_ignore,
-                         status_func, status_baton,
-                         cancel_func, cancel_baton,
-                         scratch_pool));
+  if (info && info->kind == svn_wc__db_kind_dir)
+    {
+      SVN_ERR(get_dir_status(&wb,
+                             local_abspath,
+                             FALSE /* skip_root */,
+                             NULL, NULL, NULL,
+                             info,
+                             dirent,
+                             ignore_patterns,
+                             depth,
+                             get_all,
+                             no_ignore,
+                             status_func, status_baton,
+                             cancel_func, cancel_baton,
+                             scratch_pool));
+    }
+  else
+    {
+      /* It may be a file or an unversioned item. And this is an explicit
+       * target, so no ignoring. An unversioned item (file or dir) shows a
+       * status like '?', and can yield a tree conflicted path. */
+      SVN_ERR(get_child_status(&wb,
+                               local_abspath,
+                               info,
+                               dirent,
+                               ignore_patterns,
+                               get_all,
+                               status_func, status_baton,
+                               cancel_func, cancel_baton,
+                               scratch_pool));
+    }
 
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/fs-py/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_wc/update_editor.c?rev=1177691&r1=1177690&r2=1177691&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/branches/fs-py/subversion/libsvn_wc/update_editor.c Fri Sep 30 15:02:43 2011
@@ -4546,6 +4546,63 @@ close_edit(void *edit_baton,
 
 /*** Returning editors. ***/
 
+struct fetch_baton
+{
+  svn_wc__db_t *db;
+  const char *target_abspath;
+};
+
+static svn_error_t *
+fetch_props_func(apr_hash_t **props,
+                 void *baton,
+                 const char *path,
+                 apr_pool_t *result_pool,
+                 apr_pool_t *scratch_pool)
+{
+  struct fetch_baton *fpb = baton;
+  const char *local_abspath = svn_dirent_join(fpb->target_abspath, path,
+                                              scratch_pool);
+  svn_error_t *err;
+
+  err = svn_wc__db_read_props(props, fpb->db, local_abspath,
+                              result_pool, scratch_pool);
+
+  /* If the path doesn't exist, just return an empty set of props. */
+  if (err && err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
+    {
+      svn_error_clear(err);
+      *props = apr_hash_make(result_pool);
+    }
+  else if (err)
+    return svn_error_trace(err);
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+fetch_kind_func(svn_node_kind_t *kind,
+                void *baton,
+                const char *path,
+                apr_pool_t *scratch_pool)
+{
+  struct fetch_baton *fpb = baton;
+  const char *local_abspath = svn_dirent_join(fpb->target_abspath, path,
+                                              scratch_pool);
+  svn_wc__db_kind_t db_kind;
+
+  SVN_ERR(svn_wc__db_read_kind(&db_kind, fpb->db, local_abspath, FALSE,
+                               scratch_pool));
+
+  if (db_kind == svn_wc__db_kind_dir)
+    *kind = svn_node_dir;
+  else if (db_kind == svn_wc__db_kind_file)
+    *kind = svn_node_file;
+  else
+    *kind = svn_node_none;
+  
+  return SVN_NO_ERROR;
+}
+
 /* Helper for the three public editor-supplying functions. */
 static svn_error_t *
 make_editor(svn_revnum_t *target_revision,
@@ -4583,6 +4640,7 @@ make_editor(svn_revnum_t *target_revisio
   svn_delta_editor_t *tree_editor = svn_delta_default_editor(edit_pool);
   const svn_delta_editor_t *inner_editor;
   const char *repos_root, *repos_uuid;
+  struct fetch_baton *fpb;
 
   /* An unknown depth can't be sticky. */
   if (depth == svn_depth_unknown)
@@ -4810,7 +4868,11 @@ make_editor(svn_revnum_t *target_revisio
                                             edit_baton,
                                             result_pool));
 
+  fpb = apr_palloc(result_pool, sizeof(*fpb));
+  fpb->db = db;
+  fpb->target_abspath = eb->target_abspath;
   SVN_ERR(svn_editor__insert_shims(editor, edit_baton, *editor, *edit_baton,
+                                   fetch_props_func, fpb, fetch_kind_func, fpb,
                                    result_pool, scratch_pool));
 
   return SVN_NO_ERROR;

Modified: subversion/branches/fs-py/subversion/libsvn_wc/upgrade.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_wc/upgrade.c?rev=1177691&r1=1177690&r2=1177691&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_wc/upgrade.c (original)
+++ subversion/branches/fs-py/subversion/libsvn_wc/upgrade.c Fri Sep 30 15:02:43 2011
@@ -1985,3 +1985,44 @@ svn_wc_upgrade(svn_wc_context_t *wc_ctx,
   return SVN_NO_ERROR;
 }
 
+svn_error_t *
+svn_wc__upgrade_add_external_info(svn_wc_context_t *wc_ctx,
+                                  const char *local_abspath,
+                                  svn_node_kind_t kind,
+                                  const char *def_local_abspath,
+                                  const char *repos_relpath,
+                                  const char *repos_root_url,
+                                  const char *repos_uuid,
+                                  svn_revnum_t def_peg_revision,
+                                  svn_revnum_t def_revision,
+                                  apr_pool_t *scratch_pool)
+{
+  svn_wc__db_kind_t db_kind;
+  switch (kind)
+    {
+      case svn_node_dir:
+        db_kind = svn_wc__db_kind_dir;
+        break;
+
+      case svn_node_file:
+        db_kind = svn_wc__db_kind_file;
+        break;
+
+      case svn_node_unknown:
+        db_kind = svn_wc__db_kind_unknown;
+        break;
+
+      default:
+        SVN_ERR_MALFUNCTION();
+    }
+
+  SVN_ERR(svn_wc__db_upgrade_insert_external(wc_ctx->db, local_abspath,
+                                             db_kind,
+                                             svn_dirent_dirname(local_abspath,
+                                                                scratch_pool),
+                                             def_local_abspath, repos_relpath,
+                                             repos_root_url, repos_uuid,
+                                             def_peg_revision, def_revision,
+                                             scratch_pool));
+  return SVN_NO_ERROR;
+}

Modified: subversion/branches/fs-py/subversion/libsvn_wc/wc-metadata.sql
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_wc/wc-metadata.sql?rev=1177691&r1=1177690&r2=1177691&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_wc/wc-metadata.sql (original)
+++ subversion/branches/fs-py/subversion/libsvn_wc/wc-metadata.sql Fri Sep 30 15:02:43 2011
@@ -540,7 +540,7 @@ CREATE TABLE EXTERNALS (
   local_relpath  TEXT NOT NULL,
 
   /* The working copy root can't be recorded as an external in itself
-     so this will never be NULL. */
+     so this will never be NULL. ### ATM only inserted, never queried */
   parent_relpath  TEXT NOT NULL,
 
   /* Repository location fields */
@@ -767,6 +767,12 @@ PRAGMA user_version = 29;
 /* TODO: Rename the "absent" presence value to "server-excluded" before
    the 1.7 release. wc_db.c and this file have references to "absent" which
    still need to be changed to "server-excluded". */
+/* TODO: Un-confuse *_revision column names in the EXTERNALS table to
+   "-r<operative> foo@<peg>", as suggested by the patch attached to
+   http://svn.haxx.se/dev/archive-2011-09/0478.shtml */
+/* TODO: Remove column parent_relpath from EXTERNALS. We're not using it and
+   never will. It's not interesting like in the NODES table: the external's
+   parent path may be *anything*: unversioned, "behind" a another WC... */
 
 /* Now "drop" the tree_conflict_data column from actual_node. */
 CREATE TABLE ACTUAL_NODE_BACKUP (

Modified: subversion/branches/fs-py/subversion/libsvn_wc/wc-queries.sql
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_wc/wc-queries.sql?rev=1177691&r1=1177690&r2=1177691&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_wc/wc-queries.sql (original)
+++ subversion/branches/fs-py/subversion/libsvn_wc/wc-queries.sql Fri Sep 30 15:02:43 2011
@@ -950,16 +950,6 @@ INSERT OR REPLACE INTO externals (
     repos_id, def_repos_relpath, def_operational_revision, def_revision)
 VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8, ?9, ?10)
 
--- STMT_INSERT_EXTERNAL_UPGRADE
-INSERT OR REPLACE INTO externals (
-    wc_id, local_relpath, parent_relpath, presence, kind, def_local_relpath,
-    repos_id, def_repos_relpath, def_operational_revision, def_revision)
-VALUES (?1, ?2, ?3, ?4,
-        CASE WHEN (SELECT file_external FROM nodes
-                   WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = 0)
-             IS NOT NULL THEN 'file' ELSE 'unknown' END,
-        ?5, ?6, ?7, ?8, ?9)
-
 -- STMT_SELECT_EXTERNAL_INFO
 SELECT presence, kind, def_local_relpath, repos_id,
     def_repos_relpath, def_operational_revision, def_revision

Modified: subversion/branches/fs-py/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_wc/wc_db.c?rev=1177691&r1=1177690&r2=1177691&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/branches/fs-py/subversion/libsvn_wc/wc_db.c Fri Sep 30 15:02:43 2011
@@ -3601,8 +3601,8 @@ db_op_copy(svn_wc__db_wcroot_t *src_wcro
                   dst_wcroot->sdb,
                   dst_wcroot->wc_id,
                   dst_relpath,
-                  INVALID_REPOS_ID /* inherit repos_id */,
-                  NULL /* inherit repos_path */,
+                  copyfrom_id,
+                  copyfrom_relpath, 
                   copyfrom_rev,
                   children,
                   dst_op_depth,
@@ -10238,7 +10238,6 @@ svn_wc__db_upgrade_apply_props(svn_sqlit
   apr_int64_t below_op_depth = -1;
   svn_wc__db_status_t top_presence;
   svn_wc__db_status_t below_presence;
-  svn_wc__db_kind_t kind = svn_wc__db_kind_unknown;
   int affected_rows;
 
   /* ### working_props: use set_props_txn.
@@ -10275,7 +10274,6 @@ svn_wc__db_upgrade_apply_props(svn_sqlit
     {
       top_op_depth = svn_sqlite__column_int64(stmt, 0);
       top_presence = svn_sqlite__column_token(stmt, 3, presence_map);
-      kind = svn_sqlite__column_token(stmt, 4, kind_map);
       SVN_ERR(svn_sqlite__step(&have_row, stmt));
       if (have_row)
         {
@@ -10364,56 +10362,83 @@ svn_wc__db_upgrade_apply_props(svn_sqlit
                                sdb, scratch_pool));
     }
 
-  if (kind == svn_wc__db_kind_dir)
-    {
-      const char *externals;
-      apr_hash_t *props = working_props;
-
-      if (props == NULL)
-        props = base_props;
+  return SVN_NO_ERROR;
+}
 
-      externals = svn_prop_get_value(props, SVN_PROP_EXTERNALS);
+svn_error_t *
+svn_wc__db_upgrade_insert_external(svn_wc__db_t *db,
+                                   const char *local_abspath,
+                                   svn_wc__db_kind_t kind,
+                                   const char *parent_abspath,
+                                   const char *def_local_abspath,
+                                   const char *repos_relpath,
+                                   const char *repos_root_url,
+                                   const char *repos_uuid,
+                                   svn_revnum_t def_peg_revision,
+                                   svn_revnum_t def_revision,
+                                   apr_pool_t *scratch_pool)
+{
+  svn_wc__db_wcroot_t *wcroot;
+  const char *def_local_relpath;
+  svn_sqlite__stmt_t *stmt;
+  svn_boolean_t have_row;
+  apr_int64_t repos_id;
 
-      if (externals != NULL)
-        {
-          int i;
-          apr_array_header_t *ext;
+  SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
 
-          SVN_ERR(svn_sqlite__get_statement(&stmt, sdb,
-                                            STMT_INSERT_EXTERNAL_UPGRADE));
+  /* We know only of DEF_LOCAL_ABSPATH that it definitely belongs to "this"
+   * WC, i.e. where the svn:externals prop is set. The external target path
+   * itself may be "hidden behind" other working copies. */
+  SVN_ERR(svn_wc__db_wcroot_parse_local_abspath(&wcroot, &def_local_relpath,
+                                                db, def_local_abspath,
+                                                scratch_pool, scratch_pool));
+  VERIFY_USABLE_WCROOT(wcroot);
 
-          SVN_ERR(svn_wc_parse_externals_description3(
-                            &ext, svn_dirent_join(dir_abspath, local_relpath,
-                                                  scratch_pool),
-                            externals, FALSE, scratch_pool));
-          for (i = 0; i < ext->nelts; i++)
-            {
-              const svn_wc_external_item2_t *item;
-              const char *item_relpath;
 
-              item = APR_ARRAY_IDX(ext, i, const svn_wc_external_item2_t *);
-              item_relpath = svn_relpath_join(local_relpath, item->target_dir,
-                                              scratch_pool);
+  SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
+                                    STMT_SELECT_REPOSITORY));
+  SVN_ERR(svn_sqlite__bindf(stmt, "s", repos_root_url));
+  SVN_ERR(svn_sqlite__step(&have_row, stmt));
 
-              SVN_ERR(svn_sqlite__bindf(stmt, "issssis",
-                                        wc_id,
-                                        item_relpath,
-                                        svn_relpath_dirname(item_relpath,
-                                                            scratch_pool),
-                                        "normal",
-                                        local_relpath,
-                                        (apr_int64_t)1, /* repos_id */
-                                        "" /* repos_relpath */));
+  if (have_row)
+    repos_id = svn_sqlite__column_int64(stmt, 0);
+  SVN_ERR(svn_sqlite__reset(stmt));
 
-              SVN_ERR(svn_sqlite__insert(NULL, stmt));
-            }
-        }
+  if (!have_row)
+    {
+      /* Need to set up a new repository row. */
+      SVN_ERR(create_repos_id(&repos_id, repos_root_url, repos_uuid,
+                              wcroot->sdb, scratch_pool));
     }
 
+  SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
+                                    STMT_INSERT_EXTERNAL));
+
+  /* wc_id, local_relpath, parent_relpath, presence, kind, def_local_relpath,
+   * repos_id, def_repos_relpath, def_operational_revision, def_revision */
+  SVN_ERR(svn_sqlite__bindf(stmt, "issstsis",
+                            wcroot->wc_id,
+                            svn_dirent_skip_ancestor(wcroot->abspath,
+                                                     local_abspath),
+                            svn_dirent_skip_ancestor(wcroot->abspath,
+                                                     parent_abspath),
+                            "normal",
+                            kind_map, kind,
+                            def_local_relpath,
+                            repos_id,
+                            repos_relpath));
+
+  if (SVN_IS_VALID_REVNUM(def_peg_revision))
+    SVN_ERR(svn_sqlite__bind_revnum(stmt, 9, def_peg_revision));
+
+  if (SVN_IS_VALID_REVNUM(def_revision))
+    SVN_ERR(svn_sqlite__bind_revnum(stmt, 10, def_revision));
+
+  SVN_ERR(svn_sqlite__insert(NULL, stmt));
+
   return SVN_NO_ERROR;
 }
 
-
 svn_error_t *
 svn_wc__db_upgrade_get_repos_id(apr_int64_t *repos_id,
                                 svn_sqlite__db_t *sdb,

Modified: subversion/branches/fs-py/subversion/libsvn_wc/wc_db.h
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_wc/wc_db.h?rev=1177691&r1=1177690&r2=1177691&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_wc/wc_db.h (original)
+++ subversion/branches/fs-py/subversion/libsvn_wc/wc_db.h Fri Sep 30 15:02:43 2011
@@ -2652,6 +2652,19 @@ svn_wc__db_upgrade_apply_props(svn_sqlit
                                apr_int64_t wc_id,
                                apr_pool_t *scratch_pool);
 
+/* Simply insert (or replace) one row in the EXTERNALS table. */
+svn_error_t *
+svn_wc__db_upgrade_insert_external(svn_wc__db_t *db,
+                                   const char *local_abspath,
+                                   svn_wc__db_kind_t kind,
+                                   const char *parent_abspath,
+                                   const char *def_local_abspath,
+                                   const char *repos_relpath,
+                                   const char *repos_root_url,
+                                   const char *repos_uuid,
+                                   svn_revnum_t def_peg_revision,
+                                   svn_revnum_t def_revision,
+                                   apr_pool_t *scratch_pool);
 
 /* Get the repository identifier corresponding to REPOS_ROOT_URL from the
    database in SDB. The value is returned in *REPOS_ID. All allocations

Modified: subversion/branches/fs-py/subversion/mod_dav_svn/reports/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/mod_dav_svn/reports/mergeinfo.c?rev=1177691&r1=1177690&r2=1177691&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/mod_dav_svn/reports/mergeinfo.c (original)
+++ subversion/branches/fs-py/subversion/mod_dav_svn/reports/mergeinfo.c Fri Sep 30 15:02:43 2011
@@ -52,7 +52,6 @@ dav_svn__get_mergeinfo_report(const dav_
   dav_error *derr = NULL;
   apr_xml_elem *child;
   svn_mergeinfo_catalog_t catalog;
-  svn_boolean_t validate_inherited_mergeinfo = FALSE;
   svn_boolean_t include_descendants = FALSE;
   dav_svn__authz_read_baton arb;
   const dav_svn_repos *repos = resource->info->repos;
@@ -108,12 +107,6 @@ dav_svn__get_mergeinfo_report(const dav_
                                     resource->pool);
           (*((const char **)(apr_array_push(paths)))) = target;
         }
-      else if (strcmp(child->name, SVN_DAV__VALIDATE_INHERITED) == 0)
-        {
-          const char *word = dav_xml_get_cdata(child, resource->pool, 1);
-          if (strcmp(word, "yes") == 0)
-            validate_inherited_mergeinfo = TRUE;
-        }
       else if (strcmp(child->name, SVN_DAV__INCLUDE_DESCENDANTS) == 0)
         {
           const char *word = dav_xml_get_cdata(child, resource->pool, 1);
@@ -132,11 +125,10 @@ dav_svn__get_mergeinfo_report(const dav_
   /* Build mergeinfo brigade */
   bb = apr_brigade_create(resource->pool, output->c->bucket_alloc);
 
-  serr = svn_repos_fs_get_mergeinfo2(&catalog, repos->repos, paths, rev,
-                                     inherit, validate_inherited_mergeinfo,
-                                     include_descendants,
-                                     dav_svn__authz_read_func(&arb),
-                                     &arb, resource->pool);
+  serr = svn_repos_fs_get_mergeinfo(&catalog, repos->repos, paths, rev,
+                                    inherit, include_descendants,
+                                    dav_svn__authz_read_func(&arb),
+                                    &arb, resource->pool);
   if (serr)
     {
       derr = dav_svn__convert_err(serr, HTTP_BAD_REQUEST, serr->message,

Modified: subversion/branches/fs-py/subversion/mod_dav_svn/version.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/mod_dav_svn/version.c?rev=1177691&r1=1177690&r2=1177691&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/mod_dav_svn/version.c (original)
+++ subversion/branches/fs-py/subversion/mod_dav_svn/version.c Fri Sep 30 15:02:43 2011
@@ -147,8 +147,8 @@ get_vsn_options(apr_pool_t *p, apr_text_
   apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_ATOMIC_REVPROPS);
   apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_PARTIAL_REPLAY);
   /* Mergeinfo is a special case: here we merely say that the server
-   * knows how to handle mergeinfo and validate inherited
-   * mergeinfo -- whether the repository does too is a separate matter.
+   * knows how to handle mergeinfo -- whether the repository does too
+   * is a separate matter.
    *
    * Think of it as offering the client an early out: if the server
    * can't do merge-tracking, there's no point finding out of the
@@ -159,7 +159,6 @@ get_vsn_options(apr_pool_t *p, apr_text_
    * server capability and remain agnostic about the repository).
    */
   apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_MERGEINFO);
-  apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_MERGEINFO_VALIDATION);
 
   /* ### fork-control? */
 }

Modified: subversion/branches/fs-py/subversion/svn/diff-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/svn/diff-cmd.c?rev=1177691&r1=1177690&r2=1177691&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/svn/diff-cmd.c (original)
+++ subversion/branches/fs-py/subversion/svn/diff-cmd.c Fri Sep 30 15:02:43 2011
@@ -166,8 +166,8 @@ svn_cl__diff(apr_getopt_t *os,
   svn_client_ctx_t *ctx = ((svn_cl__cmd_baton_t *) baton)->ctx;
   apr_array_header_t *options;
   apr_array_header_t *targets;
-  apr_file_t *outfile, *errfile;
-  apr_status_t status;
+  svn_stream_t *outstream;
+  svn_stream_t *errstream;
   const char *old_target, *new_target;
   apr_pool_t *iterpool;
   svn_boolean_t pegged_diff = FALSE;
@@ -180,12 +180,10 @@ svn_cl__diff(apr_getopt_t *os,
   else
     options = NULL;
 
-  /* Get an apr_file_t representing stdout and stderr, which is where
+  /* Get streams representing stdout and stderr, which is where
      we'll have the external 'diff' program print to. */
-  if ((status = apr_file_open_stdout(&outfile, pool)))
-    return svn_error_wrap_apr(status, _("Can't open stdout"));
-  if ((status = apr_file_open_stderr(&errfile, pool)))
-    return svn_error_wrap_apr(status, _("Can't open stderr"));
+  SVN_ERR(svn_stream_for_stdout(&outstream, pool));
+  SVN_ERR(svn_stream_for_stderr(&errstream, pool));
 
   if (opt_state->xml)
     {
@@ -353,8 +351,8 @@ svn_cl__diff(apr_getopt_t *os,
                      summarize_func, &target1,
                      ctx, iterpool));
           else
-            SVN_ERR(svn_client_diff5
-                    (options,
+            SVN_ERR(svn_client_diff6(
+                     options,
                      target1,
                      &(opt_state->start_revision),
                      target2,
@@ -367,8 +365,8 @@ svn_cl__diff(apr_getopt_t *os,
                      opt_state->force,
                      opt_state->use_git_diff_format,
                      svn_cmdline_output_encoding(pool),
-                     outfile,
-                     errfile,
+                     outstream,
+                     errstream,
                      opt_state->changelists,
                      ctx, iterpool));
         }
@@ -398,8 +396,8 @@ svn_cl__diff(apr_getopt_t *os,
                      summarize_func, &truepath,
                      ctx, iterpool));
           else
-            SVN_ERR(svn_client_diff_peg5
-                    (options,
+            SVN_ERR(svn_client_diff_peg6(
+                     options,
                      truepath,
                      &peg_revision,
                      &opt_state->start_revision,
@@ -412,8 +410,8 @@ svn_cl__diff(apr_getopt_t *os,
                      opt_state->force,
                      opt_state->use_git_diff_format,
                      svn_cmdline_output_encoding(pool),
-                     outfile,
-                     errfile,
+                     outstream,
+                     errstream,
                      opt_state->changelists,
                      ctx, iterpool));
         }

Modified: subversion/branches/fs-py/subversion/svn/log-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/svn/log-cmd.c?rev=1177691&r1=1177690&r2=1177691&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/svn/log-cmd.c (original)
+++ subversion/branches/fs-py/subversion/svn/log-cmd.c Fri Sep 30 15:02:43 2011
@@ -277,18 +277,15 @@ log_entry_receiver(void *baton,
   /* Print a diff if requested. */
   if (lb->show_diff)
     {
-      apr_file_t *outfile;
-      apr_file_t *errfile;
+      svn_stream_t *outstream;
+      svn_stream_t *errstream;
       apr_array_header_t *diff_options;
-      apr_status_t status;
       svn_opt_revision_t start_revision;
       svn_opt_revision_t end_revision;
       svn_error_t *err;
 
-      if ((status = apr_file_open_stdout(&outfile, pool)))
-        return svn_error_wrap_apr(status, _("Can't open stdout"));
-      if ((status = apr_file_open_stderr(&errfile, pool)))
-        return svn_error_wrap_apr(status, _("Can't open stderr"));
+      SVN_ERR(svn_stream_for_stdout(&outstream, pool));
+      SVN_ERR(svn_stream_for_stderr(&errstream, pool));
 
       /* Fall back to "" to get options initialized either way. */
       if (lb->diff_extensions)
@@ -303,7 +300,7 @@ log_entry_receiver(void *baton,
       end_revision.value.number = log_entry->revision;
 
       SVN_ERR(svn_cmdline_printf(pool, _("\n")));
-      err = svn_client_diff5(diff_options,
+      err = svn_client_diff6(diff_options,
                              lb->target_url,
                              &start_revision,
                              lb->target_url,
@@ -316,8 +313,8 @@ log_entry_receiver(void *baton,
                              FALSE, /* ignore content type */
                              FALSE, /* use git diff format */
                              svn_cmdline_output_encoding(pool),
-                             outfile,
-                             errfile,
+                             outstream,
+                             errstream,
                              NULL,
                              lb->ctx, pool);
       if (err)
@@ -336,7 +333,7 @@ log_entry_receiver(void *baton,
               while (strcmp(parent, lb->target_url) != 0)
                 {
                   svn_pool_clear(iterpool);
-                  err = svn_client_diff5(diff_options,
+                  err = svn_client_diff6(diff_options,
                                          parent,
                                          &start_revision,
                                          parent,
@@ -349,8 +346,8 @@ log_entry_receiver(void *baton,
                                          FALSE, /* ignore content type */
                                          FALSE, /* use git diff format */
                                          svn_cmdline_output_encoding(iterpool),
-                                         outfile,
-                                         errfile,
+                                         outstream,
+                                         errstream,
                                          NULL,
                                          lb->ctx, iterpool);
                   if (err == SVN_NO_ERROR)

Modified: subversion/branches/fs-py/subversion/svn/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/svn/main.c?rev=1177691&r1=1177690&r2=1177691&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/svn/main.c (original)
+++ subversion/branches/fs-py/subversion/svn/main.c Fri Sep 30 15:02:43 2011
@@ -53,7 +53,6 @@
 #include "svn_hash.h"
 #include "svn_version.h"
 #include "cl.h"
-#include "svn_cache_config.h"
 
 #include "private/svn_wc_private.h"
 #include "private/svn_cmdline_private.h"
@@ -364,7 +363,7 @@ const apr_getopt_option_t svn_cl__option
  *
  * In most of the help text "PATH" is used where a working copy path is
  * required, "URL" where a repository URL is required and "TARGET" when
- * either a path or an url can be used.  Hmm, should this be part of the
+ * either a path or a url can be used.  Hmm, should this be part of the
  * help text?
  */
 
@@ -1450,7 +1449,6 @@ main(int argc, const char *argv[])
   svn_error_t *err;
   apr_allocator_t *allocator;
   apr_pool_t *pool;
-  svn_cache_config_t settings;
   int opt_id;
   apr_getopt_t *os;
   svn_cl__opt_state_t opt_state = { 0, { 0 } };
@@ -1498,17 +1496,6 @@ main(int argc, const char *argv[])
     }
 #endif
 
-  /* Per default, disable large expensive FS caching on the client side.
-   * We can still chose a different size for that cache later in the
-   * startup phase, e.g. after reading config files. If that does not
-   * happen until the first FSFS repository get opened, low initialization
-   * overhead caches will be used for the most time-critical structures.
-   *
-   * This is only relevant for FSFS over ra_local. */
-  settings = *svn_cache_config_get();
-  settings.cache_size = 0x0;
-  svn_cache_config_set(&settings);
-
   /* Initialize the RA library. */
   err = svn_ra_initialize(pool);
   if (err)

Modified: subversion/branches/fs-py/subversion/svn/propedit-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/svn/propedit-cmd.c?rev=1177691&r1=1177690&r2=1177691&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/svn/propedit-cmd.c (original)
+++ subversion/branches/fs-py/subversion/svn/propedit-cmd.c Fri Sep 30 15:02:43 2011
@@ -326,7 +326,7 @@ svn_cl__propedit(apr_getopt_t *os,
                 return svn_error_trace(err);
 
               /* Print a message if we successfully committed or if it
-                 was just a wc propset (but not if the user aborted an URL
+                 was just a wc propset (but not if the user aborted a URL
                  propedit). */
               if (!svn_path_is_url(target))
                 SVN_ERR(svn_cmdline_printf(

Modified: subversion/branches/fs-py/subversion/svn/schema/status.rnc
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/svn/schema/status.rnc?rev=1177691&r1=1177690&r2=1177691&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/svn/schema/status.rnc (original)
+++ subversion/branches/fs-py/subversion/svn/schema/status.rnc Fri Sep 30 15:02:43 2011
@@ -70,7 +70,11 @@ attlist.wc-status &=
   attribute switched { "true" | "false" }?,
   ## Tree-conflict status of the item.
   [ a:defaultValue = "false" ]
-  attribute tree-conflicted { "true" | "false" }?
+  attribute tree-conflicted { "true" | "false" }?,
+  ## If root of a move-here, the local path to the move source.
+  attribute moved-from { text }?,
+  ## If root of a move-away, the local path to the move destination.
+  attribute moved-to { text }?
 
 ## Status in repository (if --update was specified).
 repos-status = element repos-status { attlist.repos-status, lock? }

Modified: subversion/branches/fs-py/subversion/svn/status.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/svn/status.c?rev=1177691&r1=1177690&r2=1177691&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/svn/status.c (original)
+++ subversion/branches/fs-py/subversion/svn/status.c Fri Sep 30 15:02:43 2011
@@ -275,31 +275,31 @@ print_status(const char *path,
   /* Note that moved-from and moved-to information is only available in STATUS
    * for (op-)roots of a move. Those are exactly the nodes we want to show
    * move info for in 'svn status'. See also comments in svn_wc_status3_t. */
-
-  if (status->moved_from_abspath)
+  if (status->moved_from_abspath || status->moved_to_abspath)
     {
       const char *cwd;
       const char *relpath;
       SVN_ERR(svn_dirent_get_absolute(&cwd, "", pool));
-      relpath = make_relpath(cwd, status->moved_from_abspath, pool, pool);
-      relpath = svn_dirent_local_style(relpath, pool);
-      moved_from_line = apr_pstrcat(pool, "\n        > ",
-                                    apr_psprintf(pool, _("moved from %s"),
-                                                 relpath),
-                                    (char *)NULL);
-    }
 
-  if (status->moved_to_abspath)
-    {
-      const char *cwd;
-      const char *relpath;
-      SVN_ERR(svn_dirent_get_absolute(&cwd, "", pool));
-      relpath = make_relpath(cwd, status->moved_to_abspath, pool, pool);
-      relpath = svn_dirent_local_style(relpath, pool);
-      moved_to_line = apr_pstrcat(pool, "\n        > ",
-                                  apr_psprintf(pool, _("moved to %s"),
-                                               relpath),
-                                  (char *)NULL);
+      if (status->moved_from_abspath)
+        {
+          relpath = make_relpath(cwd, status->moved_from_abspath, pool, pool);
+          relpath = svn_dirent_local_style(relpath, pool);
+          moved_from_line = apr_pstrcat(pool, "\n        > ",
+                                        apr_psprintf(pool, _("moved from %s"),
+                                                     relpath),
+                                        (char *)NULL);
+        }
+
+      if (status->moved_to_abspath)
+        {
+          relpath = make_relpath(cwd, status->moved_to_abspath, pool, pool);
+          relpath = svn_dirent_local_style(relpath, pool);
+          moved_to_line = apr_pstrcat(pool, "\n        > ",
+                                      apr_psprintf(pool, _("moved to %s"),
+                                                   relpath),
+                                      (char *)NULL);
+        }
     }
 
   if (detailed)
@@ -462,6 +462,24 @@ svn_cl__print_status_xml(const char *pat
   if (tree_conflicted)
     apr_hash_set(att_hash, "tree-conflicted", APR_HASH_KEY_STRING,
                  "true");
+  if (status->moved_from_abspath || status->moved_to_abspath)
+    {
+      const char *cwd;
+      const char *relpath;
+      SVN_ERR(svn_dirent_get_absolute(&cwd, "", pool));
+      if (status->moved_from_abspath)
+        {
+          relpath = make_relpath(cwd, status->moved_from_abspath, pool, pool);
+          relpath = svn_dirent_local_style(relpath, pool);
+          apr_hash_set(att_hash, "moved-from", APR_HASH_KEY_STRING, relpath);
+        }
+      if (status->moved_to_abspath)
+        {
+          relpath = make_relpath(cwd, status->moved_to_abspath, pool, pool);
+          relpath = svn_dirent_local_style(relpath, pool);
+          apr_hash_set(att_hash, "moved-to", APR_HASH_KEY_STRING, relpath);
+        }
+    }
   svn_xml_make_open_tag_hash(&sb, pool, svn_xml_normal, "wc-status",
                              att_hash);
 

Modified: subversion/branches/fs-py/subversion/svnrdump/dump_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/svnrdump/dump_editor.c?rev=1177691&r1=1177690&r2=1177691&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/svnrdump/dump_editor.c (original)
+++ subversion/branches/fs-py/subversion/svnrdump/dump_editor.c Fri Sep 30 15:02:43 2011
@@ -718,7 +718,7 @@ apply_textdelta(void *file_baton, const 
 
   LDR_DBG(("apply_textdelta %p\n", file_baton));
 
-  /* Use a temporary file to measure the text-content-length */
+  /* Use a temporary file to measure the Text-content-length */
   delta_filestream = svn_stream_from_aprfile2(eb->delta_file, TRUE, pool);
 
   /* Prepare to write the delta to the delta_filestream */
@@ -892,7 +892,7 @@ svn_rdump__get_dump_editor(const svn_del
                                             de, eb, editor, edit_baton, pool));
 
   SVN_ERR(svn_editor__insert_shims(editor, edit_baton, *editor, *edit_baton,
-                                   pool, pool));
+                                   NULL, NULL, NULL, NULL, pool, pool));
 
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/fs-py/subversion/svnserve/serve.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/svnserve/serve.c?rev=1177691&r1=1177690&r2=1177691&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/svnserve/serve.c (original)
+++ subversion/branches/fs-py/subversion/svnserve/serve.c Fri Sep 30 15:02:43 2011
@@ -1845,17 +1845,12 @@ static svn_error_t *get_mergeinfo(svn_ra
   apr_hash_index_t *hi;
   const char *inherit_word;
   svn_mergeinfo_inheritance_t inherit;
-  apr_uint64_t validate_inherited_mergeinfo;
   svn_boolean_t include_descendants;
   apr_pool_t *iterpool;
 
-  SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "l(?r)wb?B", &paths, &rev,
-                                 &inherit_word,
-                                 &include_descendants,
-                                 &validate_inherited_mergeinfo));
+  SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "l(?r)wb", &paths, &rev,
+                                 &inherit_word, &include_descendants));
   inherit = svn_inheritance_from_word(inherit_word);
-  if (validate_inherited_mergeinfo == SVN_RA_SVN_UNSPECIFIED_NUMBER)
-    validate_inherited_mergeinfo = FALSE;
 
   /* Canonicalize the paths which mergeinfo has been requested for. */
   canonical_paths = apr_array_make(pool, paths->nelts, sizeof(const char *));
@@ -1878,14 +1873,12 @@ static svn_error_t *get_mergeinfo(svn_ra
                                              pool)));
 
   SVN_ERR(trivial_auth_request(conn, pool, b));
-  SVN_CMD_ERR(svn_repos_fs_get_mergeinfo2(&mergeinfo, b->repos,
-                                          canonical_paths, rev,
-                                          inherit,
-                                          (svn_boolean_t)
-                                          validate_inherited_mergeinfo,
-                                          include_descendants,
-                                          authz_check_access_cb_func(b), b,
-                                          pool));
+  SVN_CMD_ERR(svn_repos_fs_get_mergeinfo(&mergeinfo, b->repos,
+                                         canonical_paths, rev,
+                                         inherit,
+                                         include_descendants,
+                                         authz_check_access_cb_func(b), b,
+                                         pool));
   SVN_ERR(svn_mergeinfo__remove_prefix_from_catalog(&mergeinfo, mergeinfo,
                                                     b->fs_path->data, pool));
   SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "w((!", "success"));
@@ -3229,12 +3222,7 @@ svn_error_t *serve(svn_ra_svn_conn_t *co
     SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "w(cc(!",
                                    "success", uuid, b.repos_url));
     if (supports_mergeinfo)
-      {
-        SVN_ERR(svn_ra_svn_write_word(conn, pool, SVN_RA_SVN_CAP_MERGEINFO));
-        SVN_ERR(svn_ra_svn_write_word(
-          conn, pool, SVN_RA_SVN_CAP_VALIDATE_INHERITED_MERGEINFO));
-      }
-
+      SVN_ERR(svn_ra_svn_write_word(conn, pool, SVN_RA_SVN_CAP_MERGEINFO));
     SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "!))"));
   }
 

Modified: subversion/branches/fs-py/subversion/svnsync/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/svnsync/main.c?rev=1177691&r1=1177690&r2=1177691&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/svnsync/main.c (original)
+++ subversion/branches/fs-py/subversion/svnsync/main.c Fri Sep 30 15:02:43 2011
@@ -1119,7 +1119,7 @@ replay_rev_started(svn_revnum_t revision
   *edit_baton = cancel_baton;
 
   SVN_ERR(svn_editor__insert_shims(editor, edit_baton, *editor, *edit_baton,
-                                   pool, pool));
+                                   NULL, NULL, NULL, NULL, pool, pool));
 
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/fs-py/subversion/svnversion/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/svnversion/main.c?rev=1177691&r1=1177690&r2=1177691&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/svnversion/main.c (original)
+++ subversion/branches/fs-py/subversion/svnversion/main.c Fri Sep 30 15:02:43 2011
@@ -68,7 +68,7 @@ help(const apr_getopt_option_t *options,
         "\n"
         "  The version number will be a single number if the working\n"
         "  copy is single revision, unmodified, not switched and with\n"
-        "  an URL that matches the TRAIL_URL argument.  If the working\n"
+        "  a URL that matches the TRAIL_URL argument.  If the working\n"
         "  copy is unusual the version number will be more complex:\n"
         "\n"
         "   4123:4168     mixed revision working copy\n"

Modified: subversion/branches/fs-py/subversion/tests/cmdline/basic_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/tests/cmdline/basic_tests.py?rev=1177691&r1=1177690&r2=1177691&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/tests/cmdline/basic_tests.py (original)
+++ subversion/branches/fs-py/subversion/tests/cmdline/basic_tests.py Fri Sep 30 15:02:43 2011
@@ -1182,7 +1182,7 @@ def basic_delete(sbox):
                                      'rm', '--force', foo_path)
   verify_file_deleted("Failed to remove unversioned file foo", foo_path)
 
-  # At one stage deleting an URL dumped core
+  # At one stage deleting a URL dumped core
   iota_URL = sbox.repo_url + '/iota'
 
   svntest.actions.run_and_verify_svn(None,
@@ -2623,7 +2623,7 @@ def basic_relocate(sbox):
   repo_dir = sbox.repo_dir
   repo_url = sbox.repo_url
   other_repo_dir, other_repo_url = sbox.add_repo_path('other')
-  shutil.copytree(repo_dir, other_repo_dir)
+  svntest.main.copy_repos(repo_dir, other_repo_dir, 1, 0)
 
   def _verify_url(wc_path, url):
     name = os.path.basename(wc_path)

Modified: subversion/branches/fs-py/subversion/tests/cmdline/externals_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/tests/cmdline/externals_tests.py?rev=1177691&r1=1177690&r2=1177691&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/tests/cmdline/externals_tests.py (original)
+++ subversion/branches/fs-py/subversion/tests/cmdline/externals_tests.py Fri Sep 30 15:02:43 2011
@@ -1886,7 +1886,7 @@ def file_externals_different_repos(sbox)
   r1_url = sbox.repo_url
 
   r2_dir, r2_url = sbox.add_repo_path('2')
-  shutil.copytree(sbox.repo_dir, r2_dir)
+  svntest.main.copy_repos(sbox.repo_dir, r2_dir, 1, 0)
 
 
   sbox.simple_propset('svn:externals',

Modified: subversion/branches/fs-py/subversion/tests/cmdline/lock_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/tests/cmdline/lock_tests.py?rev=1177691&r1=1177690&r2=1177691&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/tests/cmdline/lock_tests.py (original)
+++ subversion/branches/fs-py/subversion/tests/cmdline/lock_tests.py Fri Sep 30 15:02:43 2011
@@ -1335,7 +1335,7 @@ def unlock_wrong_token(sbox):
   svntest.actions.run_and_verify_svn(None, ".*locked by user", [], 'lock',
                                      file_path)
 
-  # Steal the lock as the same author, but using an URL to keep the old token
+  # Steal the lock as the same author, but using a URL to keep the old token
   # in the WC.
   svntest.actions.run_and_verify_svn(None, ".*locked by user", [], 'lock',
                                     "--force", file_url)

Modified: subversion/branches/fs-py/subversion/tests/cmdline/merge_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/tests/cmdline/merge_tests.py?rev=1177691&r1=1177690&r2=1177691&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/tests/cmdline/merge_tests.py (original)
+++ subversion/branches/fs-py/subversion/tests/cmdline/merge_tests.py Fri Sep 30 15:02:43 2011
@@ -9694,7 +9694,7 @@ def new_subtrees_should_not_break_merge(
     'D/H/psi'   : Item("This is the file 'psi'.\n"),
     'D/H/omega' : Item("New content"),
     'D/H/nu'    : Item("New content",
-                       props={SVN_PROP_MERGEINFO : '/A/D/H/nu:8'}),
+                       props={SVN_PROP_MERGEINFO : '/A/D/H/nu:7-8'}),
     })
   expected_skip = wc.State(A_COPY_path, { })
   svntest.actions.run_and_verify_merge(A_COPY_path, '4', '6',
@@ -9740,7 +9740,7 @@ def new_subtrees_should_not_break_merge(
     'H/psi'   : Item("This is the file 'psi'.\n"),
     'H/omega' : Item("This is the file 'omega'.\n"),
     'H/nu'    : Item("New content",
-                     props={SVN_PROP_MERGEINFO : '/A/D/H/nu:8'}),
+                     props={SVN_PROP_MERGEINFO : '/A/D/H/nu:7-8'}),
     })
   expected_skip = wc.State(D_COPY_path, { })
   svntest.actions.run_and_verify_merge(D_COPY_path, '6', '5',
@@ -9812,7 +9812,7 @@ def new_subtrees_should_not_break_merge(
     'D/H/psi'   : Item("This is the file 'psi'.\n"),
     'D/H/omega' : Item("New content"),
     'D/H/nu'    : Item("New content",
-                       props={SVN_PROP_MERGEINFO : '/A/D/H/nu:8'}),
+                       props={SVN_PROP_MERGEINFO : '/A/D/H/nu:7-8'}),
     })
   expected_skip = wc.State(A_COPY_path, { })
   svntest.actions.run_and_verify_merge(A_COPY_path, '5', '6',
@@ -12891,12 +12891,6 @@ def merge_target_and_subtrees_need_nonin
     None, expected_merge_output([[8]], ['U    ' + nu_COPY_path    + '\n',
                                         ' G   ' + nu_COPY_path    + '\n']),
     [], 'merge', '-c8', sbox.repo_url + '/A/D/G/nu', nu_COPY_path)
-  # Replicate pre 1.7 merge behavior where self-referential mergeinfo
-  # could be inherited, this keeps the original intent of this test intact,
-  # see http://subversion.tigris.org/issues/show_bug.cgi?id=3669#desc8
-  svntest.actions.run_and_verify_svn(None, None, [], 'ps',
-                                     SVN_PROP_MERGEINFO, '/A/D/G/nu:2-8',
-                                     nu_COPY_path)
 
   svntest.actions.run_and_verify_svn(
     None, expected_merge_output([[-6]], ['G    ' + omega_COPY_path    + '\n',
@@ -16244,6 +16238,7 @@ def merge_with_os_deleted_subtrees(sbox)
 # mergeinfo' and issue #3669 'inheritance can result in mergeinfo
 # describing nonexistent sources'
 @Issue(3668,3669)
+@XFail()
 def no_self_referential_or_nonexistent_inherited_mergeinfo(sbox):
   "don't inherit bogus mergeinfo"
 
@@ -16304,6 +16299,10 @@ def no_self_referential_or_nonexistent_i
   # Update the WC in preparation for merges.
   svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir)
 
+  # This test is marked as XFail because the following two merges
+  # create mergeinfo with both non-existent path-revs and self-referential
+  # mergeinfo.
+  #
   # Merge all available revisions from A/C/nu to A_COPY/C/nu.
   # The target has no explicit mergeinfo of its own but inherits mergeinfo
   # from A_COPY.  A_COPY has the mergeinfo '/A:2-9' so the naive mergeinfo
@@ -16789,11 +16788,15 @@ def merge_adds_subtree_with_mergeinfo(sb
     'B/lambda'  : Item("This is the file 'lambda'.\n"),
     'B/F'       : Item(),
     'C'         : Item(),
+    # C/nu will pick up the mergeinfo A_COPY/C/nu:8 which is self-referential.
+    # This is issue #3668 'inheritance can result in self-referential
+    # mergeinfo', but we'll allow it in this test since issue #3668 is
+    # tested elsewhere and is not the point of *this* test.
     'C/nu'      : Item("This is the file 'nu'.\n" \
                        "More work on the A_COPY branch.\n" \
                        "A faux conflict resolution.\n",
                        props={SVN_PROP_MERGEINFO :
-                              '/A/C/nu:9-11\n/A_COPY/C/nu:10'}),
+                              '/A/C/nu:9-11\n/A_COPY/C/nu:8,10'}),
     'D'         : Item(),
     'D/G'       : Item(),
     'D/G/pi'    : Item("This is the file 'pi'.\n"),

Modified: subversion/branches/fs-py/subversion/tests/cmdline/prop_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/tests/cmdline/prop_tests.py?rev=1177691&r1=1177690&r2=1177691&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/tests/cmdline/prop_tests.py (original)
+++ subversion/branches/fs-py/subversion/tests/cmdline/prop_tests.py Fri Sep 30 15:02:43 2011
@@ -1125,7 +1125,7 @@ def recursive_base_wc_ops(sbox):
 #----------------------------------------------------------------------
 
 def url_props_ops(sbox):
-  "property operations on an URL"
+  "property operations on a URL"
 
   # Bootstrap
   sbox.build()

Modified: subversion/branches/fs-py/subversion/tests/libsvn_delta/editor-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/tests/libsvn_delta/editor-test.c?rev=1177691&r1=1177690&r2=1177691&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/tests/libsvn_delta/editor-test.c (original)
+++ subversion/branches/fs-py/subversion/tests/libsvn_delta/editor-test.c Fri Sep 30 15:02:43 2011
@@ -52,6 +52,8 @@ add_directory_noop_cb(void *baton,
 static svn_error_t *
 add_file_noop_cb(void *baton,
                  const char *relpath,
+                 const svn_checksum_t *checksum,
+                 svn_stream_t *contents,
                  apr_hash_t *props,
                  svn_revnum_t replaces_rev,
                  apr_pool_t *scratch_pool)
@@ -264,7 +266,8 @@ editor_from_delta_editor_test(const svn_
 
       /* Construct our editor, and from it a delta editor. */
       SVN_ERR(get_noop_editor(&editor, NULL, NULL, NULL, iterpool, iterpool));
-      SVN_ERR(svn_delta_from_editor(&deditor, &dedit_baton, editor, iterpool));
+      SVN_ERR(svn_delta_from_editor(&deditor, &dedit_baton, editor,
+                                    NULL, NULL, iterpool));
 
       SVN_ERR(svn_repos_replay2(revision_root, "", SVN_INVALID_REVNUM, TRUE,
                                 deditor, dedit_baton, NULL, NULL, iterpool));

Propchange: subversion/branches/fs-py/subversion/tests/libsvn_subr/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Fri Sep 30 15:02:43 2011
@@ -34,3 +34,4 @@ dirent_uri-test
 auth-test
 eol-test
 subst_translate-test
+spillbuf-test

Modified: subversion/branches/fs-py/subversion/tests/libsvn_wc/op-depth-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/tests/libsvn_wc/op-depth-test.c?rev=1177691&r1=1177690&r2=1177691&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/tests/libsvn_wc/op-depth-test.c (original)
+++ subversion/branches/fs-py/subversion/tests/libsvn_wc/op-depth-test.c Fri Sep 30 15:02:43 2011
@@ -3634,6 +3634,41 @@ copy_file_externals(const svn_test_opts_
   return SVN_NO_ERROR;
 }
 
+static svn_error_t *
+copy_wc_wc_absent(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  svn_test__sandbox_t b;
+  nodes_row_t before[] = {
+    {0, "",      "normal",  1, ""},
+    {0, "A",     "normal",  1, "A"},
+    {0, "A/B",   "normal",  1, "A/B"},
+    {0, "A/B/E", "absent",  1, "A/B/E"},
+    {0}
+  };
+  nodes_row_t after[] = {
+    {0, "",      "normal",  1, ""},
+    {0, "A",     "normal",      1, "A"},
+    {0, "A/B",   "normal",      1, "A/B"},
+    {0, "A/B/E", "absent",      1, "A/B/E"},
+    {1, "X",     "normal",      1, "A"},
+    {1, "X/B",   "normal",      1, "A/B"},
+    {1, "X/B/E", "incomplete",  1, "A/B/E"},
+    {0}
+  };
+  svn_error_t *err;
+
+  SVN_ERR(svn_test__sandbox_create(&b, "copy_wc_wc_absent", opts, pool));
+  SVN_ERR(insert_dirs(&b, before));
+  SVN_ERR(check_db_rows(&b, "", before));
+  SVN_ERR(disk_mkdir(&b, "A"));
+  err = wc_copy(&b, "A", "X");
+  SVN_TEST_ASSERT(err && err->apr_err == SVN_ERR_WC_PATH_UNEXPECTED_STATUS);
+  svn_error_clear(err);
+  SVN_ERR(check_db_rows(&b, "", after));
+
+  return SVN_NO_ERROR;
+}
+
 /* ---------------------------------------------------------------------- */
 /* The list of test functions */
 
@@ -3698,5 +3733,7 @@ struct svn_test_descriptor_t test_funcs[
                        "revert_file_externals"),
     SVN_TEST_OPTS_PASS(copy_file_externals,
                        "copy_file_externals"),
+    SVN_TEST_OPTS_PASS(copy_wc_wc_absent,
+                       "test_wc_wc_copy_absent"),
     SVN_TEST_NULL
   };

Modified: subversion/branches/fs-py/tools/client-side/bash_completion
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/tools/client-side/bash_completion?rev=1177691&r1=1177690&r2=1177691&view=diff
==============================================================================
--- subversion/branches/fs-py/tools/client-side/bash_completion (original)
+++ subversion/branches/fs-py/tools/client-side/bash_completion Fri Sep 30 15:02:43 2011
@@ -167,7 +167,7 @@ _svn()
 	cmds="$cmds info list ls lock log merge mergeinfo mkdir move mv rename"
 	cmds="$cmds patch propdel pdel propedit pedit propget pget proplist"
 	cmds="$cmds plist propset pset relocate resolve resolved revert status"
-	cmds="$cmds  switch unlock update"
+	cmds="$cmds  switch unlock update upgrade"
 
 	# help options have a strange command status...
 	local helpOpts='--help -h'
@@ -182,7 +182,7 @@ _svn()
 	optsParam="$optsParam|--old|--new|--config-dir|--config-option"
 	optsParam="$optsParam|--native-eol|-l|--limit|-c|--change"
 	optsParam="$optsParam|--depth|--set-depth|--with-revprop"
-	optsParam="$optsParam|--changelist|--accept|--show-revs"
+	optsParam="$optsParam|--cl|--changelist|--accept|--show-revs"
 
 	# svn:* and other (env SVN_BASH_*_PROPS) properties
 	local svnProps revProps allProps psCmds propCmds
@@ -788,12 +788,14 @@ _svn()
 	fi
 
 	# otherwise build possible options for the command
-	pOpts="--username --password --no-auth-cache --non-interactive"
+	pOpts="--username --password --no-auth-cache --non-interactive \
+	       --trust-server-cert"
 	mOpts="-m --message -F --file --encoding --force-log --with-revprop"
 	rOpts="-r --revision"
 	qOpts="-q --quiet"
 	nOpts="-N --non-recursive --depth"
 	gOpts="-g --use-merge-history"
+	cOpts="--cl --changelist"
 
 	cmdOpts=
 	case $cmd in
@@ -812,22 +814,23 @@ _svn()
 		cmdOpts="$rOpts $pOpts"
 		;;
 	changelist|cl)
-		cmdOpts="--targets $pOpts $qOpts --changelist \
+		cmdOpts="--targets $pOpts $qOpts $cOpts \
                          -R --recursive --depth --remove"
 		;;
 	checkout|co)
 		cmdOpts="$rOpts $qOpts $nOpts $pOpts --ignore-externals \
-                         --force --accept"
+                         --force"
 		;;
 	cleanup)
 		cmdOpts="--diff3-cmd $pOpts"
 		;;
 	commit|ci)
 		cmdOpts="$mOpts $qOpts $nOpts --targets --editor-cmd $pOpts \
-		         --no-unlock --changelist --keep-changelists"
+		         --no-unlock $cOpts --keep-changelists"
 		;;
 	copy|cp)
-		cmdOpts="$mOpts $rOpts $qOpts --editor-cmd $pOpts --parents"
+		cmdOpts="$mOpts $rOpts $qOpts --editor-cmd $pOpts --parents \
+		         --ignore-externals"
 		;;
 	delete|del|remove|rm)
 		cmdOpts="--force $mOpts $qOpts --targets --editor-cmd $pOpts \
@@ -836,11 +839,12 @@ _svn()
 	diff|di)
 		cmdOpts="$rOpts -x --extensions --diff-cmd --no-diff-deleted \
 		         $nOpts $pOpts --force --old --new --notice-ancestry \
-		         -c --change --summarize --changelist --xml --svnpatch"
+		         -c --change --summarize $cOpts --xml --git \
+		         --internal-diff --show-copies-as-adds"
 		;;
 	export)
 		cmdOpts="$rOpts $qOpts $pOpts $nOpts --force --native-eol \
-                         --ignore-externals"
+                         --ignore-externals --ignore-keywords"
 		;;
 	help|h|\?)
 		cmdOpts=
@@ -851,7 +855,7 @@ _svn()
 		;;
 	info)
 		cmdOpts="$pOpts $rOpts --targets -R --recursive --depth \
-                         --incremental --xml --changelist"
+                         --incremental --xml $cOpts"
 		;;
 	list|ls)
 		cmdOpts="$rOpts -v --verbose -R --recursive $pOpts \
@@ -864,15 +868,18 @@ _svn()
 	log)
 		cmdOpts="$rOpts -v --verbose --targets $pOpts --stop-on-copy \
 		         --incremental --xml $qOpts -l --limit -c --change \
-                         $gOpts --with-all-revprops --with-revprop"
+                         $gOpts --with-all-revprops --with-revprop --depth \
+		         --diff --diff-cmd -x --extensions --internal-diff \
+		         --with-no-revprops"
 		;;
 	merge)
 		cmdOpts="$rOpts $nOpts $qOpts --force --dry-run --diff3-cmd \
 		         $pOpts --ignore-ancestry -c --change -x --extensions \
-                         --record-only --accept --reintegrate"
+                         --record-only --accept --reintegrate \
+		         --allow-mixed-revisions"
 		;;
 	mergeinfo)
-	        cmdOpts="$rOpts $pOpts --show-revs"
+	        cmdOpts="$rOpts $pOpts --depth --show-revs -R --recursive"
 		;;
 	mkdir)
 		cmdOpts="$mOpts $qOpts --editor-cmd $pOpts --parents"
@@ -882,10 +889,10 @@ _svn()
                          --parents"
 		;;
 	patch)
-		cmdOpts="$qOpts --force"
+		cmdOpts="$qOpts $pOpts --dry-run --ignore-whitespace --reverse-diff --strip"
 		;;
 	propdel|pdel|pd)
-		cmdOpts="$qOpts -R --recursive $rOpts $pOpts --changelist \
+		cmdOpts="$qOpts -R --recursive $rOpts $pOpts $cOpts \
                          --depth"
 		[[ $isRevProp || ! $prop ]] && cmdOpts="$cmdOpts --revprop"
 		;;
@@ -895,23 +902,23 @@ _svn()
 		    cmdOpts="$cmdOpts --revprop $rOpts"
 		;;
 	propget|pget|pg)
-	        cmdOpts="-v --verbose -R --recursive $rOpts --strict $pOpts --changelist \
+	        cmdOpts="-v --verbose -R --recursive $rOpts --strict $pOpts $cOpts \
                          --depth --xml"
 		[[ $isRevProp || ! $prop ]] && cmdOpts="$cmdOpts --revprop"
 		;;
 	proplist|plist|pl)
 		cmdOpts="-v --verbose -R --recursive $rOpts --revprop $qOpts \
-		         $pOpts --changelist --depth --xml"
+		         $pOpts $cOpts --depth --xml"
 		;;
 	propset|pset|ps)
 		cmdOpts="$qOpts --targets -R --recursive \
-		         --encoding $pOpts --force --changelist --depth"
+		         --encoding $pOpts --force $cOpts --depth"
 		[[ $isRevProp || ! $prop ]] && \
 		    cmdOpts="$cmdOpts --revprop $rOpts"
 		[[ $val ]] || cmdOpts="$cmdOpts -F --file"
 		;;
         relocate)
-		cmdOpts="--ignore-externals"
+		cmdOpts="--ignore-externals $pOpts"
 		;;
         resolve)
                 cmdOpts="--targets -R --recursive $qOpts $pOpts --accept \
@@ -921,25 +928,29 @@ _svn()
 		cmdOpts="--targets -R --recursive $qOpts $pOpts --depth"
 		;;
 	revert)
-		cmdOpts="--targets -R --recursive $qOpts --changelist \
+		cmdOpts="--targets -R --recursive $qOpts $cOpts \
                          --depth $pOpts"
 		;;
 	status|stat|st)
 		cmdOpts="-u --show-updates -v --verbose $nOpts $qOpts $pOpts \
 		         --no-ignore --ignore-externals --incremental --xml \
-                         --changelist"
+                         $cOpts"
 		;;
 	switch|sw)
 		cmdOpts="--relocate $rOpts $nOpts $qOpts $pOpts --diff3-cmd \
-                         --force --accept --ignore-externals --set-depth"
+                         --force --accept --ignore-externals --set-depth \
+		         --ignore-ancestry"
 		;;
 	unlock)
 		cmdOpts="--targets --force $pOpts"
 		;;
 	update|up)
 		cmdOpts="$rOpts $nOpts $qOpts $pOpts --diff3-cmd \
-                         --ignore-externals --force --accept --changelist \
-                         --editor-cmd --set-depth"
+                         --ignore-externals --force --accept $cOpts \
+                         --parents --editor-cmd --set-depth"
+		;;
+	upgrade)
+		cmdOpts="$qOpts $pOpts"
 		;;
 	*)
 		;;

Modified: subversion/branches/fs-py/tools/client-side/bash_completion_test
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/tools/client-side/bash_completion_test?rev=1177691&r1=1177690&r2=1177691&view=diff
==============================================================================
--- subversion/branches/fs-py/tools/client-side/bash_completion_test (original)
+++ subversion/branches/fs-py/tools/client-side/bash_completion_test Fri Sep 30 15:02:43 2011
@@ -116,7 +116,7 @@ get_svn_options() {
   { svn help "$1" |
       # Find the relevant lines; remove "arg" and description.
       sed -n -e '1,/^Valid options:$/d;/^  -/!d' \
-             -e 's/\( arg\)* * : .*//;p' |
+             -e 's/\( ARG\)* * : .*//;p' |
       # Remove brackets; put each word on its own line.
       tr -d '] ' | tr '[' '\n'
     # The following options are always accepted but not listed in the help

Modified: subversion/branches/fs-py/tools/dev/unix-build/Makefile.svn
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/tools/dev/unix-build/Makefile.svn?rev=1177691&r1=1177690&r2=1177691&view=diff
==============================================================================
--- subversion/branches/fs-py/tools/dev/unix-build/Makefile.svn (original)
+++ subversion/branches/fs-py/tools/dev/unix-build/Makefile.svn Fri Sep 30 15:02:43 2011
@@ -298,6 +298,10 @@ else
 THREADS_FLAG=--disable-threads
 endif
 
+ifdef POOL_DEBUG
+POOL_DEBUG_FLAG=--enable-pool-debug=all
+endif
+
 # configure apr
 $(APR_OBJDIR)/.configured: $(APR_OBJDIR)/.retrieved
 	cp $(APR_SRCDIR)/build/apr_hints.m4 \
@@ -311,7 +315,8 @@ $(APR_OBJDIR)/.configured: $(APR_OBJDIR)
 		$(APR_SRCDIR)/configure \
 		--prefix=$(PREFIX)/apr \
 		--enable-maintainer-mode \
-		$(THREADS_FLAG)
+		$(THREADS_FLAG) \
+		$(POOL_DEBUG_FLAG)
 	touch $@
 
 # compile apr
@@ -1223,7 +1228,17 @@ $(SVN_OBJDIR)/.installed: $(SVN_OBJDIR)/
 		&& make install
 	touch $@
 
-$(SVN_OBJDIR)/.bindings-compiled: $(SVN_OBJDIR)/.installed
+# SWIG 1.x and 2.x are not compatible. If SWIG 2.x is used to generated .swg
+# files and 1.x is used to build the bindings, the Python bindings fail to
+# load with errors such as "undefined symbol 'SWIG_Python_str_AsChar'".
+# So clean any pre-generated .swg files to make sure everything is done
+# by the same version of SWIG.
+$(SVN_OBJDIR)/.pre-generated-swig-cleaned:
+	-cd $(svn_builddir) \
+		&& make extraclean-swig
+	touch $@
+
+$(SVN_OBJDIR)/.bindings-compiled: $(SVN_OBJDIR)/.installed $(SVN_OBJDIR)/.pre-generated-swig-cleaned
 	cd $(svn_builddir) \
 		&& env LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) \
 			make swig-py
@@ -1504,3 +1519,9 @@ ifeq ($(ENABLE_JAVA_BINDINGS),yes)
 endif
 	@echo ""
 	@echo "Signatures:"
+	@echo
+	@echo "subversion-$(TAG).tar.gz"
+	@echo "`cat subversion-$(TAG).tar.gz.asc`" 
+	@echo
+	@echo "subversion-$(TAG).tar.bz2"
+	@echo "`cat subversion-$(TAG).tar.bz2.asc`" 



Mime
View raw message