You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by pr...@apache.org on 2013/03/18 10:35:29 UTC

svn commit: r1457684 [12/22] - in /subversion/branches/verify-keep-going: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ notes/ subversion/bindings/javahl/native/ subversion/bindings/javahl/src/org/apache/subversion/javahl/ subv...

Modified: subversion/branches/verify-keep-going/subversion/libsvn_wc/revert.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_wc/revert.c?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_wc/revert.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_wc/revert.c Mon Mar 18 09:35:24 2013
@@ -180,7 +180,7 @@ revert_restore_handle_copied_dirs(svn_bo
       if (cancel_func)
         SVN_ERR(cancel_func(cancel_baton));
 
-      if (child_info->kind != svn_kind_file)
+      if (child_info->kind != svn_node_file)
         continue;
 
       svn_pool_clear(iterpool);
@@ -210,7 +210,7 @@ revert_restore_handle_copied_dirs(svn_bo
       if (cancel_func)
         SVN_ERR(cancel_func(cancel_baton));
 
-      if (child_info->kind != svn_kind_dir)
+      if (child_info->kind != svn_node_dir)
         continue;
 
       svn_pool_clear(iterpool);
@@ -270,7 +270,7 @@ revert_restore(svn_wc__db_t *db,
 {
   svn_error_t *err;
   svn_wc__db_status_t status;
-  svn_kind_t kind;
+  svn_node_kind_t kind;
   svn_node_kind_t on_disk;
   svn_boolean_t notify_required;
   const apr_array_header_t *conflict_files;
@@ -281,7 +281,7 @@ revert_restore(svn_wc__db_t *db,
   svn_boolean_t special;
 #endif
   svn_boolean_t copied_here;
-  svn_kind_t reverted_kind;
+  svn_node_kind_t reverted_kind;
   svn_boolean_t is_wcroot;
 
   if (cancel_func)
@@ -345,7 +345,7 @@ revert_restore(svn_wc__db_t *db,
            * ### trying to restore anything to disk.
            * ### 'status' should be status_unknown but that doesn't exist. */
           status = svn_wc__db_status_normal;
-          kind = svn_kind_unknown;
+          kind = svn_node_unknown;
           recorded_size = SVN_INVALID_FILESIZE;
           recorded_time = 0;
         }
@@ -388,12 +388,12 @@ revert_restore(svn_wc__db_t *db,
   if (copied_here)
     {
       /* The revert target itself is the op-root of a copy. */
-      if (reverted_kind == svn_kind_file && on_disk == svn_node_file)
+      if (reverted_kind == svn_node_file && on_disk == svn_node_file)
         {
           SVN_ERR(svn_io_remove_file2(local_abspath, TRUE, scratch_pool));
           on_disk = svn_node_none;
         }
-      else if (reverted_kind == svn_kind_dir && on_disk == svn_node_dir)
+      else if (reverted_kind == svn_node_dir && on_disk == svn_node_dir)
         {
           svn_boolean_t removed;
 
@@ -415,18 +415,18 @@ revert_restore(svn_wc__db_t *db,
       && status != svn_wc__db_status_excluded
       && status != svn_wc__db_status_not_present)
     {
-      if (on_disk == svn_node_dir && kind != svn_kind_dir)
+      if (on_disk == svn_node_dir && kind != svn_node_dir)
         {
           SVN_ERR(svn_io_remove_dir2(local_abspath, FALSE,
                                      cancel_func, cancel_baton, scratch_pool));
           on_disk = svn_node_none;
         }
-      else if (on_disk == svn_node_file && kind != svn_kind_file)
+      else if (on_disk == svn_node_file && kind != svn_node_file)
         {
 #ifdef HAVE_SYMLINK
           /* Preserve symlinks pointing at directories. Changes on the
            * directory node have been reverted. The symlink should remain. */
-          if (!(special && kind == svn_kind_dir))
+          if (!(special && kind == svn_node_dir))
 #endif
             {
               SVN_ERR(svn_io_remove_file2(local_abspath, FALSE, scratch_pool));
@@ -558,10 +558,10 @@ revert_restore(svn_wc__db_t *db,
       && status != svn_wc__db_status_excluded
       && status != svn_wc__db_status_not_present)
     {
-      if (kind == svn_kind_dir)
+      if (kind == svn_node_dir)
         SVN_ERR(svn_io_dir_make(local_abspath, APR_OS_DEFAULT, scratch_pool));
 
-      if (kind == svn_kind_file)
+      if (kind == svn_node_file)
         {
           svn_skel_t *work_item;
 
@@ -595,7 +595,7 @@ revert_restore(svn_wc__db_t *db,
                                      scratch_pool),
                 scratch_pool);
 
-  if (depth == svn_depth_infinity && kind == svn_kind_dir)
+  if (depth == svn_depth_infinity && kind == svn_node_dir)
     {
       apr_pool_t *iterpool = svn_pool_create(scratch_pool);
       const apr_array_header_t *children;
@@ -811,13 +811,14 @@ revert_partial(svn_wc__db_t *db,
       /* For svn_depth_files: don't revert non-files.  */
       if (depth == svn_depth_files)
         {
-          svn_kind_t kind;
+          svn_node_kind_t kind;
 
           SVN_ERR(svn_wc__db_read_kind(&kind, db, child_abspath,
                                        FALSE /* allow_missing */,
+                                       TRUE /* show_deleted */,
                                        FALSE /* show_hidden */,
                                        iterpool));
-          if (kind != svn_kind_file)
+          if (kind != svn_node_file)
             continue;
         }
 

Modified: subversion/branches/verify-keep-going/subversion/libsvn_wc/status.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_wc/status.c?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_wc/status.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_wc/status.c Mon Mar 18 09:35:24 2013
@@ -276,7 +276,7 @@ read_info(const struct svn_wc__db_info_t
   if (mtb->have_base
       && (mtb->status == svn_wc__db_status_added
           || mtb->status == svn_wc__db_status_deleted
-          || mtb->kind == svn_kind_file))
+          || mtb->kind == svn_node_file))
     {
       svn_boolean_t update_root;
       svn_wc__db_lock_t **lock_arg = NULL;
@@ -291,7 +291,7 @@ read_info(const struct svn_wc__db_info_t
                                        db, local_abspath,
                                        result_pool, scratch_pool));
 
-      mtb->file_external = (update_root && mtb->kind == svn_kind_file);
+      mtb->file_external = (update_root && mtb->kind == svn_node_file);
 
       if (mtb->status == svn_wc__db_status_deleted)
         {
@@ -346,16 +346,14 @@ read_info(const struct svn_wc__db_info_t
    * cheaply as svn_wc__db_read_children_info() does. */
   if (mtb->status == svn_wc__db_status_added)
     {
-      const char *moved_from_abspath = NULL;
       svn_wc__db_status_t status;
 
       SVN_ERR(svn_wc__db_scan_addition(&status, NULL, NULL, NULL, NULL,
                                        NULL, NULL, NULL, NULL,
-                                       &moved_from_abspath,
-                                       NULL,
                                        db, local_abspath,
                                        result_pool, scratch_pool));
-      mtb->moved_here = (moved_from_abspath != NULL);
+
+      mtb->moved_here = (status == svn_wc__db_status_moved_here);
       mtb->incomplete = (status == svn_wc__db_status_incomplete);
     }
 
@@ -363,7 +361,7 @@ read_info(const struct svn_wc__db_info_t
   mtb->copied = (original_repos_relpath != NULL);
 
 #ifdef HAVE_SYMLINK
-  if (mtb->kind == svn_kind_file
+  if (mtb->kind == svn_node_file
       && (mtb->had_props || mtb->props_mod))
     {
       apr_hash_t *properties;
@@ -403,9 +401,9 @@ get_repos_root_url_relpath(const char **
 {
   if (info->repos_relpath && info->repos_root_url)
     {
-      *repos_relpath = info->repos_relpath;
-      *repos_root_url = info->repos_root_url;
-      *repos_uuid = info->repos_uuid;
+      *repos_relpath = apr_pstrdup(result_pool, info->repos_relpath);
+      *repos_root_url = apr_pstrdup(result_pool, info->repos_root_url);
+      *repos_uuid = apr_pstrdup(result_pool, info->repos_uuid);
     }
   else if (parent_repos_relpath && parent_repos_root_url)
     {
@@ -413,15 +411,15 @@ get_repos_root_url_relpath(const char **
                                         svn_dirent_basename(local_abspath,
                                                             NULL),
                                         result_pool);
-      *repos_root_url = parent_repos_root_url;
-      *repos_uuid = parent_repos_uuid;
+      *repos_root_url = apr_pstrdup(result_pool, parent_repos_root_url);
+      *repos_uuid = apr_pstrdup(result_pool, parent_repos_uuid);
     }
   else if (info->status == svn_wc__db_status_added)
     {
       SVN_ERR(svn_wc__db_scan_addition(NULL, NULL,
                                        repos_relpath, repos_root_url,
                                        repos_uuid, NULL, NULL, NULL, NULL,
-                                       NULL, NULL, db, local_abspath,
+                                       db, local_abspath,
                                        result_pool, scratch_pool));
     }
   else if (info->have_base)
@@ -484,10 +482,6 @@ assemble_status(svn_wc_status3_t **statu
   svn_boolean_t switched_p = FALSE;
   svn_boolean_t copied = FALSE;
   svn_boolean_t conflicted;
-  svn_error_t *err;
-  const char *repos_relpath;
-  const char *repos_root_url;
-  const char *repos_uuid;
   const char *moved_from_abspath = NULL;
   svn_filesize_t filesize = (dirent && (dirent->kind == svn_node_file))
                                 ? dirent->filesize
@@ -544,7 +538,7 @@ assemble_status(svn_wc_status3_t **statu
     {
       /* Examine whether our target is missing or obstructed. To detect
        * obstructions, we have to look at the on-disk status in DIRENT. */
-      svn_node_kind_t expected_kind = (info->kind == svn_kind_dir) 
+      svn_node_kind_t expected_kind = (info->kind == svn_node_dir) 
                                         ? svn_node_dir
                                         : svn_node_file;
 
@@ -573,7 +567,7 @@ assemble_status(svn_wc_status3_t **statu
 
      If it was changed, then the subdir is incomplete or missing/obstructed.
    */
-  if (info->kind != svn_kind_dir
+  if (info->kind != svn_node_dir
       && node_status == svn_wc_status_normal)
     {
       svn_boolean_t text_modified_p = FALSE;
@@ -585,8 +579,8 @@ assemble_status(svn_wc_status3_t **statu
             precedence over M. */
 
       /* If the entry is a file, check for textual modifications */
-      if ((info->kind == svn_kind_file
-          || info->kind == svn_kind_symlink)
+      if ((info->kind == svn_node_file
+          || info->kind == svn_node_symlink)
 #ifdef HAVE_SYMLINK
              && (info->special == (dirent && dirent->special))
 #endif /* HAVE_SYMLINK */
@@ -608,6 +602,7 @@ assemble_status(svn_wc_status3_t **statu
             text_modified_p = FALSE;
           else
             {
+              svn_error_t *err;
               err = svn_wc__internal_file_modified_p(&text_modified_p,
                                                      db, local_abspath,
                                                      FALSE, scratch_pool);
@@ -690,12 +685,24 @@ assemble_status(svn_wc_status3_t **statu
 
           /* Get moved-from info (only for potential op-roots of a move). */
           if (info->moved_here && info->op_root)
-            SVN_ERR(svn_wc__db_scan_addition(NULL, NULL, NULL, NULL, NULL,
-                                             NULL, NULL, NULL, NULL,
-                                             &moved_from_abspath,
-                                             NULL,
-                                             db, local_abspath,
-                                             result_pool, scratch_pool));
+            {
+              svn_error_t *err;
+              err = svn_wc__db_scan_moved(&moved_from_abspath, NULL, NULL, NULL,
+                                          db, local_abspath,
+                                          result_pool, scratch_pool);
+
+              if (err)
+                {
+                  if (err->apr_err != SVN_ERR_WC_PATH_UNEXPECTED_STATUS)
+                    svn_error_trace(err);
+
+                  svn_error_clear(err);
+                  /* We are no longer moved... So most likely we are somehow
+                     changing the db for things like resolving conflicts. */
+
+                  moved_from_abspath = NULL;
+                }
+            }
         }
     }
 
@@ -725,28 +732,20 @@ assemble_status(svn_wc_status3_t **statu
         return SVN_NO_ERROR;
       }
 
-  SVN_ERR(get_repos_root_url_relpath(&repos_relpath, &repos_root_url,
-                                     &repos_uuid, info,
-                                     parent_repos_relpath,
-                                     parent_repos_root_url,
-                                     parent_repos_uuid,
-                                     db, local_abspath,
-                                     scratch_pool, scratch_pool));
-
   /* 6. Build and return a status structure. */
 
   stat = apr_pcalloc(result_pool, sizeof(**status));
 
   switch (info->kind)
     {
-      case svn_kind_dir:
+      case svn_node_dir:
         stat->kind = svn_node_dir;
         break;
-      case svn_kind_file:
-      case svn_kind_symlink:
+      case svn_node_file:
+      case svn_node_symlink:
         stat->kind = svn_node_file;
         break;
-      case svn_kind_unknown:
+      case svn_node_unknown:
       default:
         stat->kind = svn_node_unknown;
     }
@@ -763,7 +762,8 @@ assemble_status(svn_wc_status3_t **statu
   stat->repos_lock = repos_lock;
   stat->revision = info->revnum;
   stat->changed_rev = info->changed_rev;
-  stat->changed_author = info->changed_author;
+  if (info->changed_author)
+    stat->changed_author = apr_pstrdup(result_pool, info->changed_author);
   stat->changed_date = info->changed_date;
 
   stat->ood_kind = svn_node_none;
@@ -771,10 +771,19 @@ assemble_status(svn_wc_status3_t **statu
   stat->ood_changed_date = 0;
   stat->ood_changed_author = NULL;
 
+  SVN_ERR(get_repos_root_url_relpath(&stat->repos_relpath,
+                                     &stat->repos_root_url,
+                                     &stat->repos_uuid, info,
+                                     parent_repos_relpath,
+                                     parent_repos_root_url,
+                                     parent_repos_uuid,
+                                     db, local_abspath,
+                                     result_pool, scratch_pool));
+
   if (info->lock)
     {
-      svn_lock_t *lck = apr_pcalloc(result_pool, sizeof(*lck));
-      lck->path = repos_relpath;
+      svn_lock_t *lck = svn_lock_create(result_pool);
+      lck->path = stat->repos_relpath;
       lck->token = info->lock->token;
       lck->owner = info->lock->owner;
       lck->comment = info->lock->comment;
@@ -787,13 +796,12 @@ assemble_status(svn_wc_status3_t **statu
   stat->locked = info->locked;
   stat->conflicted = conflicted;
   stat->versioned = TRUE;
-  stat->changelist = info->changelist;
-  stat->repos_root_url = repos_root_url;
-  stat->repos_relpath = repos_relpath;
-  stat->repos_uuid = repos_uuid;
+  if (info->changelist)
+    stat->changelist = apr_pstrdup(result_pool, info->changelist);
 
   stat->moved_from_abspath = moved_from_abspath;
-  stat->moved_to_abspath = info->moved_to_abspath;
+  if (info->moved_to_abspath)
+    stat->moved_to_abspath = apr_pstrdup(result_pool, info->moved_to_abspath);
 
   stat->file_external = info->file_external;
 
@@ -928,13 +936,10 @@ send_status_structure(const struct walk_
 }
 
 
-/* Store in *PATTERNS a list of all svn:ignore properties from
-   the working copy directory, including the default ignores
-   passed in as IGNORES.
-
-   If INHERITED_PATTERNS is not NULL, then store in *INHERITED_PATTERNS
-   a list of all ignore patterns defined by the svn:inherited-ignores
-   properties explicitly set on, or inherited by, LOCAL_ABSPATH.
+/* Store in *PATTERNS a list of ignores collected from svn:ignore properties
+   on LOCAL_ABSPATH and svn:global-ignores on LOCAL_ABSPATH and its
+   repository ancestors (as cached in the working copy), including the default
+   ignores passed in as IGNORES.
 
    Upon return, *PATTERNS will contain zero or more (const char *)
    patterns from the value of the SVN_PROP_IGNORE property set on
@@ -943,10 +948,7 @@ send_status_structure(const struct walk_
    IGNORES is a list of patterns to include; typically this will
    be the default ignores as, for example, specified in a config file.
 
-   If MAY_HAVE_PROPS is false, local_abspath is assumed to have no
-   properties.
-
-   LOCAL_ABSPATH and DB control how to access the ignore information.
+   DB, LOCAL_ABSPATH is used to access the working copy.
 
    Allocate results in RESULT_POOL, temporary stuffs in SCRATCH_POOL.
 
@@ -954,17 +956,16 @@ send_status_structure(const struct walk_
 */
 static svn_error_t *
 collect_ignore_patterns(apr_array_header_t **patterns,
-                        apr_array_header_t **inherited_patterns,
                         svn_wc__db_t *db,
                         const char *local_abspath,
                         const apr_array_header_t *ignores,
-                        svn_boolean_t may_have_props,
                         apr_pool_t *result_pool,
                         apr_pool_t *scratch_pool)
 {
   int i;
-  const svn_string_t *value;
-  apr_hash_t *props = NULL;
+  apr_hash_t *props;
+  apr_array_header_t *inherited_props;
+  svn_error_t *err;
 
   /* ### assert we are passed a directory? */
 
@@ -978,56 +979,46 @@ collect_ignore_patterns(apr_array_header
                                                             ignore);
     }
 
-  if (may_have_props)
+  err = svn_wc__db_read_inherited_props(&inherited_props, &props,
+                                        db, local_abspath,
+                                        SVN_PROP_INHERITABLE_IGNORES,
+                                        scratch_pool, scratch_pool);
+
+  if (err)
     {
-      /* Add any svn:ignore globs to the PATTERNS array. */
-      SVN_ERR(svn_wc__db_read_props(&props, db, local_abspath,
-                                    scratch_pool, scratch_pool));
+      if (err->apr_err != SVN_ERR_WC_PATH_UNEXPECTED_STATUS)
+        return svn_error_trace(err);
 
-      if (!props)
-        return SVN_NO_ERROR;
+      svn_error_clear(err);
+      return SVN_NO_ERROR;
+    }
+
+  if (props)
+    {
+      const svn_string_t *value;
 
-      value = apr_hash_get(props, SVN_PROP_IGNORE, APR_HASH_KEY_STRING);
+      value = svn_hash_gets(props, SVN_PROP_IGNORE);
+      if (value)
+        svn_cstring_split_append(*patterns, value->data, "\n\r", FALSE,
+                                 result_pool);
 
-      if (value != NULL)
+      value = svn_hash_gets(props, SVN_PROP_INHERITABLE_IGNORES);
+      if (value)
         svn_cstring_split_append(*patterns, value->data, "\n\r", FALSE,
                                  result_pool);
     }
 
-  if (inherited_patterns)
+  for (i = 0; i < inherited_props->nelts; i++)
     {
-      apr_array_header_t *inherited_props;
+      svn_prop_inherited_item_t *elt = APR_ARRAY_IDX(
+        inherited_props, i, svn_prop_inherited_item_t *);
+      const svn_string_t *value;
 
-      *inherited_patterns = apr_array_make(result_pool, 1,
-                                           sizeof(const char *));
-      if (props)
-        {
-          value = apr_hash_get(props, SVN_PROP_INHERITABLE_IGNORES,
-                               APR_HASH_KEY_STRING);
-          if (value != NULL)
-            svn_cstring_split_append(*inherited_patterns, value->data, "\n\r",
-                                     FALSE, result_pool);      
-        }
-
-      SVN_ERR(svn_wc__db_read_inherited_props(&inherited_props,
-                                              db, local_abspath,
-                                              SVN_PROP_INHERITABLE_IGNORES,
-                                              scratch_pool, scratch_pool));
-      for (i = 0; i < inherited_props->nelts; i++)
-        {
-          apr_hash_index_t *hi;
-          svn_prop_inherited_item_t *elt = APR_ARRAY_IDX(
-            inherited_props, i, svn_prop_inherited_item_t *);
-
-          for (hi = apr_hash_first(scratch_pool, elt->prop_hash);
-               hi;
-               hi = apr_hash_next(hi))
-            {
-              const svn_string_t *propval = svn__apr_hash_index_val(hi);
-              svn_cstring_split_append(*inherited_patterns, propval->data,
-                                       "\n\r", FALSE, result_pool);   
-            }
-        }
+      value = svn_hash_gets(elt->prop_hash, SVN_PROP_INHERITABLE_IGNORES);
+
+      if (value)
+        svn_cstring_split_append(*patterns, value->data,
+                                 "\n\r", FALSE, result_pool);
     }
 
   return SVN_NO_ERROR;
@@ -1073,9 +1064,8 @@ is_external_path(apr_hash_t *externals,
    requested.  PATH_KIND is the node kind of NAME as determined by the
    caller.  PATH_SPECIAL is the special status of the path, also determined
    by the caller.
-   PATTERNS and INHERITED_PATTERNS point to a list of filename patterns which
-   are marked as ignored.  None of these parameter may be NULL.  EXTERNALS is
-   a hash of known externals definitions for this status run.
+   PATTERNS points to a list of filename patterns which are marked as ignored.
+   None of these parameter may be NULL.
 
    If NO_IGNORE is TRUE, the item will be added regardless of
    whether it is ignored; otherwise we will only add the item if it
@@ -1089,26 +1079,21 @@ send_unversioned_item(const struct walk_
                       const svn_io_dirent2_t *dirent,
                       svn_boolean_t tree_conflicted,
                       const apr_array_header_t *patterns,
-                      const apr_array_header_t *inherited_patterns,
                       svn_boolean_t no_ignore,
                       svn_wc_status_func4_t status_func,
                       void *status_baton,
                       apr_pool_t *scratch_pool)
 {
   svn_boolean_t is_ignored;
-  svn_boolean_t is_mandatory_ignored;
   svn_boolean_t is_external;
   svn_wc_status3_t *status;
   const char *base_name = svn_dirent_basename(local_abspath, NULL);
 
   is_ignored = svn_wc_match_ignore_list(base_name, patterns, scratch_pool);
-  is_mandatory_ignored = svn_wc_match_ignore_list(base_name,
-                                                  inherited_patterns,
-                                                  scratch_pool);
   SVN_ERR(assemble_unversioned(&status,
                                wb->db, local_abspath,
                                dirent, tree_conflicted,
-                               is_ignored || is_mandatory_ignored,
+                               is_ignored,
                                scratch_pool, scratch_pool));
 
   is_external = is_external_path(wb->externals, local_abspath, scratch_pool);
@@ -1124,7 +1109,7 @@ send_unversioned_item(const struct walk_
   /* If we aren't ignoring it, or if it's an externals path, pass this
      entry to the status func. */
   if (no_ignore
-      || !(is_ignored || is_mandatory_ignored)
+      || !is_ignored
       || is_external)
     return svn_error_trace((*status_func)(status_baton, local_abspath,
                                           status, scratch_pool));
@@ -1171,22 +1156,18 @@ get_dir_status(const struct walk_status_
  * DIR_REPOS_* should reflect LOCAL_ABSPATH's parent URL, i.e. LOCAL_ABSPATH's
  * URL treated with svn_uri_dirname(). ### TODO verify this (externals)
  *
- * DIR_HAS_PROPS is a boolean indicating whether PARENT_ABSPATH has properties.
- *
- * If *COLLECTED_IGNORE_PATTERNS or COLLECTED_INHERITED_IGNORE_PATTERNS are NULL
- * and ignore patterns are needed in this call, then *COLLECTED_IGNORE_PATTERNS
- * *COLLECTED_INHERITED_IGNORE_PATTERNS will be set to an apr_array_header_t*
+ * If *COLLECTED_IGNORE_PATTERNS is NULL and ignore patterns are needed in this
+ * call, then *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 and 
- * COLLECTED_INHERITED_IGNORE_PATTERNS is passed non-NULL, it is assumed they
- * already hold those results. This speeds up repeated calls with the same
- * PARENT_ABSPATH.
+ * PARENT_ABSPATH and IGNORE_PATTERNS. If *COLLECTED_IGNORE_PATTERNS is passed
+ * non-NULL, it is assumed it already holds those results.
+ * This speeds up repeated calls with the same PARENT_ABSPATH.
  *
- * *COLLECTED_IGNORE_PATTERNS and COLLECTED_INHERITED_IGNORE_PATTERNS will be
- * allocated in RESULT_POOL. All other allocations are made in SCRATCH_POOL.
+ * *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*
+static svn_error_t *
 one_child_status(const struct walk_status_baton *wb,
                  const char *local_abspath,
                  const char *parent_abspath,
@@ -1195,10 +1176,8 @@ one_child_status(const struct walk_statu
                  const char *dir_repos_root_url,
                  const char *dir_repos_relpath,
                  const char *dir_repos_uuid,
-                 svn_boolean_t dir_has_props,
                  svn_boolean_t unversioned_tree_conflicted,
                  apr_array_header_t **collected_ignore_patterns,
-                 apr_array_header_t **collected_inherited_ignore_patterns,
                  const apr_array_header_t *ignore_patterns,
                  svn_depth_t depth,
                  svn_boolean_t get_all,
@@ -1217,11 +1196,11 @@ one_child_status(const struct walk_statu
       && 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_kind_unknown
+      && !(info->kind == svn_node_unknown
            && info->status == svn_wc__db_status_normal))
     {
       if (depth == svn_depth_files
-          && info->kind == svn_kind_dir)
+          && info->kind == svn_node_dir)
         {
           return SVN_NO_ERROR;
         }
@@ -1236,7 +1215,7 @@ one_child_status(const struct walk_statu
 
       /* Descend in subdirectories. */
       if (depth == svn_depth_infinity
-          && info->kind == svn_kind_dir)
+          && info->kind == svn_node_dir)
         {
           SVN_ERR(get_dir_status(wb, local_abspath, TRUE,
                                  dir_repos_root_url, dir_repos_relpath,
@@ -1266,7 +1245,7 @@ one_child_status(const struct walk_statu
       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),
+      if (svn_wc_is_adm_dir(svn_dirent_basename(local_abspath, NULL),
                             scratch_pool))
         return SVN_NO_ERROR;
     }
@@ -1281,13 +1260,9 @@ one_child_status(const struct walk_statu
    * 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)
-      || (collected_inherited_ignore_patterns
-          && ! collected_inherited_ignore_patterns))
+  if (ignore_patterns && ! *collected_ignore_patterns)
     SVN_ERR(collect_ignore_patterns(collected_ignore_patterns,
-                                    collected_inherited_ignore_patterns,
                                     wb->db, parent_abspath, ignore_patterns,
-                                    dir_has_props,
                                     result_pool, scratch_pool));
 
   SVN_ERR(send_unversioned_item(wb,
@@ -1295,7 +1270,6 @@ one_child_status(const struct walk_statu
                                 dirent,
                                 conflicted,
                                 *collected_ignore_patterns,
-                                *collected_inherited_ignore_patterns,
                                 no_ignore,
                                 status_func, status_baton,
                                 scratch_pool));
@@ -1345,11 +1319,9 @@ get_dir_status(const struct walk_status_
   const char *dir_repos_root_url;
   const char *dir_repos_relpath;
   const char *dir_repos_uuid;
-  svn_boolean_t dir_has_props;
   apr_hash_t *dirents, *nodes, *conflicts, *all_children;
   apr_array_header_t *sorted_children;
   apr_array_header_t *collected_ignore_patterns = NULL;
-  apr_array_header_t *collected_inherited_ignore_patterns = NULL;
   apr_pool_t *iterpool;
   svn_error_t *err;
   int i;
@@ -1445,8 +1417,6 @@ get_dir_status(const struct walk_status_
   if (depth == svn_depth_empty)
     return SVN_NO_ERROR;
 
-  dir_has_props = (dir_info->had_props || dir_info->props_mod);
-
   /* Walk all the children of this directory. */
   sorted_children = svn_sort__hash(all_children,
                                    svn_sort_compare_items_lexically,
@@ -1478,10 +1448,8 @@ get_dir_status(const struct walk_status_
                                dir_repos_root_url,
                                dir_repos_relpath,
                                dir_repos_uuid,
-                               dir_has_props,
                                apr_hash_get(conflicts, key, klen) != NULL,
                                &collected_ignore_patterns,
-                               &collected_inherited_ignore_patterns,
                                ignore_patterns,
                                depth,
                                get_all,
@@ -1531,7 +1499,6 @@ get_child_status(const struct walk_statu
   const char *dir_repos_uuid;
   const struct svn_wc__db_info_t *dir_info;
   apr_array_header_t *collected_ignore_patterns = NULL;
-  apr_array_header_t *collected_inherited_ignore_patterns = NULL;
   const char *parent_abspath = svn_dirent_dirname(local_abspath,
                                                   scratch_pool);
 
@@ -1563,10 +1530,8 @@ get_child_status(const struct walk_statu
                            dir_repos_root_url,
                            dir_repos_relpath,
                            dir_repos_uuid,
-                           (dir_info->had_props || dir_info->props_mod),
                            FALSE, /* unversioned_tree_conflicted */
                            &collected_ignore_patterns,
-                           &collected_inherited_ignore_patterns,
                            ignore_patterns,
                            svn_depth_empty,
                            get_all,
@@ -2782,7 +2747,7 @@ svn_wc__internal_walk_status(svn_wc__db_
     }
 
   if (info
-      && info->kind == svn_kind_dir
+      && info->kind == svn_node_dir
       && info->status != svn_wc__db_status_not_present
       && info->status != svn_wc__db_status_excluded
       && info->status != svn_wc__db_status_server_excluded)
@@ -2909,7 +2874,7 @@ internal_status(svn_wc_status3_t **statu
                 apr_pool_t *scratch_pool)
 {
   const svn_io_dirent2_t *dirent;
-  svn_kind_t node_kind;
+  svn_node_kind_t node_kind;
   const char *parent_repos_relpath;
   const char *parent_repos_root_url;
   const char *parent_repos_uuid;
@@ -2933,7 +2898,7 @@ internal_status(svn_wc_status3_t **statu
         return svn_error_trace(err);
 
       svn_error_clear(err);
-      node_kind = svn_kind_unknown;
+      node_kind = svn_node_unknown;
       /* Ensure conflicted is always set, but don't hide tree conflicts
          on 'hidden' nodes. */
       conflicted = FALSE;
@@ -2945,15 +2910,15 @@ internal_status(svn_wc_status3_t **statu
     SVN_ERR(stat_wc_dirent_case_sensitive(&dirent, db, local_abspath,
                                           scratch_pool, scratch_pool));
 
-  if (node_kind != svn_kind_unknown
+  if (node_kind != svn_node_unknown
       && (node_status == svn_wc__db_status_not_present
           || node_status == svn_wc__db_status_server_excluded
           || node_status == svn_wc__db_status_excluded))
     {
-      node_kind = svn_kind_unknown;
+      node_kind = svn_node_unknown;
     }
 
-  if (node_kind == svn_kind_unknown)
+  if (node_kind == svn_node_unknown)
     return svn_error_trace(assemble_unversioned(status,
                                                 db, local_abspath,
                                                 dirent, conflicted,
@@ -3084,8 +3049,8 @@ svn_wc_get_ignores2(apr_array_header_t *
   apr_array_header_t *default_ignores;
 
   SVN_ERR(svn_wc_get_default_ignores(&default_ignores, config, scratch_pool));
-  return svn_error_trace(collect_ignore_patterns(patterns, NULL, wc_ctx->db,
+  return svn_error_trace(collect_ignore_patterns(patterns, wc_ctx->db,
                                                  local_abspath,
-                                                 default_ignores, TRUE,
+                                                 default_ignores,
                                                  result_pool, scratch_pool));
 }

Modified: subversion/branches/verify-keep-going/subversion/libsvn_wc/token-map.h
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_wc/token-map.h?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_wc/token-map.h (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_wc/token-map.h Mon Mar 18 09:35:24 2013
@@ -34,10 +34,10 @@ extern "C" {
 #endif
 
 static const svn_token_map_t kind_map[] = {
-  { "file", svn_kind_file }, /* MAP_FILE */
-  { "dir", svn_kind_dir }, /* MAP_DIR */
-  { "symlink", svn_kind_symlink }, /* MAP_SYMLINK */
-  { "unknown", svn_kind_unknown }, /* MAP_UNKNOWN */
+  { "file", svn_node_file }, /* MAP_FILE */
+  { "dir", svn_node_dir }, /* MAP_DIR */
+  { "symlink", svn_node_symlink }, /* MAP_SYMLINK */
+  { "unknown", svn_node_unknown }, /* MAP_UNKNOWN */
   { NULL }
 };
 

Modified: subversion/branches/verify-keep-going/subversion/libsvn_wc/translate.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_wc/translate.c?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_wc/translate.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_wc/translate.c Mon Mar 18 09:35:24 2013
@@ -365,7 +365,7 @@ svn_wc__sync_flags_with_props(svn_boolea
                               apr_pool_t *scratch_pool)
 {
   svn_wc__db_status_t status;
-  svn_kind_t kind;
+  svn_node_kind_t kind;
   svn_wc__db_lock_t *lock;
   apr_hash_t *props = NULL;
   svn_boolean_t had_props;
@@ -388,7 +388,7 @@ svn_wc__sync_flags_with_props(svn_boolea
      early-out for all other types.
 
      Also bail if there is no in-wc representation of the file. */
-  if (kind != svn_kind_file
+  if (kind != svn_node_file
       || (status != svn_wc__db_status_normal
           && status != svn_wc__db_status_added))
     return SVN_NO_ERROR;

Modified: subversion/branches/verify-keep-going/subversion/libsvn_wc/tree_conflicts.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_wc/tree_conflicts.c?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_wc/tree_conflicts.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_wc/tree_conflicts.c Mon Mar 18 09:35:24 2013
@@ -38,6 +38,8 @@
 
 /* ### this should move to a more general location...  */
 /* A map for svn_node_kind_t values. */
+/* FIXME: this mapping defines a different representation of
+          svn_node_unknown than the one defined in token-map.h */
 static const svn_token_map_t node_kind_map[] =
 {
   { "none", svn_node_none },

Modified: subversion/branches/verify-keep-going/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_wc/update_editor.c?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_wc/update_editor.c Mon Mar 18 09:35:24 2013
@@ -1125,8 +1125,9 @@ path_join_under_root(const char **result
     {
       return svn_error_createf(
           SVN_ERR_WC_OBSTRUCTED_UPDATE, NULL,
-          _("'%s' is not valid as filename in a working copy path"),
-          svn_dirent_local_style(add_path, pool));
+          _("'%s' is not valid as filename in directory '%s'"),
+          svn_dirent_local_style(add_path, pool),
+          svn_dirent_local_style(base_path, pool));
     }
 
   return SVN_NO_ERROR;
@@ -1170,7 +1171,8 @@ open_root(void *edit_baton,
   svn_boolean_t already_conflicted;
   svn_error_t *err;
   svn_wc__db_status_t status;
-  svn_kind_t kind;
+  svn_wc__db_status_t base_status;
+  svn_node_kind_t kind;
   svn_boolean_t have_work;
 
   /* Note that something interesting is actually happening in this
@@ -1193,6 +1195,11 @@ open_root(void *edit_baton,
     }
   else if (already_conflicted)
     {
+      /* Record a skip of both the anchor and target in the skipped tree
+         as the anchor itself might not be updated */
+      SVN_ERR(remember_skipped_tree(eb, db->local_abspath, pool));
+      SVN_ERR(remember_skipped_tree(eb, eb->target_abspath, pool));
+
       db->skip_this = TRUE;
       db->already_notified = TRUE;
 
@@ -1222,6 +1229,17 @@ open_root(void *edit_baton,
       SVN_ERR(svn_wc__db_base_moved_to(NULL, NULL, &move_src_root_abspath,
                                        NULL, eb->db, db->local_abspath,
                                        pool, pool));
+      if (move_src_root_abspath || *eb->target_basename == '\0')
+        SVN_ERR(svn_wc__db_base_get_info(&base_status, NULL,
+                                         &db->old_revision,
+                                         &db->old_repos_relpath, NULL, NULL,
+                                         &db->changed_rev, &db->changed_date,
+                                         &db->changed_author,
+                                         &db->ambient_depth,
+                                         NULL, NULL, NULL, NULL, NULL, NULL,
+                                         eb->db, db->local_abspath,
+                                         db->pool, pool));
+
       if (move_src_root_abspath)
         {
           /* This is an update anchored inside a move. We need to
@@ -1237,8 +1255,9 @@ open_root(void *edit_baton,
 
           if (strcmp(db->local_abspath, move_src_root_abspath))
             {
-              /* This is some parent of the edit root, we won't be
-                 handling it again so raise the conflict now. */
+              /* We are raising the tree-conflict on some parent of
+                 the edit root, we won't be handling that path again
+                 so raise the conflict now. */
               SVN_ERR(complete_conflict(tree_conflict, eb,
                                         move_src_root_abspath,
                                         db->old_repos_relpath,
@@ -1256,28 +1275,16 @@ open_root(void *edit_baton,
             db->edit_conflict = tree_conflict;
         }
 
-
       db->shadowed = TRUE; /* Needed for the close_directory() on the root, to
                               make sure it doesn't use the ACTUAL tree */
     }
+  else
+    base_status = status;
 
   if (*eb->target_basename == '\0')
     {
-      svn_wc__db_status_t base_status;
       /* For an update with a NULL target, this is equivalent to open_dir(): */
 
-      if (! have_work)
-        base_status = status;
-      else
-        {
-          SVN_ERR(svn_wc__db_base_get_info(&base_status, NULL, &db->old_revision,
-                                           &db->old_repos_relpath, NULL, NULL,
-                                           &db->changed_rev, &db->changed_date,
-                                           &db->changed_author, &db->ambient_depth,
-                                           NULL, NULL, NULL, NULL, NULL, NULL,
-                                           eb->db, db->local_abspath,
-                                           db->pool, pool));
-        }
       db->was_incomplete = (base_status == svn_wc__db_status_incomplete);
 
       /* ### TODO: Add some tree conflict and obstruction detection, etc. like
@@ -1458,7 +1465,7 @@ check_tree_conflict(svn_skel_t **pconfli
             if (working_status == svn_wc__db_status_added)
               SVN_ERR(svn_wc__db_scan_addition(&working_status, NULL, NULL,
                                                NULL, NULL, NULL, NULL,
-                                               NULL, NULL, NULL, NULL,
+                                               NULL, NULL,
                                                eb->db, local_abspath,
                                                scratch_pool, scratch_pool));
 
@@ -1610,9 +1617,9 @@ check_tree_conflict(svn_skel_t **pconfli
 }
 
 
-/* If LOCAL_ABSPATH is inside a conflicted tree, set *CONFLICTED to TRUE,
- * Otherwise set *CONFLICTED to FALSE.  Use SCRATCH_POOL for temporary
- * allocations.
+/* If LOCAL_ABSPATH is inside a conflicted tree and the conflict is
+ * not a moved-away-edit conflict, set *CONFLICTED to TRUE.  Otherwise
+ * set *CONFLICTED to FALSE.
  */
 static svn_error_t *
 already_in_a_tree_conflict(svn_boolean_t *conflicted,
@@ -1629,22 +1636,17 @@ already_in_a_tree_conflict(svn_boolean_t
 
   while (TRUE)
     {
-      svn_boolean_t is_wc_root, tree_conflicted;
+      svn_boolean_t is_wc_root;
 
       svn_pool_clear(iterpool);
 
-      SVN_ERR(svn_wc__internal_conflicted_p(NULL, NULL, &tree_conflicted,
-                                            db, ancestor_abspath, iterpool));
-
-      if (tree_conflicted)
-        {
-          *conflicted = TRUE;
-          break;
-        }
+      SVN_ERR(svn_wc__conflicted_for_update_p(conflicted, db, ancestor_abspath,
+                                              TRUE, scratch_pool));
+      if (*conflicted)
+        break;
 
       SVN_ERR(svn_wc__db_is_wcroot(&is_wc_root, db, ancestor_abspath,
                                    iterpool));
-
       if (is_wc_root)
         break;
 
@@ -1663,15 +1665,9 @@ node_already_conflicted(svn_boolean_t *c
                         const char *local_abspath,
                         apr_pool_t *scratch_pool)
 {
-  svn_boolean_t text_conflicted, prop_conflicted, tree_conflicted;
-
-  SVN_ERR(svn_wc__internal_conflicted_p(&text_conflicted,
-                                        &prop_conflicted,
-                                        &tree_conflicted,
-                                        db, local_abspath,
-                                        scratch_pool));
+  SVN_ERR(svn_wc__conflicted_for_update_p(conflicted, db, local_abspath, FALSE,
+                                          scratch_pool));
 
-  *conflicted = (text_conflicted || prop_conflicted || tree_conflicted);
   return SVN_NO_ERROR;
 }
 
@@ -1688,7 +1684,7 @@ delete_entry(const char *path,
   const char *base = svn_relpath_basename(path, NULL);
   const char *local_abspath;
   const char *repos_relpath;
-  svn_kind_t kind, base_kind;
+  svn_node_kind_t kind, base_kind;
   svn_revnum_t old_revision;
   svn_boolean_t conflicted;
   svn_boolean_t have_work;
@@ -1767,7 +1763,9 @@ delete_entry(const char *path,
     deleting_switched = FALSE;
 
   /* Is this path a conflict victim? */
-  if (conflicted)
+  if (pb->shadowed)
+    conflicted = FALSE; /* Conflict applies to WORKING */
+  else if (conflicted)
     SVN_ERR(node_already_conflicted(&conflicted, eb->db, local_abspath,
                                     scratch_pool));
   if (conflicted)
@@ -1785,8 +1783,8 @@ delete_entry(const char *path,
 
 
 
-    /* Receive the remote removal of excluded/server-excluded/not present node.
-       Do not notify, but perform the change even when the node is shadowed */
+  /* Receive the remote removal of excluded/server-excluded/not present node.
+     Do not notify, but perform the change even when the node is shadowed */
   if (base_status == svn_wc__db_status_not_present
       || base_status == svn_wc__db_status_excluded
       || base_status == svn_wc__db_status_server_excluded)
@@ -1817,7 +1815,7 @@ delete_entry(const char *path,
     {
       SVN_ERR(check_tree_conflict(&tree_conflict, eb, local_abspath,
                                   status, TRUE,
-                                  (kind == svn_kind_dir)
+                                  (kind == svn_node_dir)
                                         ? svn_node_dir
                                         : svn_node_file,
                                   svn_wc_conflict_action_delete,
@@ -1874,7 +1872,7 @@ delete_entry(const char *path,
 
   SVN_ERR(complete_conflict(tree_conflict, eb, local_abspath, repos_relpath,
                             old_revision, NULL,
-                            (kind == svn_kind_dir)
+                            (kind == svn_node_dir)
                                 ? svn_node_dir
                                 : svn_node_file,
                             svn_node_none,
@@ -1930,7 +1928,7 @@ delete_entry(const char *path,
       if (pb->shadowed || pb->edit_obstructed)
         action = svn_wc_notify_update_shadowed_delete;
 
-      if (kind == svn_kind_dir)
+      if (kind == svn_node_dir)
         node_kind = svn_node_dir;
       else
         node_kind = svn_node_file;
@@ -1957,7 +1955,7 @@ add_directory(const char *path,
   struct dir_baton *db;
   svn_node_kind_t kind;
   svn_wc__db_status_t status;
-  svn_kind_t wc_kind;
+  svn_node_kind_t wc_kind;
   svn_boolean_t conflicted;
   svn_boolean_t versioned_locally_and_present;
   svn_skel_t *tree_conflict = NULL;
@@ -2013,13 +2011,13 @@ add_directory(const char *path,
         return svn_error_trace(err);
 
       svn_error_clear(err);
-      wc_kind = svn_kind_unknown;
+      wc_kind = svn_node_unknown;
       status = svn_wc__db_status_normal;
       conflicted = FALSE;
 
       versioned_locally_and_present = FALSE;
     }
-  else if (wc_kind == svn_kind_dir
+  else if (wc_kind == svn_node_dir
            && status == svn_wc__db_status_normal)
     {
       /* !! We found the root of a separate working copy obstructing the wc !!
@@ -2037,7 +2035,7 @@ add_directory(const char *path,
                                                    eb->repos_root,
                                                    eb->repos_uuid,
                                                    *eb->target_revision,
-                                                   svn_kind_file,
+                                                   svn_node_file,
                                                    NULL, NULL,
                                                    pool));
 
@@ -2051,8 +2049,8 @@ add_directory(const char *path,
       return SVN_NO_ERROR;
     }
   else if (status == svn_wc__db_status_normal
-           && (wc_kind == svn_kind_file
-               || wc_kind == svn_kind_symlink))
+           && (wc_kind == svn_node_file
+               || wc_kind == svn_node_symlink))
     {
       /* We found a file external occupating the place we need in BASE.
 
@@ -2074,7 +2072,7 @@ add_directory(const char *path,
 
       return SVN_NO_ERROR;
     }
-  else if (wc_kind == svn_kind_unknown)
+  else if (wc_kind == svn_node_unknown)
     versioned_locally_and_present = FALSE; /* Tree conflict ACTUAL-only node */
   else
     versioned_locally_and_present = IS_NODE_PRESENT(status);
@@ -2147,7 +2145,7 @@ add_directory(const char *path,
                                                    eb->repos_root,
                                                    eb->repos_uuid,
                                                    *eb->target_revision,
-                                                   svn_kind_dir,
+                                                   svn_node_dir,
                                                    NULL, NULL,
                                                    pool));
 
@@ -2180,13 +2178,13 @@ add_directory(const char *path,
       /* Is the local add a copy? */
       if (status == svn_wc__db_status_added)
         SVN_ERR(svn_wc__db_scan_addition(&add_status, NULL, NULL, NULL, NULL,
-                                         NULL, NULL, NULL, NULL, NULL, NULL,
+                                         NULL, NULL, NULL, NULL,
                                          eb->db, db->local_abspath,
                                          pool, pool));
 
 
       /* Is there *something* that is not a dir? */
-      local_is_non_dir = (wc_kind != svn_kind_dir
+      local_is_non_dir = (wc_kind != svn_node_dir
                           && status != svn_wc__db_status_deleted);
 
       /* Do tree conflict checking if
@@ -2242,7 +2240,7 @@ add_directory(const char *path,
     SVN_ERR(complete_conflict(tree_conflict, eb, db->local_abspath,
                               db->old_repos_relpath, db->old_revision,
                               db->new_relpath,
-                              svn__node_kind_from_kind(wc_kind),
+                              wc_kind,
                               svn_node_dir,
                               db->pool, pool));
 
@@ -2310,7 +2308,7 @@ open_directory(const char *path,
   svn_boolean_t conflicted;
   svn_skel_t *tree_conflict = NULL;
   svn_wc__db_status_t status, base_status;
-  svn_kind_t wc_kind;
+  svn_node_kind_t wc_kind;
 
   SVN_ERR(make_dir_baton(&db, path, eb, pb, FALSE, pool));
   *child_baton = db;
@@ -2367,7 +2365,9 @@ open_directory(const char *path,
   db->was_incomplete = (base_status == svn_wc__db_status_incomplete);
 
   /* Is this path a conflict victim? */
-  if (conflicted)
+  if (db->shadowed)
+    conflicted = FALSE; /* Conflict applies to WORKING */
+  else if (conflicted)
     SVN_ERR(node_already_conflicted(&conflicted, eb->db,
                                     db->local_abspath, pool));
   if (conflicted)
@@ -2665,7 +2665,7 @@ close_directory(void *dir_baton,
             const char *child_relpath;
             const svn_dirent_t *dirent;
             svn_wc__db_status_t status;
-            svn_kind_t child_kind;
+            svn_node_kind_t child_kind;
             svn_error_t *err;
 
             svn_pool_clear(iterpool);
@@ -2676,11 +2676,11 @@ close_directory(void *dir_baton,
 
             dirent = svn__apr_hash_index_val(hi);
             child_kind = (dirent->kind == svn_node_dir)
-                                        ? svn_kind_dir
-                                        : svn_kind_file;
+                                        ? svn_node_dir
+                                        : svn_node_file;
 
             if (db->ambient_depth < svn_depth_immediates
-                && child_kind == svn_kind_dir)
+                && child_kind == svn_node_dir)
               continue; /* We don't need the subdirs */
 
             /* ### We just check if there is some node in BASE at this path */
@@ -2751,7 +2751,7 @@ close_directory(void *dir_baton,
                                                        eb->repos_root,
                                                        eb->repos_uuid,
                                                        *eb->target_revision,
-                                                       svn_kind_file,
+                                                       svn_node_file,
                                                        NULL, NULL,
                                                        iterpool));
         }
@@ -2922,7 +2922,7 @@ close_directory(void *dir_baton,
 /* Common code for 'absent_file' and 'absent_directory'. */
 static svn_error_t *
 absent_node(const char *path,
-            svn_kind_t absent_kind,
+            svn_node_kind_t absent_kind,
             void *parent_baton,
             apr_pool_t *pool)
 {
@@ -2933,7 +2933,7 @@ absent_node(const char *path,
   const char *local_abspath;
   svn_error_t *err;
   svn_wc__db_status_t status;
-  svn_kind_t kind;
+  svn_node_kind_t kind;
 
   if (pb->skip_this)
     return SVN_NO_ERROR;
@@ -2958,11 +2958,11 @@ absent_node(const char *path,
 
       svn_error_clear(err);
       status = svn_wc__db_status_not_present;
-      kind = svn_kind_unknown;
+      kind = svn_node_unknown;
     }
 
   if (status == svn_wc__db_status_normal
-      && kind == svn_kind_dir)
+      && kind == svn_node_dir)
     {
       /* We found an obstructing working copy!
 
@@ -3028,7 +3028,7 @@ absent_file(const char *path,
             void *parent_baton,
             apr_pool_t *pool)
 {
-  return absent_node(path, svn_kind_file, parent_baton, pool);
+  return absent_node(path, svn_node_file, parent_baton, pool);
 }
 
 
@@ -3038,7 +3038,7 @@ absent_directory(const char *path,
                  void *parent_baton,
                  apr_pool_t *pool)
 {
-  return absent_node(path, svn_kind_dir, parent_baton, pool);
+  return absent_node(path, svn_node_dir, parent_baton, pool);
 }
 
 
@@ -3055,7 +3055,7 @@ add_file(const char *path,
   struct edit_baton *eb = pb->edit_baton;
   struct file_baton *fb;
   svn_node_kind_t kind = svn_node_none;
-  svn_kind_t wc_kind = svn_kind_unknown;
+  svn_node_kind_t wc_kind = svn_node_unknown;
   svn_wc__db_status_t status = svn_wc__db_status_normal;
   apr_pool_t *scratch_pool;
   svn_boolean_t conflicted = FALSE;
@@ -3104,12 +3104,12 @@ add_file(const char *path,
         return svn_error_trace(err);
 
       svn_error_clear(err);
-      wc_kind = svn_kind_unknown;
+      wc_kind = svn_node_unknown;
       conflicted = FALSE;
 
       versioned_locally_and_present = FALSE;
     }
-  else if (wc_kind == svn_kind_dir
+  else if (wc_kind == svn_node_dir
            && status == svn_wc__db_status_normal)
     {
       /* !! We found the root of a separate working copy obstructing the wc !!
@@ -3135,8 +3135,8 @@ add_file(const char *path,
       return SVN_NO_ERROR;
     }
   else if (status == svn_wc__db_status_normal
-           && (wc_kind == svn_kind_file
-               || wc_kind == svn_kind_symlink))
+           && (wc_kind == svn_node_file
+               || wc_kind == svn_node_symlink))
     {
       /* We found a file external occupating the place we need in BASE.
 
@@ -3159,14 +3159,16 @@ add_file(const char *path,
 
       return SVN_NO_ERROR;
     }
-  else if (wc_kind == svn_kind_unknown)
+  else if (wc_kind == svn_node_unknown)
     versioned_locally_and_present = FALSE; /* Tree conflict ACTUAL-only node */
   else
     versioned_locally_and_present = IS_NODE_PRESENT(status);
 
 
   /* Is this path a conflict victim? */
-  if (conflicted)
+  if (fb->shadowed)
+    conflicted = FALSE; /* Conflict applies to WORKING */
+  else if (conflicted)
     {
       if (pb->deletion_conflicts)
         tree_conflict = apr_hash_get(pb->deletion_conflicts, fb->name,
@@ -3263,13 +3265,13 @@ add_file(const char *path,
       /* Is the local node a copy or move */
       if (status == svn_wc__db_status_added)
         SVN_ERR(svn_wc__db_scan_addition(&status, NULL, NULL, NULL, NULL, NULL,
-                                         NULL, NULL, NULL, NULL, NULL,
+                                         NULL, NULL, NULL,
                                          eb->db, fb->local_abspath,
                                          scratch_pool, scratch_pool));
 
       /* Is there something that is a file? */
-      local_is_file = (wc_kind == svn_kind_file
-                       || wc_kind == svn_kind_symlink);
+      local_is_file = (wc_kind == svn_node_file
+                       || wc_kind == svn_node_symlink);
 
       /* Do tree conflict checking if
        *  - if there is a local copy.
@@ -3340,7 +3342,7 @@ add_file(const char *path,
                                 fb->old_repos_relpath,
                                 fb->old_revision,
                                 fb->new_relpath,
-                                svn__node_kind_from_kind(wc_kind),
+                                wc_kind,
                                 svn_node_file,
                                 fb->pool, scratch_pool));
 
@@ -3374,7 +3376,7 @@ open_file(const char *path,
   svn_boolean_t conflicted;
   svn_boolean_t have_work;
   svn_wc__db_status_t status;
-  svn_kind_t wc_kind;
+  svn_node_kind_t wc_kind;
   svn_skel_t *tree_conflict = NULL;
 
   /* the file_pool can stick around for a *long* time, so we want to use
@@ -3433,7 +3435,9 @@ open_file(const char *path,
                                      fb->pool, scratch_pool));
 
   /* Is this path a conflict victim? */
-  if (conflicted)
+  if (fb->shadowed)
+    conflicted = FALSE; /* Conflict applies to WORKING */
+  else if (conflicted)
     SVN_ERR(node_already_conflicted(&conflicted, eb->db,
                                     fb->local_abspath, pool));
   if (conflicted)
@@ -4593,6 +4597,8 @@ close_edit(void *edit_baton,
                                                        *(eb->target_revision),
                                                        eb->skipped_trees,
                                                        eb->wcroot_iprops,
+                                                       eb->notify_func,
+                                                       eb->notify_baton,
                                                        eb->pool));
 
       if (*eb->target_basename != '\0')
@@ -4802,7 +4808,7 @@ make_editor(svn_revnum_t *target_revisio
          depth. In this case the update won't describe additions that would
          have been reported if we updated at the ambient depth. */
       svn_error_t *err;
-      svn_kind_t dir_kind;
+      svn_node_kind_t dir_kind;
       svn_wc__db_status_t dir_status;
       const char *dir_repos_relpath;
       svn_depth_t dir_depth;
@@ -4816,7 +4822,7 @@ make_editor(svn_revnum_t *target_revisio
                                      scratch_pool, scratch_pool);
 
       if (!err
-          && dir_kind == svn_kind_dir
+          && dir_kind == svn_node_dir
           && dir_status == svn_wc__db_status_normal)
         {
           if (dir_depth > depth)
@@ -4872,7 +4878,7 @@ make_editor(svn_revnum_t *target_revisio
                                                    db, child_abspath,
                                                    iterpool, iterpool));
 
-                  if (dir_kind == svn_kind_dir
+                  if (dir_kind == svn_node_dir
                       && dir_status == svn_wc__db_status_normal
                       && dir_depth > svn_depth_empty)
                     {
@@ -5067,7 +5073,7 @@ svn_wc_add_repos_file4(svn_wc_context_t 
   svn_wc__db_t *db = wc_ctx->db;
   const char *dir_abspath = svn_dirent_dirname(local_abspath, scratch_pool);
   svn_wc__db_status_t status;
-  svn_kind_t kind;
+  svn_node_kind_t kind;
   const char *tmp_text_base_abspath;
   svn_checksum_t *new_text_base_md5_checksum;
   svn_checksum_t *new_text_base_sha1_checksum;
@@ -5138,7 +5144,7 @@ svn_wc_add_repos_file4(svn_wc_context_t 
                                  svn_dirent_local_style(local_abspath,
                                                         scratch_pool));
     }
-  if (kind != svn_kind_dir)
+  if (kind != svn_node_dir)
     return svn_error_createf(SVN_ERR_NODE_UNEXPECTED_KIND, NULL,
                              _("Can't schedule an addition of '%s'"
                                " below a not-directory node"),
@@ -5157,7 +5163,7 @@ svn_wc_add_repos_file4(svn_wc_context_t 
           /* The parent is an addition, scan upwards to find the right info */
           SVN_ERR(svn_wc__db_scan_addition(NULL, NULL, NULL,
                                            &repos_root_url, &repos_uuid,
-                                           NULL, NULL, NULL, NULL, NULL, NULL,
+                                           NULL, NULL, NULL, NULL,
                                            wc_ctx->db, dir_abspath,
                                            scratch_pool, scratch_pool));
         }
@@ -5337,7 +5343,7 @@ svn_wc__complete_directory_add(svn_wc_co
                                apr_pool_t *scratch_pool)
 {
   svn_wc__db_status_t status;
-  svn_kind_t kind;
+  svn_node_kind_t kind;
   const char *original_repos_relpath;
   const char *original_root_url;
   const char *original_uuid;
@@ -5359,7 +5365,7 @@ svn_wc__complete_directory_add(svn_wc_co
                                scratch_pool, scratch_pool));
 
   if (status != svn_wc__db_status_added
-      || kind != svn_kind_dir
+      || kind != svn_node_dir
       || had_props
       || props_mod
       || !original_repos_relpath)

Modified: subversion/branches/verify-keep-going/subversion/libsvn_wc/upgrade.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_wc/upgrade.c?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_wc/upgrade.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_wc/upgrade.c Mon Mar 18 09:35:24 2013
@@ -2302,19 +2302,19 @@ svn_wc__upgrade_add_external_info(svn_wc
                                   svn_revnum_t def_revision,
                                   apr_pool_t *scratch_pool)
 {
-  svn_kind_t db_kind;
+  svn_node_kind_t db_kind;
   switch (kind)
     {
       case svn_node_dir:
-        db_kind = svn_kind_dir;
+        db_kind = svn_node_dir;
         break;
 
       case svn_node_file:
-        db_kind = svn_kind_file;
+        db_kind = svn_node_file;
         break;
 
       case svn_node_unknown:
-        db_kind = svn_kind_unknown;
+        db_kind = svn_node_unknown;
         break;
 
       default:

Modified: subversion/branches/verify-keep-going/subversion/libsvn_wc/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_wc/util.c?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_wc/util.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_wc/util.c Mon Mar 18 09:35:24 2013
@@ -542,7 +542,7 @@ svn_wc__status2_from_3(svn_wc_status2_t 
 
 
 svn_error_t *
-svn_wc__fetch_kind_func(svn_kind_t *kind,
+svn_wc__fetch_kind_func(svn_node_kind_t *kind,
                         void *baton,
                         const char *path,
                         svn_revnum_t base_revision,
@@ -554,6 +554,7 @@ svn_wc__fetch_kind_func(svn_kind_t *kind
 
   SVN_ERR(svn_wc__db_read_kind(kind, sfb->db, local_abspath,
                                FALSE /* allow_missing */,
+                               TRUE /* show_deleted */,
                                FALSE /* show_hidden */,
                                scratch_pool));
 

Modified: subversion/branches/verify-keep-going/subversion/libsvn_wc/wc-queries.sql
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_wc/wc-queries.sql?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_wc/wc-queries.sql (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_wc/wc-queries.sql Mon Mar 18 09:35:24 2013
@@ -276,8 +276,11 @@ WHERE wc_id = ?1 AND local_relpath = ?2 
 
 -- STMT_SELECT_OP_DEPTH_CHILDREN
 SELECT local_relpath, kind FROM nodes
-WHERE wc_id = ?1 AND parent_relpath = ?2 AND op_depth = ?3
-  AND (?3 != 0 OR file_external is NULL)
+WHERE wc_id = ?1 
+  AND parent_relpath = ?2
+  AND op_depth = ?3
+  AND presence != MAP_BASE_DELETED
+  AND file_external is NULL
 
 /* Used by non-recursive revert to detect higher level children, and
    actual-only rows that would be left orphans, if the revert
@@ -432,7 +435,39 @@ SELECT moved_here, presence, repos_path,
 FROM nodes
 WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth >= ?3
 ORDER BY op_depth
-                  
+
+-- STMT_SELECT_MOVED_BACK
+SELECT u.local_relpath,
+       u.presence, u.repos_id, u.repos_path, u.revision,
+       l.presence, l.repos_id, l.repos_path, l.revision,
+       u.moved_here, u.moved_to
+FROM nodes u
+LEFT OUTER JOIN nodes l ON l.wc_id = ?1
+                       AND l.local_relpath = u.local_relpath
+                       AND l.op_depth = ?3
+WHERE u.wc_id = ?1
+  AND u.local_relpath = ?2
+  AND u.op_depth = ?4
+UNION ALL
+SELECT u.local_relpath,
+       u.presence, u.repos_id, u.repos_path, u.revision,
+       l.presence, l.repos_id, l.repos_path, l.revision,
+       u.moved_here, NULL
+FROM nodes u
+LEFT OUTER JOIN nodes l ON l.wc_id=?1
+                       AND l.local_relpath=u.local_relpath
+                       AND l.op_depth=?3
+WHERE u.wc_id = ?1
+  AND IS_STRICT_DESCENDANT_OF(u.local_relpath, ?2)
+  AND u.op_depth = ?4
+
+-- STMT_DELETE_MOVED_BACK
+DELETE FROM nodes
+WHERE wc_id = ?1
+  AND (local_relpath = ?2
+       OR IS_STRICT_DESCENDANT_OF(local_relpath, ?2))
+  AND op_depth = ?3
+
 -- STMT_DELETE_LOCK
 DELETE FROM lock
 WHERE repos_id = ?1 AND repos_relpath = ?2
@@ -884,6 +919,27 @@ INSERT OR REPLACE INTO nodes (
     parent_relpath, presence, kind)
 VALUES(?1, ?2, ?3, ?4, MAP_BASE_DELETED, ?5)
 
+-- STMT_DELETE_NO_LOWER_LAYER
+DELETE FROM nodes
+ WHERE wc_id = ?1
+   AND (local_relpath = ?2 OR IS_STRICT_DESCENDANT_OF(local_relpath, ?2))
+   AND op_depth = ?3
+   AND NOT EXISTS (SELECT 1 FROM nodes n
+                    WHERE n.wc_id = ?1
+                    AND n.local_relpath = nodes.local_relpath
+                    AND n.op_depth = ?4
+                    AND n.presence IN (MAP_NORMAL, MAP_INCOMPLETE))
+
+-- STMT_REPLACE_WITH_BASE_DELETED
+INSERT OR REPLACE INTO nodes (wc_id, local_relpath, op_depth, parent_relpath,
+                              kind, moved_to, presence)
+SELECT wc_id, local_relpath, op_depth, parent_relpath,
+       kind, moved_to, MAP_BASE_DELETED
+  FROM nodes
+ WHERE wc_id = ?1
+   AND (local_relpath = ?2 OR IS_STRICT_DESCENDANT_OF(local_relpath, ?2))
+   AND op_depth = ?3
+
 /* If this query is updated, STMT_INSERT_DELETE_LIST should too. */
 -- STMT_INSERT_DELETE_FROM_NODE_RECURSIVE
 INSERT INTO nodes (
@@ -977,7 +1033,7 @@ INSERT OR REPLACE INTO nodes (
     last_mod_time, symlink_target, moved_to )
 SELECT wc_id, ?3 /*local_relpath*/, ?4 /*op_depth*/, ?5 /*parent_relpath*/,
     repos_id, repos_path, revision, ?6 /*presence*/, depth,
-    ?7 /*moved_here*/, kind, changed_revision, changed_date,
+    ?8 /*moved_here*/, kind, changed_revision, changed_date,
     changed_author, checksum, properties, translated_size,
     last_mod_time, symlink_target,
     (SELECT dst.moved_to FROM nodes AS dst
@@ -985,7 +1041,7 @@ SELECT wc_id, ?3 /*local_relpath*/, ?4 /
                          AND dst.local_relpath = ?3
                          AND dst.op_depth = ?4)
 FROM nodes
-WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = ?8
+WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = ?7
 
 -- STMT_UPDATE_BASE_REVISION
 UPDATE nodes SET revision = ?3
@@ -1187,10 +1243,15 @@ INSERT INTO target_prop_cache(local_relp
                    AND a.local_relpath = n.local_relpath),
                n.properties)
    FROM targets_list AS t
-   JOIN nodes_current AS n ON t.wc_id= n.wc_id
-                          AND t.local_relpath = n.local_relpath
+   JOIN nodes AS n
+     ON n.wc_id = ?1
+    AND n.local_relpath = t.local_relpath
+    AND n.op_depth = (SELECT MAX(op_depth) FROM nodes AS n3
+                      WHERE n3.wc_id = ?1
+                        AND n3.local_relpath = t.local_relpath)
   WHERE t.wc_id = ?1
     AND (presence=MAP_NORMAL OR presence=MAP_INCOMPLETE)
+  ORDER BY t.local_relpath
 
 -- STMT_CACHE_TARGET_PRISTINE_PROPS
 INSERT INTO target_prop_cache(local_relpath, kind, properties)
@@ -1204,12 +1265,17 @@ INSERT INTO target_prop_cache(local_relp
                  ORDER BY p.op_depth DESC /* LIMIT 1 */)
           ELSE properties END
   FROM targets_list AS t
-  JOIN nodes_current AS n ON t.wc_id= n.wc_id
-                          AND t.local_relpath = n.local_relpath
+  JOIN nodes AS n
+    ON n.wc_id = ?1
+   AND n.local_relpath = t.local_relpath
+   AND n.op_depth = (SELECT MAX(op_depth) FROM nodes AS n3
+                     WHERE n3.wc_id = ?1
+                       AND n3.local_relpath = t.local_relpath)
   WHERE t.wc_id = ?1
     AND (presence = MAP_NORMAL
          OR presence = MAP_INCOMPLETE
          OR presence = MAP_BASE_DELETED)
+  ORDER BY t.local_relpath
 
 -- STMT_SELECT_ALL_TARGET_PROP_CACHE
 SELECT local_relpath, properties FROM target_prop_cache
@@ -1407,73 +1473,15 @@ WHERE wc_id = ?1
   AND properties IS NOT NULL
 LIMIT 1
 
-/* Determine if there is some switched subtree in just SQL. This looks easy,
-   but it really isn't, because we don't have a simple (and optimizable)
-   path join operation in SQL.
-
-   To work around that we have 4 different cases:
-      * Check on a node that is neither wcroot nor repos root
-      * Check on a node that is repos_root, but not wcroot.
-      * Check on a node that is wcroot, but not repos root.
-      * Check on a node that is both wcroot and repos root.
-
-   To make things easier, our testsuite is usually in that last category,
-   while normal working copies are almost always in one of the others.
-*/
 -- STMT_HAS_SWITCHED
-SELECT o.repos_path || '/' || SUBSTR(s.local_relpath, LENGTH(?2)+2) AS expected
-       /*,s.local_relpath, s.repos_path, o.local_relpath, o.repos_path*/
-FROM nodes AS o
-LEFT JOIN nodes AS s
-ON o.wc_id = s.wc_id
-   AND IS_STRICT_DESCENDANT_OF(s.local_relpath, ?2)
-   AND s.op_depth = 0
-   AND s.repos_id = o.repos_id
-   AND s.file_external IS NULL
-WHERE o.wc_id = ?1 AND o.local_relpath=?2 AND o.op_depth=0
-  AND s.repos_path != expected
-LIMIT 1
-
--- STMT_HAS_SWITCHED_REPOS_ROOT
-SELECT SUBSTR(s.local_relpath, LENGTH(?2)+2) AS expected
-       /*,s.local_relpath, s.repos_path, o.local_relpath, o.repos_path*/
-FROM nodes AS o
-LEFT JOIN nodes AS s
-ON o.wc_id = s.wc_id
-   AND IS_STRICT_DESCENDANT_OF(s.local_relpath, ?2)
-   AND s.op_depth = 0
-   AND s.repos_id = o.repos_id
-   AND s.file_external IS NULL
-WHERE o.wc_id = ?1 AND o.local_relpath=?2 AND o.op_depth=0
-  AND s.repos_path != expected
-LIMIT 1
-
--- STMT_HAS_SWITCHED_WCROOT
-SELECT o.repos_path || '/' || s.local_relpath AS expected
-       /*,s.local_relpath, s.repos_path, o.local_relpath, o.repos_path*/
-FROM nodes AS o
-LEFT JOIN nodes AS s
-ON o.wc_id = s.wc_id
-   AND s.local_relpath != ''
-   AND s.op_depth = 0
-   AND s.repos_id = o.repos_id
-   AND s.file_external IS NULL
-WHERE o.wc_id = ?1 AND o.local_relpath=?2 AND o.op_depth=0
-  AND s.repos_path != expected
-LIMIT 1
-
--- STMT_HAS_SWITCHED_WCROOT_REPOS_ROOT
-SELECT s.local_relpath AS expected
-       /*,s.local_relpath, s.repos_path, o.local_relpath, o.repos_path*/
-FROM nodes AS o
-LEFT JOIN nodes AS s
-ON o.wc_id = s.wc_id
-   AND s.local_relpath != ''
-   AND s.op_depth = 0
-   AND s.repos_id = o.repos_id
-   AND s.file_external IS NULL
-WHERE o.wc_id = ?1 AND o.local_relpath=?2 AND o.op_depth=0
-  AND s.repos_path != expected
+SELECT 1
+FROM nodes
+WHERE wc_id = ?1
+  AND IS_STRICT_DESCENDANT_OF(local_relpath, ?2)
+  AND op_depth = 0
+  AND file_external IS NULL
+  AND presence IN (MAP_NORMAL, MAP_INCOMPLETE)
+  AND repos_path IS NOT RELPATH_SKIP_JOIN(?2, ?3, local_relpath)
 LIMIT 1
 
 -- STMT_SELECT_BASE_FILES_RECURSIVE
@@ -1499,6 +1507,12 @@ WHERE wc_id = ?1 AND local_relpath = ?2 
 UPDATE nodes SET moved_to = NULL
 WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = ?3
 
+-- STMT_CLEAR_MOVED_HERE_RECURSIVE
+UPDATE nodes SET moved_here = NULL
+WHERE wc_id = ?1
+ AND (local_relpath = ?2 OR IS_STRICT_DESCENDANT_OF(local_relpath, ?2))
+ AND op_depth = ?3
+
 /* This statement returns pairs of move-roots below the path ?2 in WC_ID ?1.
  * Each row returns a moved-here path (always a child of ?2) in the first
  * column, and its matching moved-away (deleted) path in the second column. */
@@ -1507,35 +1521,48 @@ SELECT moved_to, local_relpath FROM node
 WHERE wc_id = ?1 AND op_depth > 0
   AND IS_STRICT_DESCENDANT_OF(moved_to, ?2)
 
-/* This statement returns pairs of paths that define a move where the
-   destination of the move is within the subtree rooted at path ?2 or
-   the source of the move is within the subtree rooted at path ?2 */
--- STMT_SELECT_MOVED_PAIR
-SELECT local_relpath, moved_to, op_depth FROM nodes_current
-WHERE wc_id = ?1
-  AND (IS_STRICT_DESCENDANT_OF(moved_to, ?2)
-       OR (IS_STRICT_DESCENDANT_OF(local_relpath, ?2)
-           AND moved_to IS NOT NULL))
+-- STMT_SELECT_MOVED_FOR_DELETE
+SELECT local_relpath, moved_to, op_depth FROM nodes
+WHERE wc_id = ?1
+  AND (local_relpath = ?2 OR IS_STRICT_DESCENDANT_OF(local_relpath, ?2))
+  AND moved_to IS NOT NULL
+  AND op_depth >= (SELECT MAX(op_depth) FROM nodes o
+                    WHERE o.wc_id = ?1
+                      AND o.local_relpath = ?2)
+
+-- STMT_UPDATE_MOVED_TO_DESCENDANTS
+UPDATE nodes SET moved_to = RELPATH_SKIP_JOIN(?2, ?3, moved_to)
+ WHERE wc_id = ?1
+   AND IS_STRICT_DESCENDANT_OF(moved_to, ?2)
+
+-- STMT_CLEAR_MOVED_TO_DESCENDANTS
+UPDATE nodes SET moved_to = NULL
+ WHERE wc_id = ?1
+   AND IS_STRICT_DESCENDANT_OF(moved_to, ?2)
+
 
 /* This statement returns pairs of move-roots below the path ?2 in WC_ID ?1,
  * where the source of the move is within the subtree rooted at path ?2, and
  * the destination of the move is outside the subtree rooted at path ?2. */
 -- STMT_SELECT_MOVED_PAIR2
-SELECT local_relpath, moved_to FROM nodes_current
+SELECT local_relpath, moved_to, op_depth FROM nodes
 WHERE wc_id = ?1
-  AND IS_STRICT_DESCENDANT_OF(local_relpath, ?2)
+  AND (local_relpath = ?2 OR IS_STRICT_DESCENDANT_OF(local_relpath, ?2))
   AND moved_to IS NOT NULL
   AND NOT IS_STRICT_DESCENDANT_OF(moved_to, ?2)
+  AND op_depth >= (SELECT MAX(op_depth) FROM nodes o
+                    WHERE o.wc_id = ?1
+                      AND o.local_relpath = ?2)
 
 -- STMT_SELECT_MOVED_PAIR3
-SELECT local_relpath, moved_to, op_depth FROM nodes
+SELECT local_relpath, moved_to, op_depth, kind FROM nodes
 WHERE wc_id = ?1
   AND (local_relpath = ?2 OR IS_STRICT_DESCENDANT_OF(local_relpath, ?2))
   AND op_depth > ?3
   AND moved_to IS NOT NULL
 
 -- STMT_SELECT_MOVED_OUTSIDE
-SELECT local_relpath FROM nodes
+SELECT local_relpath, moved_to FROM nodes
 WHERE wc_id = ?1
   AND (local_relpath = ?2 OR IS_STRICT_DESCENDANT_OF(local_relpath, ?2))
   AND op_depth >= ?3
@@ -1593,6 +1620,17 @@ WHERE wc_id = ?1
   AND op_depth = 0
 ORDER BY local_relpath
 
+-- STMT_SELECT_HAS_NON_FILE_CHILDREN
+SELECT 1 FROM nodes
+WHERE wc_id = ?1 AND parent_relpath = ?2 AND op_depth = 0 AND kind != MAP_FILE
+
+-- STMT_SELECT_HAS_GRANDCHILDREN
+SELECT 1 FROM nodes
+WHERE wc_id = ?1
+  AND IS_STRICT_DESCENDANT_OF(parent_relpath, ?2)
+  AND op_depth = 0
+  AND file_external IS NULL
+
 /* ------------------------------------------------------------------------- */
 
 /* Queries for verification. */

Modified: subversion/branches/verify-keep-going/subversion/libsvn_wc/wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_wc/wc.h?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_wc/wc.h (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_wc/wc.h Mon Mar 18 09:35:24 2013
@@ -501,6 +501,16 @@ svn_wc__internal_conflicted_p(svn_boolea
                               const char *local_abspath,
                               apr_pool_t *scratch_pool);
 
+/* Similar to svn_wc__internal_conflicted_p(), but ignores
+ * moved-away-edit tree conflicts.  Also ignores text and property
+ * conflicts if TREE_ONLY is TRUE */
+svn_error_t *
+svn_wc__conflicted_for_update_p(svn_boolean_t *conflicted_p,
+                                svn_wc__db_t *db,
+                                const char *local_abspath,
+                                svn_boolean_t tree_only,
+                                apr_pool_t *scratch_pool);
+
 
 /* Internal version of svn_wc_transmit_text_deltas3(). */
 svn_error_t *
@@ -730,7 +740,7 @@ struct svn_wc__shim_fetch_baton_t
 
 /* Using a BATON of struct shim_fetch_baton, return KIND for PATH. */
 svn_error_t *
-svn_wc__fetch_kind_func(svn_kind_t *kind,
+svn_wc__fetch_kind_func(svn_node_kind_t *kind,
                         void *baton,
                         const char *path,
                         svn_revnum_t base_revision,