You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2010/03/30 22:58:01 UTC

svn commit: r929279 [13/20] - in /subversion/branches/svn-patch-improvements: ./ build/ac-macros/ build/generator/ build/generator/templates/ contrib/client-side/emacs/ notes/feedback/ notes/meetings/ notes/wc-ng/ subversion/ subversion/bindings/javahl...

Modified: subversion/branches/svn-patch-improvements/subversion/libsvn_wc/lock.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/libsvn_wc/lock.c?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/libsvn_wc/lock.c (original)
+++ subversion/branches/svn-patch-improvements/subversion/libsvn_wc/lock.c Tue Mar 30 20:57:53 2010
@@ -341,6 +341,7 @@ adm_access_alloc(svn_wc_adm_access_t **a
 }
 
 
+/* */
 static svn_error_t *
 alloc_db(svn_wc__db_t **db,
          svn_config_t *config,
@@ -358,6 +359,7 @@ alloc_db(svn_wc__db_t **db,
 }
 
 
+/* */
 static svn_error_t *
 add_to_shared(svn_wc_adm_access_t *lock, apr_pool_t *scratch_pool)
 {
@@ -379,6 +381,7 @@ add_to_shared(svn_wc_adm_access_t *lock,
 }
 
 
+/* */
 static svn_wc_adm_access_t *
 get_from_shared(const char *abspath,
                 svn_wc__db_t *db,
@@ -391,6 +394,7 @@ get_from_shared(const char *abspath,
 }
 
 
+/* */
 static svn_error_t *
 probe(svn_wc__db_t *db,
       const char **dir,
@@ -437,6 +441,7 @@ probe(svn_wc__db_t *db,
 }
 
 
+/* */
 static svn_error_t *
 open_single(svn_wc_adm_access_t **adm_access,
             const char *path,
@@ -487,6 +492,7 @@ open_single(svn_wc_adm_access_t **adm_ac
 }
 
 
+/* */
 static svn_error_t *
 close_single(svn_wc_adm_access_t *adm_access,
              svn_boolean_t preserve_lock,
@@ -679,6 +685,7 @@ do_open(svn_wc_adm_access_t **adm_access
 }
 
 
+/* */
 static svn_error_t *
 open_all(svn_wc_adm_access_t **adm_access,
          const char *path,
@@ -1024,6 +1031,7 @@ svn_wc_adm_probe_try3(svn_wc_adm_access_
 }
 
 
+/* */
 static svn_error_t *
 child_is_disjoint(svn_boolean_t *disjoint,
                   svn_wc__db_t *db,
@@ -1045,7 +1053,7 @@ child_is_disjoint(svn_boolean_t *disjoin
   err = svn_wc__db_read_children(&children, db, parent_abspath, scratch_pool,
                                  scratch_pool);
 
-  if (err && err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
+  if (err && err->apr_err == SVN_ERR_WC_NOT_DIRECTORY)
     {
       svn_error_clear(err);
       *disjoint = TRUE;
@@ -1125,6 +1133,7 @@ child_is_disjoint(svn_boolean_t *disjoin
 }
 
 
+/* */
 static svn_error_t *
 open_anchor(svn_wc_adm_access_t **anchor_access,
             svn_wc_adm_access_t **target_access,
@@ -1329,23 +1338,6 @@ svn_wc_adm_open_anchor(svn_wc_adm_access
                                       cancel_baton, pool));
 }
 
-svn_error_t *
-svn_wc__adm_open_anchor_in_context(svn_wc_adm_access_t **anchor_access,
-                                   svn_wc_adm_access_t **target_access,
-                                   const char **target,
-                                   svn_wc_context_t *wc_ctx,
-                                   const char *path,
-                                   svn_boolean_t write_lock,
-                                   int levels_to_lock,
-                                   svn_cancel_func_t cancel_func,
-                                   void *cancel_baton,
-                                   apr_pool_t *pool)
-{
-  return svn_error_return(open_anchor(anchor_access, target_access, target,
-                                      wc_ctx->db, TRUE, path, write_lock,
-                                      levels_to_lock, cancel_func,
-                                      cancel_baton, pool));
-}
 
 svn_error_t *
 svn_wc__adm_retrieve_from_context(svn_wc_adm_access_t **adm_access,
@@ -1392,8 +1384,8 @@ do_close(svn_wc_adm_access_t *adm_access
            hi;
            hi = apr_hash_next(hi))
         {
-          const char *abspath = svn_apr_hash_index_key(hi);
-          svn_wc_adm_access_t *child = svn_apr_hash_index_val(hi);
+          const char *abspath = svn__apr_hash_index_key(hi);
+          svn_wc_adm_access_t *child = svn__apr_hash_index_val(hi);
           const char *path = child->path;
 
           if (IS_MISSING(child))
@@ -1512,7 +1504,14 @@ svn_wc__adm_access_set_entries(svn_wc_ad
 apr_hash_t *
 svn_wc__adm_access_entries(svn_wc_adm_access_t *adm_access)
 {
+  /* Compile with -DSVN_DISABLE_ENTRY_CACHE to disable the in-memory
+     entry caching. As of 2010-03-18 (r924708) merge_tests 34 and 134
+     fail during "make check".  */
+#ifdef SVN_DISABLE_ENTRY_CACHE
+  return NULL;
+#else
   return adm_access->entries_all;
+#endif
 }
 
 
@@ -1552,60 +1551,6 @@ svn_wc__adm_missing(svn_wc__db_t *db,
   return (kind == svn_wc__db_kind_dir) && !available && obstructed;
 }
 
-
-/* Extend the scope of the svn_wc_adm_access_t * instances in WALK_BATON
-   for the entire WC tree below LOCAL_ABSPATH.
-   An implementation of svn_wc__node_found_func_t */
-static svn_error_t *
-extend_lock_cb(const char *local_abspath,
-               void *walk_baton,
-               apr_pool_t *scratch_pool)
-{
-  svn_wc__db_t *db = walk_baton;
-  svn_wc__db_kind_t kind;
-  svn_wc_adm_access_t *parent_access, *adm_access;
-  const char *parent_abspath, *base;
-
-  SVN_ERR(svn_wc__db_read_kind(&kind, db, local_abspath, FALSE, scratch_pool));
-
-  if (kind != svn_wc__db_kind_dir)
-    return SVN_NO_ERROR;
-
-  if (NULL != svn_wc__adm_retrieve_internal2(db, local_abspath, scratch_pool))
-    return SVN_NO_ERROR;
-
-  svn_dirent_split(local_abspath, &parent_abspath, &base, scratch_pool);
-
-  parent_access = svn_wc__adm_retrieve_internal2(db, parent_abspath,
-                                                 scratch_pool);
-
-  /* We are EXTENDING the lock, so we must have the parent locked */
-  SVN_ERR_ASSERT(parent_access != NULL);
-
-  /* Open the child baton in the same pool as the parent, because it
-     would be closed directly if we would open it in the scratch
-     pool. And this way it is always cleaned up with the parent. */
-  SVN_ERR(svn_wc_adm_open3(&adm_access, parent_access,
-                           svn_dirent_join(
-                               svn_wc_adm_access_path(parent_access),
-                               base, scratch_pool),
-                           TRUE, -1, NULL, NULL,
-                           svn_wc_adm_access_pool(parent_access)));
-
-  return SVN_NO_ERROR;
-}
-
-svn_error_t *
-svn_wc__adm_extend_lock_to_tree(svn_wc__db_t *db,
-                                const char *adm_abspath,
-                                apr_pool_t *pool)
-{
-  return svn_error_return(
-      svn_wc__internal_walk_children(db, adm_abspath, FALSE,
-                                     extend_lock_cb, db, svn_depth_infinity,
-                                     NULL, NULL, pool));
-}
-
 svn_error_t *
 svn_wc__adm_open_in_context(svn_wc_adm_access_t **adm_access,
                             svn_wc_context_t *wc_ctx,
@@ -1797,8 +1742,27 @@ svn_wc__acquire_write_lock(const char **
       SVN_ERR(svn_wc__db_read_kind(&kind, wc_ctx->db, child_abspath, FALSE,
                                    iterpool));
       if (kind == svn_wc__db_kind_dir)
-        SVN_ERR(svn_wc__acquire_write_lock(NULL, wc_ctx, child_abspath,
-                                           NULL, iterpool));
+        {
+          err = svn_wc__acquire_write_lock(NULL, wc_ctx, child_abspath, NULL,
+                                           iterpool);
+          if (err && err->apr_err == SVN_ERR_WC_LOCKED)
+            {
+              while(i >= 0)
+                {
+                  svn_error_t *err2;
+                  svn_pool_clear(iterpool);
+                  child_relpath = APR_ARRAY_IDX(children, i, const char *);
+                  child_abspath = svn_dirent_join(local_abspath, child_relpath,
+                                                  iterpool);
+                   err2 = svn_wc__release_write_lock(wc_ctx, child_abspath,
+                                                     iterpool);
+                   if (err2)
+                     svn_error_compose(err, err2);
+                   --i;
+                }
+              return svn_error_return(err);
+            }
+        }
     }
 
   /* We don't want to try and lock an unversioned directory that
@@ -1827,6 +1791,7 @@ svn_wc__release_write_lock(svn_wc_contex
   const apr_array_header_t *children;
   apr_uint64_t id;
   svn_skel_t *work_item;
+  svn_boolean_t locked_here;
   int i;
 
   SVN_ERR(svn_wc__db_read_kind(&kind, wc_ctx->db, local_abspath, TRUE,
@@ -1859,7 +1824,10 @@ svn_wc__release_write_lock(svn_wc_contex
         SVN_ERR(svn_wc__release_write_lock(wc_ctx, child_abspath, iterpool));
     }
 
-  SVN_ERR(svn_wc__db_wclock_remove(wc_ctx->db, local_abspath, iterpool));
+  SVN_ERR(svn_wc__db_temp_own_lock(&locked_here, wc_ctx->db, local_abspath,
+                                   iterpool));
+  if (locked_here)
+    SVN_ERR(svn_wc__db_wclock_remove(wc_ctx->db, local_abspath, iterpool));
 
   svn_pool_destroy(iterpool);
 
@@ -1881,3 +1849,15 @@ svn_wc__call_with_write_lock(svn_wc__wit
   err2 = svn_wc__release_write_lock(wc_ctx, local_abspath, scratch_pool);
   return svn_error_compose_create(err1, err2);
 }
+
+svn_error_t *
+svn_wc__path_switched(svn_boolean_t *switched,
+                      svn_wc_context_t *wc_ctx,
+                      const char *local_abspath,
+                      apr_pool_t *scratch_pool)
+{
+  return svn_error_return(child_is_disjoint(switched, wc_ctx->db,
+                                            local_abspath, scratch_pool));
+}
+
+

Modified: subversion/branches/svn-patch-improvements/subversion/libsvn_wc/lock.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/libsvn_wc/lock.h?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/libsvn_wc/lock.h (original)
+++ subversion/branches/svn-patch-improvements/subversion/libsvn_wc/lock.h Tue Mar 30 20:57:53 2010
@@ -106,16 +106,6 @@ svn_error_t *svn_wc__write_check(svn_wc_
                                  const char *local_abspath,
                                  apr_pool_t *scratch_pool);
 
-/* Ensure DB has a lock and for an entire WC tree (all the way
-   to its leaf nodes).  While locking a tree up front using
-   LEVELS_TO_LOCK of -1 is a more appropriate operation, this function
-   can be used to extend the depth of a lock via a tree-crawl after a
-   lock is taken out.  Use POOL for temporary allocations. */
-svn_error_t *svn_wc__adm_extend_lock_to_tree(svn_wc__db_t *db,
-                                             const char* adm_abspath,
-                                             apr_pool_t *pool);
-
-
 /* Return the working copy database associated with this access baton. */
 svn_wc__db_t *
 svn_wc__adm_get_db(const svn_wc_adm_access_t *adm_access);

Modified: subversion/branches/svn-patch-improvements/subversion/libsvn_wc/log.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/libsvn_wc/log.c?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/libsvn_wc/log.c (original)
+++ subversion/branches/svn-patch-improvements/subversion/libsvn_wc/log.c Tue Mar 30 20:57:53 2010
@@ -88,9 +88,6 @@
    the DEST. */
 #define SVN_WC__LOG_CP_AND_TRANSLATE    "cp-and-translate"
 
-/* Remove file SVN_WC__LOG_ATTR_NAME. */
-#define SVN_WC__LOG_RM                  "rm"
-
 /* Append file from SVN_WC__LOG_ATTR_NAME to SVN_WC__LOG_ATTR_DEST. */
 #define SVN_WC__LOG_APPEND              "append"
 
@@ -119,11 +116,7 @@
 
 #define SVN_WC__LOG_ATTR_NAME           "name"
 #define SVN_WC__LOG_ATTR_DEST           "dest"
-#define SVN_WC__LOG_ATTR_REVISION       "revision"
 #define SVN_WC__LOG_ATTR_TIMESTAMP      "timestamp"
-#define SVN_WC__LOG_ATTR_PROPNAME       "propname"
-#define SVN_WC__LOG_ATTR_PROPVAL        "propval"
-#define SVN_WC__LOG_ATTR_FORMAT         "format"
 #define SVN_WC__LOG_ATTR_FORCE          "force"
 #define SVN_WC__LOG_ATTR_DATA           "data"
 
@@ -278,6 +271,7 @@ file_xfer_under_path(svn_wc__db_t *db,
 
 /*** Dispatch on the xml opening tag. ***/
 
+/* */
 static svn_error_t *
 log_do_file_xfer(struct log_runner *loggy,
                  const char *name,
@@ -387,18 +381,7 @@ log_do_file_timestamp(struct log_runner 
 }
 
 
-/* Remove file NAME in log's CWD. */
-static svn_error_t *
-log_do_rm(struct log_runner *loggy, const char *name)
-{
-  const char *local_abspath
-    = svn_dirent_join(loggy->adm_abspath, name, loggy->pool);
-
-  return svn_error_return(
-    svn_io_remove_file2(local_abspath, TRUE, loggy->pool));
-}
-
-
+/* */
 static svn_error_t *
 log_do_modify_entry(struct log_runner *loggy,
                     const char *name,
@@ -494,6 +477,7 @@ log_do_modify_entry(struct log_runner *l
   return SVN_NO_ERROR;
 }
 
+/* */
 static svn_error_t *
 log_do_delete_lock(struct log_runner *loggy,
                    const char *name)
@@ -599,6 +583,7 @@ log_do_delete_entry(struct log_runner *l
 }
 
 
+/* */
 static svn_error_t *
 log_do_add_tree_conflict(struct log_runner *loggy,
                          const char *victim_basename,
@@ -629,6 +614,7 @@ log_do_add_tree_conflict(struct log_runn
   return SVN_NO_ERROR;
 }
 
+/* */
 static void
 start_handler(void *userData, const char *eltname, const char **atts)
 {
@@ -665,9 +651,6 @@ start_handler(void *userData, const char
   else if (strcmp(eltname, SVN_WC__LOG_DELETE_ENTRY) == 0) {
     err = log_do_delete_entry(loggy, name);
   }
-  else if (strcmp(eltname, SVN_WC__LOG_RM) == 0) {
-    err = log_do_rm(loggy, name);
-  }
   else if (strcmp(eltname, SVN_WC__LOG_MV) == 0) {
     err = log_do_file_xfer(loggy, name, svn_wc__xfer_mv, atts);
   }
@@ -755,23 +738,6 @@ svn_wc__run_xml_log(svn_wc__db_t *db,
 }
 
 
-svn_error_t *
-svn_wc__run_log2(svn_wc__db_t *db,
-                 const char *adm_abspath,
-                 apr_pool_t *scratch_pool)
-{
-  /* Verify that we're holding this directory's write lock.  */
-  SVN_ERR(svn_wc__write_check(db, adm_abspath, scratch_pool));
-
-  return svn_error_return(svn_wc__wq_run(
-                            db, adm_abspath,
-                            NULL, NULL,
-                            scratch_pool));
-}
-
-
-
-
 /*** Log file generation helpers ***/
 
 /* Extend LOG_ACCUM with log operations to do MOVE_COPY_OP to SRC_PATH and
@@ -1227,27 +1193,6 @@ svn_wc__loggy_set_timestamp(svn_stringbu
   return SVN_NO_ERROR;
 }
 
-svn_error_t *
-svn_wc__loggy_remove(svn_stringbuf_t **log_accum,
-                     const char *adm_abspath,
-                     const char *path,
-                     apr_pool_t *result_pool,
-                     apr_pool_t *scratch_pool)
-{
-  const char *loggy_path1;
-
-  SVN_ERR(loggy_path(&loggy_path1, path, adm_abspath, scratch_pool));
-  /* No need to check whether BASE_NAME exists: ENOENT is ignored
-     by the log-runner */
-  svn_xml_make_open_tag(log_accum, result_pool,
-                        svn_xml_self_closing,
-                        SVN_WC__LOG_RM,
-                        SVN_WC__LOG_ATTR_NAME,
-                        loggy_path1,
-                        NULL);
-
-  return SVN_NO_ERROR;
-}
 
 svn_error_t *
 svn_wc__loggy_add_tree_conflict(svn_stringbuf_t **log_accum,
@@ -1276,6 +1221,7 @@ svn_wc__loggy_add_tree_conflict(svn_stri
 
 /*** Recursively do log things. ***/
 
+/* */
 static svn_error_t *
 can_be_cleaned(int *wc_format,
                svn_wc__db_t *db,
@@ -1301,6 +1247,7 @@ can_be_cleaned(int *wc_format,
 }
 
 
+/* */
 static svn_error_t *
 cleanup_internal(svn_wc__db_t *db,
                  const char *adm_abspath,

Modified: subversion/branches/svn-patch-improvements/subversion/libsvn_wc/log.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/libsvn_wc/log.h?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/libsvn_wc/log.h (original)
+++ subversion/branches/svn-patch-improvements/subversion/libsvn_wc/log.h Tue Mar 30 20:57:53 2010
@@ -289,31 +289,6 @@ svn_wc__loggy_set_timestamp(svn_stringbu
                             apr_pool_t *result_pool,
                             apr_pool_t *scratch_pool);
 
-/* Extend **LOG_ACCUM with log instructions to remove the file
-   PATH, if it exists.
-   ADM_ABSPATH is the absolute path for the admin directory for PATH.
-
-   Allocate *LOG_ACCUM in RESULT_POOL if it is NULL. Use SCRATCH_POOL for
-   temporary allocations.
-*/
-svn_error_t *
-svn_wc__loggy_remove(svn_stringbuf_t **log_accum,
-                     const char *adm_abspath,
-                     const char *path,
-                     apr_pool_t *result_pool,
-                     apr_pool_t *scratch_pool);
-
-
-/* Process the instructions in the log file for ADM_ABSPATH,
-   using its access baton that MUST BE cached in DB.
-
-   Use SCRATCH_POOL for temporary allocations.
- */
-svn_error_t *
-svn_wc__run_log2(svn_wc__db_t *db,
-                 const char *adm_abspath,
-                 apr_pool_t *scratch_pool);
-
 
 /* TODO ###
 

Modified: subversion/branches/svn-patch-improvements/subversion/libsvn_wc/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/libsvn_wc/merge.c?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/libsvn_wc/merge.c (original)
+++ subversion/branches/svn-patch-improvements/subversion/libsvn_wc/merge.c Tue Mar 30 20:57:53 2010
@@ -1293,7 +1293,6 @@ svn_wc_merge4(enum svn_wc_merge_outcome_
               apr_pool_t *scratch_pool)
 {
   svn_stringbuf_t *log_accum = svn_stringbuf_create("", scratch_pool);
-  const char *dir_abspath = svn_dirent_dirname(target_abspath, scratch_pool);
 
   SVN_ERR(svn_wc__internal_merge(&log_accum, merge_outcome,
                                  wc_ctx->db,
@@ -1313,9 +1312,19 @@ svn_wc_merge4(enum svn_wc_merge_outcome_
   /* Write our accumulation of log entries into a log file */
   if (!dry_run)
     {
+      const char *dir_abspath = svn_dirent_dirname(target_abspath,
+                                                   scratch_pool);
+
+      /* Verify that we're holding this directory's write lock.  */
+      SVN_ERR(svn_wc__write_check(wc_ctx->db, dir_abspath, scratch_pool));
+
+      /* Add all the work items to the queue, then run it.  */
+      /* ### add_loggy takes a DIR, but wq_run is a simple WRI_ABSPATH  */
       SVN_ERR(svn_wc__wq_add_loggy(wc_ctx->db, dir_abspath,
                                    log_accum, scratch_pool));
-      SVN_ERR(svn_wc__run_log2(wc_ctx->db, dir_abspath, scratch_pool));
+      SVN_ERR(svn_wc__wq_run(wc_ctx->db, target_abspath,
+                             cancel_func, cancel_baton,
+                             scratch_pool));
     }
 
   return SVN_NO_ERROR;

Modified: subversion/branches/svn-patch-improvements/subversion/libsvn_wc/old-and-busted.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/libsvn_wc/old-and-busted.c?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/libsvn_wc/old-and-busted.c (original)
+++ subversion/branches/svn-patch-improvements/subversion/libsvn_wc/old-and-busted.c Tue Mar 30 20:57:53 2010
@@ -61,6 +61,7 @@
 #define ENTRIES_ATTR_LOCK_CREATION_DATE "lock-creation-date"
 
 
+/* */
 static svn_wc_entry_t *
 alloc_entry(apr_pool_t *pool)
 {
@@ -193,11 +194,10 @@ read_url(const char **result,
     {
       if (wc_format < SVN_WC__CHANGED_CANONICAL_URLS)
         *result = svn_uri_canonicalize(*result, pool);
-      else
-        if (! svn_uri_is_canonical(*result, pool))
-          return svn_error_createf(SVN_ERR_WC_CORRUPT, NULL,
-                                   _("Entry contains non-canonical path '%s'"),
-                                   *result);
+      else if (! svn_uri_is_canonical(*result, pool))
+        return svn_error_createf(SVN_ERR_WC_CORRUPT, NULL,
+                                 _("Entry contains non-canonical path '%s'"),
+                                 *result);
     }
   return SVN_NO_ERROR;
 }
@@ -716,6 +716,7 @@ do_bool_attr(svn_boolean_t *entry_flag,
 }
 
 
+/* */
 static const char *
 extract_string(apr_uint64_t *result_flags,
                apr_hash_t *atts,
@@ -1169,7 +1170,7 @@ resolve_to_defaults(apr_hash_t *entries,
   /* Then use it to fill in missing information in other entries. */
   for (hi = apr_hash_first(pool, entries); hi; hi = apr_hash_next(hi))
     {
-      svn_wc_entry_t *this_entry = svn_apr_hash_index_val(hi);
+      svn_wc_entry_t *this_entry = svn__apr_hash_index_val(hi);
 
       if (this_entry == default_entry)
         /* THIS_DIR already has all the information it can possibly

Modified: subversion/branches/svn-patch-improvements/subversion/libsvn_wc/props.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/libsvn_wc/props.c?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/libsvn_wc/props.c (original)
+++ subversion/branches/svn-patch-improvements/subversion/libsvn_wc/props.c Tue Mar 30 20:57:53 2010
@@ -153,6 +153,7 @@ load_props(apr_hash_t **hash,
 }
 
 
+/* */
 static svn_error_t *
 loggy_write_properties(svn_stringbuf_t **log_accum,
                        apr_hash_t *properties,
@@ -265,58 +266,6 @@ get_existing_prop_reject_file(const char
 /*---------------------------------------------------------------------*/
 
 
-/* Temporary helper for determining where to store pristine properties.
-   All calls will eventually be replaced by direct wc_db operations
-   of the right type. */
-svn_error_t *
-svn_wc__prop_pristine_is_working(svn_boolean_t *working,
-                                 svn_wc__db_t *db,
-                                 const char *local_abspath,
-                                 apr_pool_t *scratch_pool)
-{
-  svn_wc__db_status_t status;
-  svn_boolean_t base_shadowed;
-  *working = TRUE;
-
-  SVN_ERR(svn_wc__db_read_info(&status, NULL, NULL, NULL, NULL, NULL, NULL,
-                               NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-                               NULL, NULL, NULL, NULL, NULL, NULL,
-                               &base_shadowed, NULL, NULL,
-                               db, local_abspath, scratch_pool, scratch_pool));
-
-  switch (status)
-    {
-      case svn_wc__db_status_normal:
-        *working = FALSE;
-        break;
-      case svn_wc__db_status_incomplete:
-        *working = base_shadowed;
-        break;
-      case svn_wc__db_status_deleted:
-        /* ### This call fails in some update_editor scenarios, because
-               the parent directory can be incomplete. In this specific
-               case a caller MUST provide the right location itself.
-               (Which (in this case) is always the BASE_NODE table)*/
-        SVN_ERR(svn_wc__db_scan_deletion(NULL, working, NULL, NULL, db,
-                                         local_abspath, scratch_pool,
-                                         scratch_pool));
-        break;
-      case svn_wc__db_status_added:
-        break;
-      case svn_wc__db_status_not_present:
-      case svn_wc__db_status_absent:
-      case svn_wc__db_status_excluded:
-        SVN_ERR_ASSERT(0 && "Node not here");
-      case svn_wc__db_status_obstructed:
-      case svn_wc__db_status_obstructed_add:
-      case svn_wc__db_status_obstructed_delete:
-        SVN_ERR_ASSERT(0 && "Node misses property information");
-      default:
-        SVN_ERR_ASSERT(0 && "Unhandled status");
-    }
-
-  return SVN_NO_ERROR;
-}
 
 /*** Loading regular properties. ***/
 svn_error_t *
@@ -344,29 +293,26 @@ svn_wc__load_props(apr_hash_t **base_pro
 #ifdef TEST_DB_PROPS
       {
         apr_hash_t *db_base_props;
+
         SVN_ERR(svn_wc__db_read_pristine_props(&db_base_props, db,
                                                local_abspath,
                                                scratch_pool, scratch_pool));
+        SVN_ERR_ASSERT(db_base_props != NULL);
 
         if (base_props != NULL)
           {
-            if (apr_hash_count(base_props) > 0)
-              {
-                apr_array_header_t *diffs;
-
-                SVN_ERR_ASSERT(db_base_props != NULL);
+            apr_array_header_t *diffs;
 
-                SVN_ERR(svn_prop_diffs(&diffs, base_props, db_base_props,
-                                       scratch_pool));
-
-                SVN_ERR_ASSERT(diffs->nelts == 0);
-              }
-            else
-              SVN_ERR_ASSERT(db_base_props == NULL ||
-                             (apr_hash_count(db_base_props) == 0));
+            SVN_ERR(svn_prop_diffs(&diffs, base_props, db_base_props,
+                                   scratch_pool));
+            SVN_ERR_ASSERT(diffs->nelts == 0);
           }
         else
-          SVN_ERR_ASSERT(db_base_props == NULL);
+          {
+            /* If the propfile is missing, then we should see empty props
+               in the database.  */
+            SVN_ERR_ASSERT(apr_hash_count(db_base_props) == 0);
+          }
       }
 #endif
     }
@@ -387,28 +333,16 @@ svn_wc__load_props(apr_hash_t **base_pro
 #ifdef TEST_DB_PROPS
       {
         apr_hash_t *db_props;
-        SVN_ERR(svn_wc__db_read_props(&db_props, db, local_abspath,
-                                      scratch_pool, scratch_pool));
-
-        if (*props_p != NULL)
-          {
-            if (apr_hash_count(*props_p) > 0)
-              {
-                apr_array_header_t *diffs;
+        apr_array_header_t *diffs;
 
-                SVN_ERR_ASSERT(db_props != NULL);
+        SVN_ERR_ASSERT(*props_p != NULL);
 
-                SVN_ERR(svn_prop_diffs(&diffs, *props_p, db_props,
-                                       scratch_pool));
+        SVN_ERR(svn_wc__db_read_props(&db_props, db, local_abspath,
+                                      scratch_pool, scratch_pool));
+        SVN_ERR_ASSERT(db_props != NULL);
 
-                SVN_ERR_ASSERT(diffs->nelts == 0);
-              }
-            else
-              SVN_ERR_ASSERT(db_props == NULL ||
-                             (apr_hash_count(db_props) == 0));
-          }
-        else
-          SVN_ERR_ASSERT(db_props == NULL);
+        SVN_ERR(svn_prop_diffs(&diffs, *props_p, db_props, scratch_pool));
+        SVN_ERR_ASSERT(diffs->nelts == 0);
       }
 #endif
     }
@@ -436,25 +370,18 @@ svn_wc__load_revert_props(apr_hash_t **r
         *revert_props_p = apr_hash_make(result_pool);
     }
 
-  #ifdef TEST_DB_PROPS
+#ifdef TEST_DB_PROPS
   {
     apr_hash_t *db_props;
+    apr_array_header_t *diffs;
+
     SVN_ERR(svn_wc__db_base_get_props(&db_props, db, local_abspath,
                                       scratch_pool, scratch_pool));
+    SVN_ERR_ASSERT(db_props != NULL);
 
-    if (apr_hash_count(*revert_props_p) > 0)
-      {
-        apr_array_header_t *diffs;
-        SVN_ERR_ASSERT(db_props != NULL);
-
-        SVN_ERR(svn_prop_diffs(&diffs, *revert_props_p, db_props,
-                               scratch_pool));
-
-        SVN_ERR_ASSERT(diffs->nelts == 0);
-      }
-    else
-      SVN_ERR_ASSERT(db_props == NULL ||
-                     (apr_hash_count(db_props) == 0));
+    SVN_ERR(svn_prop_diffs(&diffs, *revert_props_p, db_props,
+                           scratch_pool));
+    SVN_ERR_ASSERT(diffs->nelts == 0);
   }
 #endif
 
@@ -493,6 +420,7 @@ svn_wc__install_props(svn_wc__db_t *db,
   return SVN_NO_ERROR;
 }
 
+/* */
 static svn_error_t *
 immediate_install_props(svn_wc__db_t *db,
                         const char *local_abspath,
@@ -728,9 +656,7 @@ svn_wc_merge_props3(svn_wc_notify_state_
                     void *cancel_baton,
                     apr_pool_t *pool /* scratch_pool */)
 {
-  svn_wc__db_kind_t kind;
   svn_boolean_t hidden;
-  svn_stringbuf_t *log_accum;
   apr_hash_t *new_base_props;
   apr_hash_t *new_actual_props;
 
@@ -745,14 +671,9 @@ svn_wc_merge_props3(svn_wc_notify_state_
                              _("The node '%s' was not found."),
                              svn_dirent_local_style(local_abspath, pool));
 
-  if (! dry_run)
-    log_accum = svn_stringbuf_create("", pool);
-  else
-    log_accum = NULL; /* Provide NULL to __merge_props */
-
   /* Note that while this routine does the "real" work, it's only
      prepping tempfiles and writing log commands.  */
-  SVN_ERR(svn_wc__merge_props(&log_accum, state,
+  SVN_ERR(svn_wc__merge_props(state,
                               &new_base_props, &new_actual_props,
                               wc_ctx->db, local_abspath,
                               left_version, right_version,
@@ -763,33 +684,29 @@ svn_wc_merge_props3(svn_wc_notify_state_
                               pool, pool));
 
   if (!dry_run)
-    SVN_ERR(svn_wc__install_props(wc_ctx->db, local_abspath,
-                                  new_base_props, new_actual_props,
-                                  base_merge, FALSE, pool));
-
-
-  if (! dry_run)
     {
+      svn_wc__db_kind_t kind;
       const char *dir_abspath;
 
       SVN_ERR(svn_wc__db_read_kind(&kind, wc_ctx->db, local_abspath,
                                    FALSE, pool));
+      if (kind == svn_wc__db_kind_dir)
+        dir_abspath = local_abspath;
+      else
+        dir_abspath = svn_dirent_dirname(local_abspath, pool);
 
-      switch (kind)
-        {
-        case svn_wc__db_kind_dir:
-          dir_abspath = local_abspath;
-          break;
-        default:
-          dir_abspath = svn_dirent_dirname(local_abspath, pool);
-          break;
-        }
+      /* Verify that we're holding this directory's write lock.  */
+      SVN_ERR(svn_wc__write_check(wc_ctx->db, dir_abspath, pool));
+
+      SVN_ERR(svn_wc__install_props(wc_ctx->db, local_abspath,
+                                    new_base_props, new_actual_props,
+                                    base_merge, FALSE, pool));
 
-      if (! svn_stringbuf_isempty(log_accum))
-          SVN_ERR(svn_wc__wq_add_loggy(wc_ctx->db, dir_abspath, log_accum,
-                                       pool));
+      /* ### add_loggy takes a DIR, but wq_run is a simple WRI_ABSPATH  */
 
-      SVN_ERR(svn_wc__run_log2(wc_ctx->db, dir_abspath, pool));
+      SVN_ERR(svn_wc__wq_run(wc_ctx->db, local_abspath,
+                             cancel_func, cancel_baton,
+                             pool));
     }
 
   return SVN_NO_ERROR;
@@ -1605,8 +1522,7 @@ apply_single_prop_change(svn_wc_notify_s
 
 
 svn_error_t *
-svn_wc__merge_props(svn_stringbuf_t **entry_accum,
-                    svn_wc_notify_state_t *state,
+svn_wc__merge_props(svn_wc_notify_state_t *state,
                     apr_hash_t **new_base_props,
                     apr_hash_t **new_actual_props,
                     svn_wc__db_t *db,
@@ -1830,26 +1746,33 @@ svn_wc__merge_props(svn_stringbuf_t **en
       /* We've now guaranteed that some kind of .prej file exists
          above the .svn/ dir.  We write log entries to append our
          conflicts to it. */
-      SVN_WC__FLUSH_LOG_ACCUM(db, adm_abspath, *entry_accum, scratch_pool);
       SVN_ERR(svn_wc__loggy_append(db, adm_abspath, reject_tmp_path,
-                                   reject_path, result_pool));
+                                   reject_path, scratch_pool));
 
       /* And of course, delete the temporary reject file. */
-      SVN_WC__FLUSH_LOG_ACCUM(db, adm_abspath, *entry_accum, scratch_pool);
-      SVN_ERR(svn_wc__loggy_remove(entry_accum, adm_abspath,
-                                   reject_tmp_path, result_pool,
-                                   scratch_pool));
+      {
+        const svn_skel_t *work_item;
+
+        SVN_ERR(svn_wc__wq_build_file_remove(&work_item,
+                                             db, reject_tmp_path,
+                                             scratch_pool, scratch_pool));
+        /* ### we should pass WORK_ITEM to some wc_db api that records
+           ### the property conflicts.  */
+        SVN_ERR(svn_wc__db_wq_add(db, adm_abspath, work_item, scratch_pool));
+      }
 
       /* Mark entry as "conflicted" with a particular .prej file. */
       {
+        svn_stringbuf_t *log_accum = NULL;
         svn_wc_entry_t entry;
 
         entry.prejfile = svn_dirent_is_child(adm_abspath, reject_path, NULL);
-        SVN_WC__FLUSH_LOG_ACCUM(db, adm_abspath, *entry_accum, scratch_pool);
-        SVN_ERR(svn_wc__loggy_entry_modify(entry_accum, adm_abspath,
+        SVN_ERR(svn_wc__loggy_entry_modify(&log_accum, adm_abspath,
                                            local_abspath, &entry,
                                            SVN_WC__ENTRY_MODIFY_PREJFILE,
-                                           result_pool, scratch_pool));
+                                           scratch_pool, scratch_pool));
+        SVN_ERR(svn_wc__wq_add_loggy(db, adm_abspath, log_accum,
+                                     scratch_pool));
       }
 
     } /* if (reject_tmp_fp) */
@@ -2055,6 +1978,7 @@ struct getter_baton {
 };
 
 
+/* */
 static svn_error_t *
 get_file_for_validation(const svn_string_t **mime_type,
                         svn_stream_t *stream,
@@ -2084,6 +2008,7 @@ get_file_for_validation(const svn_string
 }
 
 
+/* */
 static svn_error_t *
 validate_eol_prop_against_file(const char *path,
                                svn_wc_canonicalize_svn_prop_get_file_t getter,

Modified: subversion/branches/svn-patch-improvements/subversion/libsvn_wc/props.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/libsvn_wc/props.h?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/libsvn_wc/props.h (original)
+++ subversion/branches/svn-patch-improvements/subversion/libsvn_wc/props.h Tue Mar 30 20:57:53 2010
@@ -52,7 +52,7 @@ svn_error_t *svn_wc__has_props(svn_boole
                                apr_pool_t *pool);
 
 
-/* Internal function for diffing props. */
+/* Internal function for diffing props. See svn_wc_get_prop_diffs2(). */
 svn_error_t *
 svn_wc__internal_propdiff(apr_array_header_t **propchanges,
                           apr_hash_t **original_props,
@@ -62,7 +62,7 @@ svn_wc__internal_propdiff(apr_array_head
                           apr_pool_t *scratch_pool);
 
 
-/* Internal function for fetching a property.  */
+/* Internal function for fetching a property. See svn_wc_prop_get2(). */
 svn_error_t *
 svn_wc__internal_propget(const svn_string_t **value,
                          svn_wc__db_t *db,
@@ -72,7 +72,7 @@ svn_wc__internal_propget(const svn_strin
                          apr_pool_t *scratch_pool);
 
 
-/* Internal function for setting a property.  */
+/* Internal function for setting a property. See svn_wc_prop_set4(). */
 svn_error_t *
 svn_wc__internal_propset(svn_wc__db_t *db,
                          const char *local_abspath,
@@ -115,8 +115,7 @@ svn_wc__internal_propset(svn_wc__db_t *d
    If STATE is non-null, set *STATE to the state of the local properties
    after the merge.  */
 svn_error_t *
-svn_wc__merge_props(svn_stringbuf_t **entry_accum,
-                    svn_wc_notify_state_t *state,
+svn_wc__merge_props(svn_wc_notify_state_t *state,
                     apr_hash_t **new_base_props,
                     apr_hash_t **new_actual_props,
                     svn_wc__db_t *db,
@@ -221,6 +220,9 @@ svn_wc__load_revert_props(apr_hash_t **r
                           apr_pool_t *result_pool,
                           apr_pool_t *scratch_pool);
 
+/* Set *MARKED to indicate whether the versioned file at LOCAL_ABSPATH in DB
+ * has a "binary" file type, as indicated by its working svn:mime-type
+ * property. See svn_mime_type_is_binary() for the interpretation. */
 svn_error_t *
 svn_wc__marked_as_binary(svn_boolean_t *marked,
                          const char *local_abspath,
@@ -228,16 +230,6 @@ svn_wc__marked_as_binary(svn_boolean_t *
                          apr_pool_t *scratch_pool);
 
 
-/* Temporary helper for determining where to store pristine properties.
-   All calls will eventually be replaced by direct wc_db operations
-   of the right type. */
-svn_error_t *
-svn_wc__prop_pristine_is_working(svn_boolean_t *working,
-                                 svn_wc__db_t *db,
-                                 const char *local_abspath,
-                                 apr_pool_t *scratch_pool);
-
-
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */

Modified: subversion/branches/svn-patch-improvements/subversion/libsvn_wc/questions.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/libsvn_wc/questions.c?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/libsvn_wc/questions.c (original)
+++ subversion/branches/svn-patch-improvements/subversion/libsvn_wc/questions.c Tue Mar 30 20:57:53 2010
@@ -353,7 +353,7 @@ svn_wc__internal_text_modified_p(svn_boo
     }
 
  compare_them:
- /* If there's no text-base file, we have to assume the working file
+  /* If there's no text-base file, we have to assume the working file
      is modified.  For example, a file scheduled for addition but not
      yet committed. */
   /* We used to stat for the working base here, but we just give
@@ -369,6 +369,12 @@ svn_wc__internal_text_modified_p(svn_boo
 
   SVN_ERR(err);
 
+  if (pristine_stream == NULL)
+    {
+      *modified_p = TRUE;
+      return SVN_NO_ERROR;
+    }
+
   /* Check all bytes, and verify checksum if requested. */
   err = compare_and_verify(modified_p, db, local_abspath, pristine_stream,
                            compare_textbases, force_comparison,

Modified: subversion/branches/svn-patch-improvements/subversion/libsvn_wc/relocate.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/libsvn_wc/relocate.c?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/libsvn_wc/relocate.c (original)
+++ subversion/branches/svn-patch-improvements/subversion/libsvn_wc/relocate.c Tue Mar 30 20:57:53 2010
@@ -37,6 +37,7 @@
 #include "svn_private_config.h"
 
 
+/* */
 static const char *
 uri_remove_components(const char *uri,
                       const char *component,

Modified: subversion/branches/svn-patch-improvements/subversion/libsvn_wc/revision_status.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/libsvn_wc/revision_status.c?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/libsvn_wc/revision_status.c (original)
+++ subversion/branches/svn-patch-improvements/subversion/libsvn_wc/revision_status.c Tue Mar 30 20:57:53 2010
@@ -23,65 +23,100 @@
 
 #include "svn_wc.h"
 #include "svn_dirent_uri.h"
+#include "wc_db.h"
+#include "wc.h"
+#include "props.h"
 
 #include "private/svn_wc_private.h"
 
 #include "svn_private_config.h"
 
 /* A baton for analyze_status(). */
-struct status_baton
+struct walk_baton
 {
   svn_wc_revision_status_t *result;           /* where to put the result */
   svn_boolean_t committed;           /* examine last committed revisions */
   const char *local_abspath;         /* path whose URL we're looking for */
-  const char *wc_url;    /* URL for the path whose URL we're looking for */
-  apr_pool_t *pool;         /* pool in which to store alloc-needy things */
+  svn_wc__db_t *db;
 };
 
-/* An svn_wc_status_func4_t callback function for analyzing status
-   structures. */
+/* An svn_wc__node_found_func_t callback function for analyzing the status
+ * of nodes */
 static svn_error_t *
-analyze_status(void *baton,
-               const char *local_abspath,
-               const svn_wc_status2_t *status,
-               apr_pool_t *pool)
+analyze_status(const char *local_abspath,
+               void *baton,
+               apr_pool_t *scratch_pool)
 {
-  struct status_baton *sb = baton;
+  struct walk_baton *wb = baton;
+  svn_revnum_t changed_rev;
+  svn_revnum_t revision;
+  svn_depth_t depth;
+  svn_wc__db_status_t status;
+  svn_boolean_t wc_root;
+  svn_boolean_t switched;
+
+  SVN_ERR(svn_wc__db_read_info(&status, NULL, &revision, NULL, 
+                               NULL, NULL, &changed_rev, 
+                               NULL, NULL, NULL, &depth, NULL, NULL, NULL,
+                               NULL, NULL, NULL, NULL, NULL, NULL,
+                               NULL, NULL, NULL, NULL, wb->db,
+                               local_abspath, scratch_pool, scratch_pool));
+
+  /* We need the excluded and absent paths when checking for sparse
+   * checkouts. But only for that. To collect those we're walking all the
+   * hidden nodes. */
+  if (status == svn_wc__db_status_excluded 
+      || status == svn_wc__db_status_absent)
+    {
+      wb->result->sparse_checkout = TRUE;
+      return SVN_NO_ERROR;
+    }
 
-  if (! status->entry)
+  if (status == svn_wc__db_status_not_present)
     return SVN_NO_ERROR;
 
-  /* Added files have a revision of no interest */
-  if (status->text_status != svn_wc_status_added)
+  if (! wb->result->switched)
     {
-      svn_revnum_t item_rev = (sb->committed
-                               ? status->entry->cmt_rev
-                               : status->entry->revision);
-
-      if (sb->result->min_rev == SVN_INVALID_REVNUM
-          || item_rev < sb->result->min_rev)
-        sb->result->min_rev = item_rev;
-
-      if (sb->result->max_rev == SVN_INVALID_REVNUM
-          || item_rev > sb->result->max_rev)
-        sb->result->max_rev = item_rev;
+      SVN_ERR(svn_wc__check_wc_root(&wc_root, NULL, &switched, wb->db,
+                                    local_abspath, scratch_pool));
+
+      wb->result->switched |= switched;
     }
 
-  if (status->entry->depth != svn_depth_exclude)
+  /* Added files have a revision of no interest */
+  if (revision != SVN_INVALID_REVNUM)
     {
-      sb->result->switched |= status->switched;
-      sb->result->modified |= (status->text_status != svn_wc_status_normal);
-      sb->result->modified |= (status->prop_status != svn_wc_status_normal
-                               && status->prop_status != svn_wc_status_none);
+      svn_revnum_t item_rev = (wb->committed
+                               ? changed_rev
+                               : revision);
+
+      if (wb->result->min_rev == SVN_INVALID_REVNUM
+          || item_rev < wb->result->min_rev)
+        wb->result->min_rev = item_rev;
+
+      if (wb->result->max_rev == SVN_INVALID_REVNUM
+          || item_rev > wb->result->max_rev)
+        wb->result->max_rev = item_rev;
     }
-  sb->result->sparse_checkout |= (status->entry->depth != svn_depth_infinity);
 
-  if (sb->local_abspath
-      && (! sb->wc_url)
-      && (strcmp(local_abspath, sb->local_abspath) == 0)
-      && (status->entry))
-    sb->wc_url = apr_pstrdup(sb->pool, status->entry->url);
+  if (! wb->result->modified)
+    {
+      svn_boolean_t text_mod;
+      svn_boolean_t props_mod;
 
+      SVN_ERR(svn_wc__props_modified(&props_mod, wb->db, local_abspath,
+                                     scratch_pool));
+
+      SVN_ERR(svn_wc__internal_text_modified_p(&text_mod, wb->db,
+                                               local_abspath,
+                                               FALSE,
+                                               TRUE,
+                                               scratch_pool));
+      wb->result->modified |= (text_mod || props_mod);
+    }
+
+  wb->result->sparse_checkout |= ((depth != svn_depth_infinity 
+                                  && depth != svn_depth_unknown));
   return SVN_NO_ERROR;
 }
 
@@ -96,7 +131,8 @@ svn_wc_revision_status2(svn_wc_revision_
                         apr_pool_t *result_pool,
                         apr_pool_t *scratch_pool)
 {
-  struct status_baton sb;
+  struct walk_baton wb;
+  const char *url;
   svn_wc_revision_status_t *result = apr_palloc(result_pool, sizeof(*result));
   *result_p = result;
 
@@ -110,50 +146,39 @@ svn_wc_revision_status2(svn_wc_revision_
   result->sparse_checkout = FALSE;
 
   /* initialize walking baton */
-  sb.result = result;
-  sb.committed = committed;
-  sb.local_abspath = local_abspath;
-  sb.wc_url = NULL;
-  sb.pool = scratch_pool;
-
-  SVN_ERR(svn_wc_walk_status(wc_ctx,
-                             local_abspath,
-                             svn_depth_infinity,
-                             TRUE  /* get_all */,
-                             FALSE /* no_ignore */,
-                             TRUE, /* get_excluded */
-                             NULL  /* ignore_patterns */,
-                             analyze_status, &sb,
-                             NULL, NULL,
-                             cancel_func, cancel_baton,
-                             scratch_pool));
+  wb.result = result;
+  wb.committed = committed;
+  wb.local_abspath = local_abspath;
+  wb.db = wc_ctx->db;
 
+  SVN_ERR(svn_wc__internal_node_get_url(&url, wc_ctx->db, local_abspath,
+                                        result_pool, scratch_pool));
 
-  if ((! result->switched) && (trail_url != NULL))
+  if (trail_url != NULL)
     {
       /* If the trailing part of the URL of the working copy directory
          does not match the given trailing URL then the whole working
          copy is switched. */
-      if (! sb.wc_url)
+      if (! url)
         {
           result->switched = TRUE;
         }
       else
         {
           apr_size_t len1 = strlen(trail_url);
-          apr_size_t len2 = strlen(sb.wc_url);
-          if ((len1 > len2) || strcmp(sb.wc_url + len2 - len1, trail_url))
+          apr_size_t len2 = strlen(url);
+          if ((len1 > len2) || strcmp(url + len2 - len1, trail_url))
             result->switched = TRUE;
         }
     }
 
-  /* ### 1.6+: If result->sparse_checkout is FALSE the answer is not final
-         We can still have excluded nodes!
-
-     ### TODO: Check every node below local_abspath for excluded
-
-     ### BH: What about absent? You don't know if you have a complete tree
-             without checking for absent too */
+  SVN_ERR(svn_wc__node_walk_children(wc_ctx,
+                                     local_abspath,
+                                     TRUE /* show_hidden */,
+                                     analyze_status, &wb,
+                                     svn_depth_infinity,
+                                     cancel_func, cancel_baton,
+                                     scratch_pool));
 
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/svn-patch-improvements/subversion/libsvn_wc/status.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/libsvn_wc/status.c?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/libsvn_wc/status.c (original)
+++ subversion/branches/svn-patch-improvements/subversion/libsvn_wc/status.c Tue Mar 30 20:57:53 2010
@@ -722,7 +722,7 @@ is_external_path(apr_hash_t *externals,
        hi;
        hi = apr_hash_next(hi))
     {
-      const char *external_abspath = svn_apr_hash_index_key(hi);
+      const char *external_abspath = svn__apr_hash_index_key(hi);
 
       if (svn_dirent_is_child(local_abspath, external_abspath, NULL))
         return TRUE;
@@ -755,7 +755,7 @@ send_unversioned_item(const struct walk_
                       const char *local_abspath,
                       svn_node_kind_t path_kind,
                       svn_boolean_t path_special,
-                      apr_array_header_t *patterns,
+                      const apr_array_header_t *patterns,
                       svn_boolean_t no_ignore,
                       svn_wc_status_func4_t status_func,
                       void *status_baton,
@@ -1631,8 +1631,8 @@ handle_statii(struct edit_baton *eb,
   /* Loop over all the statuses still in our hash, handling each one. */
   for (hi = apr_hash_first(pool, statii); hi; hi = apr_hash_next(hi))
     {
-      const char *path = svn_apr_hash_index_key(hi);
-      svn_wc_status2_t *status = svn_apr_hash_index_val(hi);
+      const char *path = svn__apr_hash_index_key(hi);
+      svn_wc_status2_t *status = svn__apr_hash_index_val(hi);
 
       /* Clear the subpool. */
       svn_pool_clear(subpool);
@@ -1674,6 +1674,7 @@ handle_statii(struct edit_baton *eb,
 
 /*** The callbacks we'll plug into an svn_delta_editor_t structure. ***/
 
+/* */
 static svn_error_t *
 set_target_revision(void *edit_baton,
                     svn_revnum_t target_revision,
@@ -1685,6 +1686,7 @@ set_target_revision(void *edit_baton,
 }
 
 
+/* */
 static svn_error_t *
 open_root(void *edit_baton,
           svn_revnum_t base_revision,
@@ -1697,6 +1699,7 @@ open_root(void *edit_baton,
 }
 
 
+/* */
 static svn_error_t *
 delete_entry(const char *path,
              svn_revnum_t revision,
@@ -1737,6 +1740,7 @@ delete_entry(const char *path,
 }
 
 
+/* */
 static svn_error_t *
 add_directory(const char *path,
               void *parent_baton,
@@ -1762,6 +1766,7 @@ add_directory(const char *path,
 }
 
 
+/* */
 static svn_error_t *
 open_directory(const char *path,
                void *parent_baton,
@@ -1774,6 +1779,7 @@ open_directory(const char *path,
 }
 
 
+/* */
 static svn_error_t *
 change_dir_prop(void *dir_baton,
                 const char *name,
@@ -1804,6 +1810,7 @@ change_dir_prop(void *dir_baton,
 
 
 
+/* */
 static svn_error_t *
 close_directory(void *dir_baton,
                 apr_pool_t *pool)
@@ -1939,6 +1946,7 @@ close_directory(void *dir_baton,
 
 
 
+/* */
 static svn_error_t *
 add_file(const char *path,
          void *parent_baton,
@@ -1961,6 +1969,7 @@ add_file(const char *path,
 }
 
 
+/* */
 static svn_error_t *
 open_file(const char *path,
           void *parent_baton,
@@ -1976,6 +1985,7 @@ open_file(const char *path,
 }
 
 
+/* */
 static svn_error_t *
 apply_textdelta(void *file_baton,
                 const char *base_checksum,
@@ -1996,6 +2006,7 @@ apply_textdelta(void *file_baton,
 }
 
 
+/* */
 static svn_error_t *
 change_file_prop(void *file_baton,
                  const char *name,
@@ -2027,6 +2038,7 @@ change_file_prop(void *file_baton,
 }
 
 
+/* */
 static svn_error_t *
 close_file(void *file_baton,
            const char *text_checksum,  /* ignored, as we receive no data */
@@ -2074,6 +2086,7 @@ close_file(void *file_baton,
                           pool);
 }
 
+/* */
 static svn_error_t *
 close_edit(void *edit_baton,
            apr_pool_t *pool)
@@ -2343,6 +2356,7 @@ svn_wc_get_default_ignores(apr_array_hea
 }
 
 
+/* */
 static svn_error_t *
 internal_status(svn_wc_status2_t **status,
                 svn_wc__db_t *db,
@@ -2375,7 +2389,7 @@ internal_status(svn_wc_status2_t **statu
 
       if (hidden)
         entry = NULL;
-    }  
+    }
 
   if (entry && !svn_dirent_is_root(local_abspath, strlen(local_abspath)))
     {

Modified: subversion/branches/svn-patch-improvements/subversion/libsvn_wc/translate.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/libsvn_wc/translate.c?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/libsvn_wc/translate.c (original)
+++ subversion/branches/svn-patch-improvements/subversion/libsvn_wc/translate.c Tue Mar 30 20:57:53 2010
@@ -50,12 +50,14 @@
 
 
 
+/* */
 static svn_error_t *
 read_handler_unsupported(void *baton, char *buffer, apr_size_t *len)
 {
   SVN_ERR_MALFUNCTION();
 }
 
+/* */
 static svn_error_t *
 write_handler_unsupported(void *baton, const char *buffer, apr_size_t *len)
 {

Modified: subversion/branches/svn-patch-improvements/subversion/libsvn_wc/tree_conflicts.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/libsvn_wc/tree_conflicts.c?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/libsvn_wc/tree_conflicts.c (original)
+++ subversion/branches/svn-patch-improvements/subversion/libsvn_wc/tree_conflicts.c Tue Mar 30 20:57:53 2010
@@ -38,38 +38,6 @@
 
 #include "svn_private_config.h"
 
-
-/* OVERVIEW
- *
- * This file handles the storage and retrieval of tree conflict descriptions
- * (svn_wc_conflict_description_t) in the WC.
- *
- * Data Format
- *
- * All tree conflicts descriptions for the current tree conflict victims in
- * one parent directory are stored in a single "tree_conflict_data" text
- * field in that parent's THIS_DIR entry.
- *
- *   tree_conflict_data: zero or more conflicts (one per victim path),
- *     separated by the SVN_WC__TREE_CONFLICT_DESC_SEPARATOR character.
- *
- *   a description entry: a fixed sequence of text fields, some of which
- *     may be empty, corresponding to the pertinent fields of
- *     svn_wc_conflict_description_t, separated by
- *     SVN_WC__TREE_CONFLICT_DESC_FIELD_SEPARATOR.
- *
- *   a field: a string within which any separator or escape characters are
- *     escaped with the escape character SVN_WC__TREE_CONFLICT_ESCAPE_CHAR.
- *
- * Error Handling
- *
- * On reading from the WC entry, errors of malformed data are handled by
- * raising an svn_error_t, as these can occur from WC corruption. On
- * writing, errors in the internal data consistency before it is written are
- * handled more severely because any such errors must be due to a bug.
- */
-
-
 /* ### this should move to a more general location...  */
 /* A map for svn_node_kind_t values. */
 static const svn_token_map_t node_kind_map[] =
@@ -115,6 +83,7 @@ const svn_token_map_t svn_wc__conflict_r
 };
 
 
+/* */
 static svn_boolean_t
 is_valid_version_info_skel(const svn_skel_t *skel)
 {
@@ -127,6 +96,7 @@ is_valid_version_info_skel(const svn_ske
 }
 
 
+/* */
 static svn_boolean_t
 is_valid_conflict_skel(const svn_skel_t *skel)
 {
@@ -216,11 +186,9 @@ read_node_version_info(const svn_wc_conf
 }
 
 /* Parse a newly allocated svn_wc_conflict_description2_t object from the
- * character string pointed to by *START. Return the result in *CONFLICT.
- * Don't read further than END. Set *START to point to the next character
- * after the description that was read.
+ * provided SKEL. Return the result in *CONFLICT, allocated in RESULT_POOL.
  * DIR_PATH is the path to the WC directory whose conflicts are being read.
- * Do all allocations in pool.
+ * Use SCRATCH_POOL for temporary allocations.
  */
 svn_error_t *
 svn_wc__deserialize_conflict(const svn_wc_conflict_description2_t **conflict,
@@ -468,7 +436,7 @@ svn_wc__write_tree_conflicts(const char 
     {
       svn_skel_t *c_skel;
 
-      SVN_ERR(svn_wc__serialize_conflict(&c_skel, svn_apr_hash_index_val(hi),
+      SVN_ERR(svn_wc__serialize_conflict(&c_skel, svn__apr_hash_index_val(hi),
                                          pool, pool));
       svn_skel__prepend(c_skel, skel);
     }