subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ar...@apache.org
Subject svn commit: r1148749 [7/11] - in /subversion/branches/svn-bisect: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ contrib/hook-scripts/ contrib/hook-scripts/enforcer/ contrib/server-side/ contrib/server-side/fsfsfixer/fixer/ note...
Date Wed, 20 Jul 2011 13:06:16 GMT
Modified: subversion/branches/svn-bisect/subversion/libsvn_wc/adm_ops.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_wc/adm_ops.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_wc/adm_ops.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_wc/adm_ops.c Wed Jul 20 13:06:00 2011
@@ -849,7 +849,6 @@ check_can_add_node(svn_node_kind_t *kind
   const char *base_name = svn_dirent_basename(local_abspath, scratch_pool);
   svn_boolean_t is_wc_root;
   svn_node_kind_t kind;
-  svn_boolean_t exists;
 
   SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
   SVN_ERR_ASSERT(!copyfrom_url || (svn_uri_is_canonical(copyfrom_url,
@@ -886,6 +885,7 @@ check_can_add_node(svn_node_kind_t *kind
   {
     svn_wc__db_status_t status;
     svn_boolean_t conflicted;
+    svn_boolean_t exists;
     svn_error_t *err
       = svn_wc__db_read_info(&status, NULL, NULL, NULL, NULL, NULL, NULL,
                              NULL, NULL, NULL, NULL, NULL, NULL, NULL,
@@ -1289,7 +1289,7 @@ revert_restore(svn_wc__db_t *db,
   svn_wc__db_status_t status;
   svn_wc__db_kind_t kind;
   svn_node_kind_t on_disk;
-  svn_boolean_t special, notify_required;
+  svn_boolean_t notify_required;
   const char *conflict_old;
   const char *conflict_new;
   const char *conflict_working;
@@ -1297,6 +1297,9 @@ revert_restore(svn_wc__db_t *db,
   svn_filesize_t recorded_size;
   apr_time_t recorded_mod_time;
   apr_finfo_t finfo;
+#ifdef HAVE_SYMLINK
+  svn_boolean_t special;
+#endif
 
   if (cancel_func)
     SVN_ERR(cancel_func(cancel_baton));
@@ -1345,7 +1348,9 @@ revert_restore(svn_wc__db_t *db,
     {
       svn_error_clear(err);
       on_disk = svn_node_none;
+#ifdef HAVE_SYMLINK
       special = FALSE;
+#endif
     }
   else
     {
@@ -1356,7 +1361,9 @@ revert_restore(svn_wc__db_t *db,
       else
         on_disk = svn_node_unknown;
 
+#ifdef HAVE_SYMLINK
       special = (finfo.filetype == APR_LNK);
+#endif
     }
 
   /* If we expect a versioned item to be present then check that any
@@ -1385,15 +1392,17 @@ revert_restore(svn_wc__db_t *db,
           svn_boolean_t executable;
           svn_boolean_t read_only;
           apr_hash_t *props;
+#ifdef HAVE_SYMLINK
           svn_string_t *special_prop;
+#endif
 
           SVN_ERR(svn_wc__db_read_pristine_props(&props, db, local_abspath,
                                                  scratch_pool, scratch_pool));
 
+#ifdef HAVE_SYMLINK
           special_prop = apr_hash_get(props, SVN_PROP_SPECIAL,
                                       APR_HASH_KEY_STRING);
 
-#ifdef HAVE_SYMLINK
           if ((special_prop != NULL) != special)
             {
               /* File/symlink mismatch. */
@@ -1777,19 +1786,19 @@ svn_wc_revert4(svn_wc_context_t *wc_ctx,
       SVN_ERR(svn_hash_from_cstring_keys(&changelist_hash, changelist_filter,
                                          scratch_pool));
       return svn_error_trace(new_revert_changelist(wc_ctx->db, local_abspath,
-                                                    depth, use_commit_times,
-                                                    changelist_hash,
-                                                    cancel_func, cancel_baton,
-                                                    notify_func, notify_baton,
-                                                    scratch_pool));
+                                                   depth, use_commit_times,
+                                                   changelist_hash,
+                                                   cancel_func, cancel_baton,
+                                                   notify_func, notify_baton,
+                                                   scratch_pool));
     }
 
   if (depth == svn_depth_empty || depth == svn_depth_infinity)
     return svn_error_trace(new_revert_internal(wc_ctx->db, local_abspath,
-                                                depth, use_commit_times,
-                                                cancel_func, cancel_baton,
-                                                notify_func, notify_baton,
-                                                scratch_pool));
+                                               depth, use_commit_times,
+                                               cancel_func, cancel_baton,
+                                               notify_func, notify_baton,
+                                               scratch_pool));
 
   /* The user may expect svn_depth_files/svn_depth_immediates to work
      on copied dirs with one level of children.  It doesn't, the user
@@ -1799,10 +1808,10 @@ svn_wc_revert4(svn_wc_context_t *wc_ctx,
 
   if (depth == svn_depth_files || depth == svn_depth_immediates)
     return svn_error_trace(new_revert_partial(wc_ctx->db, local_abspath,
-                                               depth, use_commit_times,
-                                               cancel_func, cancel_baton,
-                                               notify_func, notify_baton,
-                                               scratch_pool));
+                                              depth, use_commit_times,
+                                              cancel_func, cancel_baton,
+                                              notify_func, notify_baton,
+                                              scratch_pool));
 
   /* Bogus depth. Tell the caller.  */
   return svn_error_create(SVN_ERR_WC_INVALID_OPERATION_DEPTH, NULL, NULL);
@@ -1863,10 +1872,10 @@ svn_wc_get_pristine_contents2(svn_stream
                               apr_pool_t *scratch_pool)
 {
   return svn_error_trace(svn_wc__get_pristine_contents(contents, NULL,
-                                                        wc_ctx->db,
-                                                        local_abspath,
-                                                        result_pool,
-                                                        scratch_pool));
+                                                       wc_ctx->db,
+                                                       local_abspath,
+                                                       result_pool,
+                                                       scratch_pool));
 }
 
 

Modified: subversion/branches/svn-bisect/subversion/libsvn_wc/conflicts.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_wc/conflicts.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_wc/conflicts.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_wc/conflicts.c Wed Jul 20 13:06:00 2011
@@ -330,12 +330,12 @@ svn_wc__resolve_text_conflict(svn_wc__db
   svn_boolean_t ignored_result;
 
   return svn_error_trace(resolve_conflict_on_node(
-                            db, local_abspath,
-                            TRUE /* resolve_text */,
-                            FALSE /* resolve_props */,
-                            svn_wc_conflict_choose_merged,
-                            &ignored_result,
-                            scratch_pool));
+                           db, local_abspath,
+                           TRUE /* resolve_text */,
+                           FALSE /* resolve_props */,
+                           svn_wc_conflict_choose_merged,
+                           &ignored_result,
+                           scratch_pool));
 }
 
 
@@ -629,15 +629,15 @@ svn_wc_resolved_conflict5(svn_wc_context
     depth = svn_depth_infinity;
 
   return svn_error_trace(recursive_resolve_conflict(
-                            wc_ctx->db,
-                            local_abspath,
-                            conflicted,
-                            depth,
-                            resolve_text,
-                            resolve_prop,
-                            resolve_tree,
-                            conflict_choice,
-                            cancel_func, cancel_baton,
-                            notify_func, notify_baton,
-                            scratch_pool));
+                           wc_ctx->db,
+                           local_abspath,
+                           conflicted,
+                           depth,
+                           resolve_text,
+                           resolve_prop,
+                           resolve_tree,
+                           conflict_choice,
+                           cancel_func, cancel_baton,
+                           notify_func, notify_baton,
+                           scratch_pool));
 }

Modified: subversion/branches/svn-bisect/subversion/libsvn_wc/copy.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_wc/copy.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_wc/copy.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_wc/copy.c Wed Jul 20 13:06:00 2011
@@ -169,36 +169,15 @@ copy_pristine_text_if_necessary(svn_wc__
   return SVN_NO_ERROR;
 }
 
-/* Copy the versioned node SRC_ABSPATH in DB to the path DST_ABSPATH in DB.
-
-   This is a specific variant of copy_versioned_file and copy_versioned_dir
-   specifically handling deleted nodes.
- */
-static svn_error_t *
-copy_deleted_node(svn_wc__db_t *db,
-                  const char *src_abspath,
-                  const char *dst_abspath,
-                  const char *dst_op_root_abspath,
-                  svn_cancel_func_t cancel_func,
-                  void *cancel_baton,
-                  svn_wc_notify_func2_t notify_func,
-                  void *notify_baton,
-                  apr_pool_t *scratch_pool)
-{
-  SVN_ERR(svn_wc__db_op_copy(db, src_abspath, dst_abspath, dst_op_root_abspath,
-                             NULL, scratch_pool));
-
-  /* Don't recurse on children while all we do is creating not-present
-     children */
-
-  return SVN_NO_ERROR;
-}
 
 /* Copy the versioned file SRC_ABSPATH in DB to the path DST_ABSPATH in DB.
    If METADATA_ONLY is true, copy only the versioned metadata,
    otherwise copy both the versioned metadata and the filesystem node (even
    if it is the wrong kind, and recursively if it is a dir).
 
+   If IS_MOVE is true, record move information in working copy meta
+   data in addition to copying the file.
+
    If the versioned file has a text conflict, and the .mine file exists in
    the filesystem, copy the .mine file to DST_ABSPATH.  Otherwise, copy the
    versioned file itself.
@@ -214,6 +193,7 @@ copy_versioned_file(svn_wc__db_t *db,
                     const svn_checksum_t *checksum,
                     svn_boolean_t metadata_only,
                     svn_boolean_t conflicted,
+                    svn_boolean_t is_move,
                     svn_cancel_func_t cancel_func,
                     void *cancel_baton,
                     svn_wc_notify_func2_t notify_func,
@@ -332,8 +312,14 @@ copy_versioned_file(svn_wc__db_t *db,
 
   /* Copy the (single) node's metadata, and move the new filesystem node
      into place. */
-  SVN_ERR(svn_wc__db_op_copy(db, src_abspath, dst_abspath, dst_op_root_abspath,
-                             work_items, scratch_pool));
+  if (is_move)
+    SVN_ERR(svn_wc__db_op_move(db, src_abspath, dst_abspath,
+                               dst_op_root_abspath, work_items,
+                               scratch_pool));
+  else
+    SVN_ERR(svn_wc__db_op_copy(db, src_abspath, dst_abspath,
+                               dst_op_root_abspath, work_items,
+                               scratch_pool));
   SVN_ERR(svn_wc__wq_run(db, dir_abspath,
                          cancel_func, cancel_baton, scratch_pool));
 
@@ -351,7 +337,9 @@ copy_versioned_file(svn_wc__db_t *db,
 /* Copy the versioned dir SRC_ABSPATH in DB to the path DST_ABSPATH in DB,
    recursively.  If METADATA_ONLY is true, copy only the versioned metadata,
    otherwise copy both the versioned metadata and the filesystem nodes (even
-   if they are the wrong kind, and including unversioned children). */
+   if they are the wrong kind, and including unversioned children).
+   If IS_MOVE is true, record move information in working copy meta
+   data in addition to copying the directory. */
 static svn_error_t *
 copy_versioned_dir(svn_wc__db_t *db,
                    const char *src_abspath,
@@ -359,6 +347,7 @@ copy_versioned_dir(svn_wc__db_t *db,
                    const char *dst_op_root_abspath,
                    const char *tmpdir_abspath,
                    svn_boolean_t metadata_only,
+                   svn_boolean_t is_move,
                    svn_cancel_func_t cancel_func,
                    void *cancel_baton,
                    svn_wc_notify_func2_t notify_func,
@@ -394,8 +383,14 @@ copy_versioned_dir(svn_wc__db_t *db,
 
   /* Copy the (single) node's metadata, and move the new filesystem node
      into place. */
-  SVN_ERR(svn_wc__db_op_copy(db, src_abspath, dst_abspath, dst_op_root_abspath,
-                             work_items, scratch_pool));
+  if (is_move)
+    SVN_ERR(svn_wc__db_op_move(db, src_abspath, dst_abspath,
+                               dst_op_root_abspath, work_items,
+                               scratch_pool));
+  else
+    SVN_ERR(svn_wc__db_op_copy(db, src_abspath, dst_abspath,
+                               dst_op_root_abspath, work_items,
+                               scratch_pool));
   SVN_ERR(svn_wc__wq_run(db, dir_abspath,
                          cancel_func, cancel_baton, scratch_pool));
 
@@ -480,6 +475,7 @@ copy_versioned_dir(svn_wc__db_t *db,
                                             dst_op_root_abspath,
                                             tmpdir_abspath, checksum,
                                             metadata_only, conflicted,
+                                            is_move,
                                             cancel_func, cancel_baton,
                                             NULL, NULL,
                                             iterpool));
@@ -488,7 +484,7 @@ copy_versioned_dir(svn_wc__db_t *db,
             SVN_ERR(copy_versioned_dir(db,
                                        child_src_abspath, child_dst_abspath,
                                        dst_op_root_abspath, tmpdir_abspath,
-                                       metadata_only,
+                                       metadata_only, is_move,
                                        cancel_func, cancel_baton, NULL, NULL,
                                        iterpool));
           else
@@ -503,11 +499,17 @@ copy_versioned_dir(svn_wc__db_t *db,
         {
           /* This will be copied as some kind of deletion. Don't touch
              any actual files */
-          SVN_ERR(copy_deleted_node(db,
-                                    child_src_abspath, child_dst_abspath,
-                                    dst_op_root_abspath,
-                                    cancel_func, cancel_baton, NULL, NULL,
-                                    iterpool));
+          if (is_move)
+            SVN_ERR(svn_wc__db_op_move(db, child_src_abspath,
+                                       child_dst_abspath, dst_op_root_abspath,
+                                       NULL, scratch_pool));
+          else
+            SVN_ERR(svn_wc__db_op_copy(db, child_src_abspath,
+                                       child_dst_abspath, dst_op_root_abspath,
+                                       NULL, iterpool));
+
+          /* Don't recurse on children while all we do is creating not-present
+             children */
         }
       else
         {
@@ -586,13 +588,15 @@ copy_versioned_dir(svn_wc__db_t *db,
 }
 
 
-/* Public Interface */
-
-svn_error_t *
-svn_wc_copy3(svn_wc_context_t *wc_ctx,
+/* The guts of svn_wc_copy3() and svn_wc_move().
+ * The additional parameter IS_MOVE indicates whether this is a copy or
+ * a move operation. */
+static svn_error_t *
+copy_or_move(svn_wc_context_t *wc_ctx,
              const char *src_abspath,
              const char *dst_abspath,
              svn_boolean_t metadata_only,
+             svn_boolean_t is_move,
              svn_cancel_func_t cancel_func,
              void *cancel_baton,
              svn_wc_notify_func2_t notify_func,
@@ -767,7 +771,7 @@ svn_wc_copy3(svn_wc_context_t *wc_ctx,
     {
       SVN_ERR(copy_versioned_file(db, src_abspath, dst_abspath, dst_abspath,
                                   tmpdir_abspath, checksum,
-                                  metadata_only, conflicted,
+                                  metadata_only, conflicted, is_move,
                                   cancel_func, cancel_baton,
                                   notify_func, notify_baton,
                                   scratch_pool));
@@ -776,7 +780,7 @@ svn_wc_copy3(svn_wc_context_t *wc_ctx,
     {
       SVN_ERR(copy_versioned_dir(db, src_abspath, dst_abspath, dst_abspath,
                                  tmpdir_abspath,
-                                 metadata_only,
+                                 metadata_only, is_move,
                                  cancel_func, cancel_baton,
                                  notify_func, notify_baton,
                                  scratch_pool));
@@ -785,6 +789,28 @@ svn_wc_copy3(svn_wc_context_t *wc_ctx,
   return SVN_NO_ERROR;
 }
 
+
+/* Public Interface */
+
+svn_error_t *
+svn_wc_copy3(svn_wc_context_t *wc_ctx,
+             const char *src_abspath,
+             const char *dst_abspath,
+             svn_boolean_t metadata_only,
+             svn_cancel_func_t cancel_func,
+             void *cancel_baton,
+             svn_wc_notify_func2_t notify_func,
+             void *notify_baton,
+             apr_pool_t *scratch_pool)
+{
+  return svn_error_trace(copy_or_move(wc_ctx, src_abspath, dst_abspath,
+                                      metadata_only, FALSE /* is_move */,
+                                      cancel_func, cancel_baton,
+                                      notify_func, notify_baton,
+                                      scratch_pool));
+}
+
+
 /* Remove the conflict markers of NODE_ABSPATH, that were left over after
    copying NODE_ABSPATH from SRC_ABSPATH.
 
@@ -945,8 +971,9 @@ svn_wc_move(svn_wc_context_t *wc_ctx,
             apr_pool_t *scratch_pool)
 {
   svn_wc__db_t *db = wc_ctx->db;
-  SVN_ERR(svn_wc_copy3(wc_ctx, src_abspath, dst_abspath,
+  SVN_ERR(copy_or_move(wc_ctx, src_abspath, dst_abspath,
                        TRUE /* metadata_only */,
+                       TRUE /* is_move */,
                        cancel_func, cancel_baton,
                        notify_func, notify_baton,
                        scratch_pool));

Modified: subversion/branches/svn-bisect/subversion/libsvn_wc/crop.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_wc/crop.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_wc/crop.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_wc/crop.c Wed Jul 20 13:06:00 2011
@@ -283,16 +283,16 @@ svn_wc_exclude(svn_wc_context_t *wc_ctx,
                                     cancel_func, cancel_baton,
                                     scratch_pool));
 
-  SVN_ERR(svn_wc__db_base_add_absent_node(wc_ctx->db,
-                                          local_abspath,
-                                          repos_relpath,
-                                          repos_root,
-                                          repos_uuid,
-                                          revision,
-                                          kind,
-                                          svn_wc__db_status_excluded,
-                                          NULL, NULL,
-                                          scratch_pool));
+  SVN_ERR(svn_wc__db_base_add_excluded_node(wc_ctx->db,
+                                            local_abspath,
+                                            repos_relpath,
+                                            repos_root,
+                                            repos_uuid,
+                                            revision,
+                                            kind,
+                                            svn_wc__db_status_excluded,
+                                            NULL, NULL,
+                                            scratch_pool));
 
   if (notify_func)
     {

Modified: subversion/branches/svn-bisect/subversion/libsvn_wc/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_wc/deprecated.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_wc/deprecated.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_wc/deprecated.c Wed Jul 20 13:06:00 2011
@@ -2360,11 +2360,10 @@ svn_wc_prop_list(apr_hash_t **props,
     {
       *props = apr_hash_make(pool);
       svn_error_clear(err);
+      err = NULL;
     }
-  else if (err)
-    return svn_error_trace(err);
 
-  return svn_error_trace(svn_wc_context_destroy(wc_ctx));
+  return svn_error_compose_create(err, svn_wc_context_destroy(wc_ctx));
 }
 
 svn_error_t *
@@ -2386,11 +2385,13 @@ svn_wc_prop_get(const svn_string_t **val
   err = svn_wc_prop_get2(value, wc_ctx, local_abspath, name, pool, pool);
 
   if (err && err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
-    svn_error_clear(err);
-  else
-    SVN_ERR(err);
+    {
+      *value = NULL;
+      svn_error_clear(err);
+      err = NULL;
+    }
 
-  return svn_error_trace(svn_wc_context_destroy(wc_ctx));
+  return svn_error_compose_create(err, svn_wc_context_destroy(wc_ctx));
 }
 
 /* baton for conflict_func_1to2_wrapper */
@@ -2414,7 +2415,7 @@ conflict_func_1to2_wrapper(svn_wc_confli
                                                         scratch_pool);
 
   return svn_error_trace(btn->inner_func(result, cd, btn->inner_baton,
-                                          result_pool));
+                                         result_pool));
 }
 
 svn_error_t *
@@ -2630,10 +2631,15 @@ svn_wc_get_status_editor4(const svn_delt
       swb->anchor_relpath = NULL;
     }
 
+  /* Before subversion 1.7 status always handled depth as sticky. 1.7 made
+     the output of svn status by default match the result of what would be
+     updated by a similar svn update. (Following the documentation) */
+
   SVN_ERR(svn_wc_get_status_editor5(editor, edit_baton, set_locks_baton,
                                     edit_revision, wc_ctx, anchor_abspath,
                                     target, depth, get_all,
                                     no_ignore,
+                                    (depth != svn_depth_unknown) /*as_sticky*/,
                                     FALSE /* server_performs_filtering */,
                                     ignore_patterns,
                                     status4_wrapper_func, swb,

Modified: subversion/branches/svn-bisect/subversion/libsvn_wc/diff_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_wc/diff_editor.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_wc/diff_editor.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_wc/diff_editor.c Wed Jul 20 13:06:00 2011
@@ -481,12 +481,7 @@ get_empty_file(struct edit_baton *b,
 static const char *
 get_prop_mimetype(apr_hash_t *props)
 {
-  const svn_string_t *mimetype_val;
-
-  mimetype_val = apr_hash_get(props,
-                              SVN_PROP_MIME_TYPE,
-                              strlen(SVN_PROP_MIME_TYPE));
-  return (mimetype_val) ? mimetype_val->data : NULL;
+  return svn_prop_get_value(props, SVN_PROP_MIME_TYPE);
 }
 
 

Modified: subversion/branches/svn-bisect/subversion/libsvn_wc/diff_local.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_wc/diff_local.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_wc/diff_local.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_wc/diff_local.c Wed Jul 20 13:06:00 2011
@@ -113,12 +113,7 @@ get_empty_file(struct diff_baton *eb,
 static const char *
 get_prop_mimetype(apr_hash_t *props)
 {
-  const svn_string_t *mimetype_val;
-
-  mimetype_val = apr_hash_get(props,
-                              SVN_PROP_MIME_TYPE,
-                              strlen(SVN_PROP_MIME_TYPE));
-  return (mimetype_val) ? mimetype_val->data : NULL;
+  return svn_prop_get_value(props, SVN_PROP_MIME_TYPE);
 }
 
 

Modified: subversion/branches/svn-bisect/subversion/libsvn_wc/entries.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_wc/entries.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_wc/entries.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_wc/entries.c Wed Jul 20 13:06:00 2011
@@ -637,7 +637,10 @@ read_one_entry(const svn_wc_entry_t **ne
           /* ### scan_addition may need to be updated to avoid returning
              ### status_copied in this case.  */
         }
-      else if (work_status == svn_wc__db_status_copied)
+      /* For backwards-compatiblity purposes we treat moves just like
+       * regular copies. */
+      else if (work_status == svn_wc__db_status_copied ||
+               work_status == svn_wc__db_status_moved_here)
         {
           entry->copied = TRUE;
 
@@ -662,7 +665,8 @@ read_one_entry(const svn_wc_entry_t **ne
           svn_boolean_t is_copied_child;
           svn_boolean_t is_mixed_rev = FALSE;
 
-          SVN_ERR_ASSERT(work_status == svn_wc__db_status_copied);
+          SVN_ERR_ASSERT(work_status == svn_wc__db_status_copied ||
+                         work_status == svn_wc__db_status_moved_here);
 
           /* If this node inherits copyfrom information from an
              ancestor node, then it must be a copied child.  */
@@ -1093,12 +1097,12 @@ read_entries(apr_hash_t **entries,
 
   if (wc_format < SVN_WC__WC_NG_VERSION)
     return svn_error_trace(svn_wc__read_entries_old(entries,
-                                                     wcroot_abspath,
-                                                     result_pool,
-                                                     scratch_pool));
+                                                    wcroot_abspath,
+                                                    result_pool,
+                                                    scratch_pool));
 
   return svn_error_trace(read_entries_new(entries, db, wcroot_abspath,
-                                           result_pool, scratch_pool));
+                                          result_pool, scratch_pool));
 }
 
 
@@ -1538,7 +1542,7 @@ struct write_baton {
    ### time being, we'll need both parameters. */
 static svn_error_t *
 write_entry(struct write_baton **entry_node,
-            struct write_baton *parent_node,
+            const struct write_baton *parent_node,
             svn_wc__db_t *db,
             svn_sqlite__db_t *sdb,
             apr_int64_t wc_id,
@@ -1883,6 +1887,12 @@ write_entry(struct write_baton **entry_n
                   && strcmp(entry->name, SVN_WC_ENTRY_THIS_DIR))
                 {
                   base_node->presence = svn_wc__db_status_incomplete;
+
+                  /* Store the most likely revision in the node to avoid
+                     base nodes without a valid revision. Of course
+                     we remember that the data is still incomplete. */
+                  if (parent_node->base)
+                    base_node->revision = parent_node->base->revision;
                 }
               else if (entry->incomplete)
                 {

Modified: subversion/branches/svn-bisect/subversion/libsvn_wc/info.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_wc/info.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_wc/info.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_wc/info.c Wed Jul 20 13:06:00 2011
@@ -71,7 +71,7 @@ svn_wc_info_dup(const svn_wc_info_t *inf
    metadata of LOCAL_ABSPATH.  Pointer fields are copied by reference, not
    dup'd. */
 static svn_error_t *
-build_info_for_entry(svn_wc__info2_t **info,
+build_info_for_node(svn_wc__info2_t **info,
                      svn_wc__db_t *db,
                      const char *local_abspath,
                      svn_node_kind_t kind,
@@ -186,6 +186,8 @@ build_info_for_entry(svn_wc__info2_t **i
     }
   else if (status == svn_wc__db_status_deleted)
     {
+      const char *work_del_abspath;
+
       SVN_ERR(svn_wc__db_read_pristine_info(NULL, NULL,
                                             &tmpinfo->last_changed_rev,
                                             &tmpinfo->last_changed_date,
@@ -196,51 +198,57 @@ build_info_for_entry(svn_wc__info2_t **i
                                             db, local_abspath,
                                             result_pool, scratch_pool));
 
-      SVN_ERR(svn_wc__internal_get_repos_info(&tmpinfo->repos_root_URL,
-                                              &tmpinfo->repos_UUID,
-                                              db, local_abspath,
-                                              result_pool, scratch_pool));
+      /* And now fetch the url and revision of what will be deleted */
+      SVN_ERR(svn_wc__db_scan_deletion(NULL, NULL,
+                                       &work_del_abspath,
+                                       db, local_abspath,
+                                       scratch_pool, scratch_pool));
+      if (work_del_abspath != NULL)
+        {
+          /* This is a deletion within a copied subtree. Get the copied-from
+           * revision. */
+          const char *added_abspath = svn_dirent_dirname(work_del_abspath,
+                                                         scratch_pool);
 
-      SVN_ERR(svn_wc__db_read_url(&tmpinfo->URL, db, local_abspath,
-                                result_pool, scratch_pool));
+          SVN_ERR(svn_wc__db_scan_addition(NULL, NULL, &repos_relpath,
+                                           &tmpinfo->repos_root_URL,
+                                           &tmpinfo->repos_UUID,
+                                           NULL, NULL, NULL,
+                                           &tmpinfo->rev,
+                                           db, added_abspath,
+                                           result_pool, scratch_pool));
 
-      /* And now fetch the revision of what will be deleted */
-      {
-        const char *work_del_abspath;
-
-        SVN_ERR(svn_wc__db_scan_deletion(NULL, NULL,
-                                         &work_del_abspath,
-                                         db, local_abspath,
-                                         scratch_pool, scratch_pool));
-        if (work_del_abspath != NULL)
-          {
-            /* This is a deletion within a copied subtree. Get the copied-from
-             * revision. */
-            SVN_ERR(svn_wc__db_scan_addition(NULL, NULL, NULL, NULL, NULL,
-                                             NULL, NULL, NULL,
-                                             &tmpinfo->rev,
-                                             db,
-                                             svn_dirent_dirname(
-                                                  work_del_abspath,
-                                                  scratch_pool),
-                                             result_pool, scratch_pool));
-          }
-        else
+          tmpinfo->URL = svn_path_url_add_component2(
+                              tmpinfo->repos_root_URL,
+                              svn_relpath_join(repos_relpath,
+                                    svn_dirent_skip_ancestor(added_abspath,
+                                                             local_abspath),
+                                    scratch_pool),
+                              result_pool);
+        }
+      else
+        {
           SVN_ERR(svn_wc__db_base_get_info(NULL, NULL, &tmpinfo->rev,
-                                           NULL, NULL, NULL, NULL, NULL, NULL,
-                                           NULL, NULL, NULL, NULL, NULL, NULL,
+                                           &repos_relpath,
+                                           &tmpinfo->repos_root_URL,
+                                           &tmpinfo->repos_UUID, NULL, NULL,
+                                           NULL, NULL, NULL, NULL,
+                                           NULL, NULL, NULL,
                                            db, local_abspath,
                                            result_pool, scratch_pool));
-      }
+
+          tmpinfo->URL = svn_path_url_add_component2(tmpinfo->repos_root_URL,
+                                                     repos_relpath,
+                                                     result_pool);
+        }
+
       wc_info->schedule = svn_wc_schedule_delete;
     }
   else if (status == svn_wc__db_status_not_present
            || status == svn_wc__db_status_server_excluded)
     {
-      return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND, NULL,
-                               _("The node '%s' was not found."),
-                               svn_dirent_local_style(local_abspath,
-                                                      scratch_pool));
+      *info = NULL;
+      return SVN_NO_ERROR;
     }
   else
     {
@@ -293,18 +301,24 @@ build_info_for_unversioned(svn_wc__info2
                            apr_pool_t *pool)
 {
   svn_wc__info2_t *tmpinfo = apr_pcalloc(pool, sizeof(*tmpinfo));
-  tmpinfo->wc_info = apr_pcalloc(pool, sizeof (*tmpinfo->wc_info));
+  svn_wc_info_t *wc_info = apr_pcalloc(pool, sizeof (*wc_info));
 
   tmpinfo->URL                  = NULL;
-  tmpinfo->rev                  = SVN_INVALID_REVNUM;
-  tmpinfo->kind                 = svn_node_none;
   tmpinfo->repos_UUID           = NULL;
   tmpinfo->repos_root_URL       = NULL;
+  tmpinfo->rev                  = SVN_INVALID_REVNUM;
+  tmpinfo->kind                 = svn_node_none;
+  tmpinfo->size                 = SVN_INVALID_FILESIZE;
   tmpinfo->last_changed_rev     = SVN_INVALID_REVNUM;
   tmpinfo->last_changed_date    = 0;
   tmpinfo->last_changed_author  = NULL;
   tmpinfo->lock                 = NULL;
-  tmpinfo->size                 = SVN_INVALID_FILESIZE;
+
+  tmpinfo->wc_info = wc_info;
+
+  wc_info->copyfrom_rev = SVN_INVALID_REVNUM;
+  wc_info->depth = svn_depth_unknown;
+  wc_info->recorded_size = SVN_INVALID_FILESIZE;
 
   *info = tmpinfo;
   return SVN_NO_ERROR;
@@ -316,9 +330,12 @@ struct found_entry_baton
   svn_wc__info_receiver2_t receiver;
   void *receiver_baton;
   svn_wc__db_t *db;
+  svn_boolean_t actual_only;
+  svn_boolean_t first;
   /* The set of tree conflicts that have been found but not (yet) visited by
    * the tree walker.  Map of abspath -> svn_wc_conflict_description2_t. */
   apr_hash_t *tree_conflicts;
+  apr_pool_t *pool;
 };
 
 /* Call WALK_BATON->receiver with WALK_BATON->receiver_baton, passing to it
@@ -328,37 +345,52 @@ static svn_error_t *
 info_found_node_callback(const char *local_abspath,
                          svn_node_kind_t kind,
                          void *walk_baton,
-                         apr_pool_t *pool)
+                         apr_pool_t *scratch_pool)
 {
   struct found_entry_baton *fe_baton = walk_baton;
   svn_wc__info2_t *info;
 
-  SVN_ERR(build_info_for_entry(&info, fe_baton->db, local_abspath,
-                               kind, pool, pool));
+  SVN_ERR(build_info_for_node(&info, fe_baton->db, local_abspath,
+                               kind, scratch_pool, scratch_pool));
 
-  SVN_ERR_ASSERT(info != NULL && info->wc_info != NULL);
+  if (info == NULL)
+    {
+      if (!fe_baton->first)
+        return SVN_NO_ERROR; /* not present or server excluded descendant */
+
+      /* If the info root is not found, that is an error */
+      return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND, NULL,
+                               _("The node '%s' was not found."),
+                               svn_dirent_local_style(local_abspath,
+                                                      scratch_pool));
+    }
+
+  fe_baton->first = FALSE;
+
+  SVN_ERR_ASSERT(info->wc_info != NULL);
   SVN_ERR(fe_baton->receiver(fe_baton->receiver_baton, local_abspath,
-                             info, pool));
+                             info, scratch_pool));
 
   /* If this node is a versioned directory, make a note of any tree conflicts
    * on all immediate children.  Some of these may be visited later in this
    * walk, at which point they will be removed from the list, while any that
    * are not visited will remain in the list. */
-  if (kind == svn_node_dir)
+  if (fe_baton->actual_only && kind == svn_node_dir)
     {
       apr_hash_t *conflicts;
       apr_hash_index_t *hi;
 
       SVN_ERR(svn_wc__db_op_read_all_tree_conflicts(
                 &conflicts, fe_baton->db, local_abspath,
-                apr_hash_pool_get(fe_baton->tree_conflicts), pool));
-      for (hi = apr_hash_first(pool, conflicts); hi;
+                fe_baton->pool, scratch_pool));
+      for (hi = apr_hash_first(scratch_pool, conflicts); hi;
            hi = apr_hash_next(hi))
         {
           const char *this_basename = svn__apr_hash_index_key(hi);
 
           apr_hash_set(fe_baton->tree_conflicts,
-                       svn_dirent_join(local_abspath, this_basename, pool),
+                       svn_dirent_join(local_abspath, this_basename,
+                                       fe_baton->pool),
                        APR_HASH_KEY_STRING, svn__apr_hash_index_val(hi));
         }
     }
@@ -396,9 +428,11 @@ svn_error_t *
 svn_wc__get_info(svn_wc_context_t *wc_ctx,
                  const char *local_abspath,
                  svn_depth_t depth,
+                 svn_boolean_t fetch_excluded,
+                 svn_boolean_t fetch_actual_only,
+                 const apr_array_header_t *changelist_filter,
                  svn_wc__info_receiver2_t receiver,
                  void *receiver_baton,
-                 const apr_array_header_t *changelist_filter,
                  svn_cancel_func_t cancel_func,
                  void *cancel_baton,
                  apr_pool_t *scratch_pool)
@@ -412,19 +446,27 @@ svn_wc__get_info(svn_wc_context_t *wc_ct
   fe_baton.receiver = receiver;
   fe_baton.receiver_baton = receiver_baton;
   fe_baton.db = wc_ctx->db;
+  fe_baton.actual_only = fetch_actual_only;
+  fe_baton.first = TRUE;
   fe_baton.tree_conflicts = apr_hash_make(scratch_pool);
+  fe_baton.pool = scratch_pool;
 
-  SVN_ERR(svn_wc__db_op_read_tree_conflict(&root_tree_conflict,
-                                           wc_ctx->db, local_abspath,
-                                           scratch_pool, scratch_pool));
-  if (root_tree_conflict)
+  if (fetch_actual_only)
     {
-      apr_hash_set(fe_baton.tree_conflicts, local_abspath, APR_HASH_KEY_STRING,
-                   root_tree_conflict);
+      SVN_ERR(svn_wc__db_op_read_tree_conflict(&root_tree_conflict,
+                                               wc_ctx->db, local_abspath,
+                                               scratch_pool, scratch_pool));
+      if (root_tree_conflict)
+        {
+          apr_hash_set(fe_baton.tree_conflicts, local_abspath,
+                       APR_HASH_KEY_STRING, root_tree_conflict);
+        }
     }
+  else
+    root_tree_conflict = FALSE;
 
   err = svn_wc__internal_walk_children(wc_ctx->db, local_abspath,
-                                       FALSE /* show_hidden */,
+                                       fetch_excluded,
                                        changelist_filter,
                                        info_found_node_callback,
                                        &fe_baton, depth,
@@ -452,7 +494,7 @@ svn_wc__get_info(svn_wc_context_t *wc_ct
       svn_pool_clear(iterpool);
 
       if (depth_includes(local_abspath, depth, tree_conflict->local_abspath,
-                         tree_conflict->kind, iterpool))
+                         tree_conflict->node_kind, iterpool))
         {
           apr_array_header_t *conflicts = apr_array_make(iterpool,
             1, sizeof(const svn_wc_conflict_description2_t *));

Modified: subversion/branches/svn-bisect/subversion/libsvn_wc/lock.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_wc/lock.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_wc/lock.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_wc/lock.c Wed Jul 20 13:06:00 2011
@@ -786,8 +786,8 @@ svn_wc_adm_open3(svn_wc_adm_access_t **a
     }
 
   return svn_error_trace(open_all(adm_access, path, db, db_provided,
-                                   write_lock, levels_to_lock,
-                                   cancel_func, cancel_baton, pool));
+                                  write_lock, levels_to_lock,
+                                  cancel_func, cancel_baton, pool));
 }
 
 
@@ -1322,9 +1322,9 @@ svn_wc_adm_open_anchor(svn_wc_adm_access
                        apr_pool_t *pool)
 {
   return svn_error_trace(open_anchor(anchor_access, target_access, target,
-                                      NULL, FALSE, path, write_lock,
-                                      levels_to_lock, cancel_func,
-                                      cancel_baton, pool));
+                                     NULL, FALSE, path, write_lock,
+                                     levels_to_lock, cancel_func,
+                                     cancel_baton, pool));
 }
 
 
@@ -1380,7 +1380,7 @@ do_close(svn_wc_adm_access_t *adm_access
     }
 
   return svn_error_trace(close_single(adm_access, preserve_lock,
-                                       scratch_pool));
+                                      scratch_pool));
 }
 
 

Modified: subversion/branches/svn-bisect/subversion/libsvn_wc/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_wc/merge.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_wc/merge.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_wc/merge.c Wed Jul 20 13:06:00 2011
@@ -161,11 +161,10 @@ detranslate_wc_file(const char **detrans
   const char *eol;
   apr_hash_t *keywords;
   svn_boolean_t special;
-  const svn_string_t *mime_value;
-  mime_value = apr_hash_get(mt->actual_props, SVN_PROP_MIME_TYPE,
-                            APR_HASH_KEY_STRING);
+  const char *mime_value = svn_prop_get_value(mt->actual_props,
+                                              SVN_PROP_MIME_TYPE);
 
-  is_binary = (mime_value && svn_mime_type_is_binary(mime_value->data));
+  is_binary = (mime_value && svn_mime_type_is_binary(mime_value));
 
   /* See if we need to do a straight copy:
      - old and new mime-types are binary, or
@@ -1349,11 +1348,10 @@ svn_wc__internal_merge(svn_skel_t **work
     is_binary = svn_mime_type_is_binary(mimeprop->value->data);
   else
     {
-      const svn_string_t *value = apr_hash_get(mt.actual_props,
-                                               SVN_PROP_MIME_TYPE,
-                                               APR_HASH_KEY_STRING);
+      const char *value = svn_prop_get_value(mt.actual_props,
+                                             SVN_PROP_MIME_TYPE);
 
-      is_binary = value && svn_mime_type_is_binary(value->data);
+      is_binary = value && svn_mime_type_is_binary(value);
     }
 
   SVN_ERR(detranslate_wc_file(&detranslated_target_abspath, &mt,

Modified: subversion/branches/svn-bisect/subversion/libsvn_wc/node.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_wc/node.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_wc/node.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_wc/node.c Wed Jul 20 13:06:00 2011
@@ -352,7 +352,7 @@ svn_wc__node_get_url(const char **url,
                      apr_pool_t *scratch_pool)
 {
   return svn_error_trace(svn_wc__db_read_url(url, wc_ctx->db, local_abspath,
-                                              result_pool, scratch_pool));
+                                             result_pool, scratch_pool));
 }
 
 /* ### This is essentially a copy-paste of svn_wc__internal_get_url().
@@ -885,7 +885,7 @@ svn_wc__node_get_base_rev(svn_revnum_t *
                           apr_pool_t *scratch_pool)
 {
   return svn_error_trace(get_base_rev(base_revision, wc_ctx->db,
-                                       local_abspath, scratch_pool));
+                                      local_abspath, scratch_pool));
 }
 
 svn_error_t *
@@ -1035,8 +1035,8 @@ svn_wc__node_get_commit_base_rev(svn_rev
                                  apr_pool_t *scratch_pool)
 {
   return svn_error_trace(svn_wc__internal_get_commit_base_rev(
-                            commit_base_revision, wc_ctx->db, local_abspath,
-                            scratch_pool));
+                           commit_base_revision, wc_ctx->db, local_abspath,
+                           scratch_pool));
 }
 
 svn_error_t *
@@ -1300,17 +1300,18 @@ svn_wc__node_get_lock_tokens_recursive(a
 }
 
 svn_error_t *
-svn_wc__get_absent_subtrees(apr_hash_t **absent_subtrees,
-                            svn_wc_context_t *wc_ctx,
-                            const char *local_abspath,
-                            apr_pool_t *result_pool,
-                            apr_pool_t *scratch_pool)
+svn_wc__get_server_excluded_subtrees(apr_hash_t **server_excluded_subtrees,
+                                     svn_wc_context_t *wc_ctx,
+                                     const char *local_abspath,
+                                     apr_pool_t *result_pool,
+                                     apr_pool_t *scratch_pool)
 {
-  return svn_error_trace(svn_wc__db_get_absent_subtrees(absent_subtrees,
-                                                         wc_ctx->db,
-                                                         local_abspath,
-                                                         result_pool,
-                                                         scratch_pool));
+  return svn_error_trace(
+           svn_wc__db_get_server_excluded_subtrees(server_excluded_subtrees,
+                                                   wc_ctx->db,
+                                                   local_abspath,
+                                                   result_pool,
+                                                   scratch_pool));
 }
 
 svn_error_t *
@@ -1406,7 +1407,7 @@ svn_wc__internal_get_origin(svn_boolean_
                                                          local_abspath),
                                 result_pool);
       }
-    else /* Deleted, excluded, not-present, absent, ... */
+    else /* Deleted, excluded, not-present, server-excluded, ... */
       {
         if (is_copy)
           *is_copy = FALSE;
@@ -1436,9 +1437,9 @@ svn_wc__node_get_origin(svn_boolean_t *i
                         apr_pool_t *scratch_pool)
 {
   return svn_error_trace(svn_wc__internal_get_origin(is_copy, revision,
-                            repos_relpath, repos_root_url, repos_uuid,
-                            wc_ctx->db, local_abspath, scan_deleted,
-                            result_pool, scratch_pool));
+                           repos_relpath, repos_root_url, repos_uuid,
+                           wc_ctx->db, local_abspath, scan_deleted,
+                           result_pool, scratch_pool));
 }
 
 svn_error_t *
@@ -1566,11 +1567,11 @@ svn_wc__node_get_md5_from_sha1(const svn
                                apr_pool_t *scratch_pool)
 {
   return svn_error_trace(svn_wc__db_pristine_get_md5(md5_checksum,
-                                                      wc_ctx->db,
-                                                      wri_abspath,
-                                                      sha1_checksum,
-                                                      result_pool,
-                                                      scratch_pool));
+                                                     wc_ctx->db,
+                                                     wri_abspath,
+                                                     sha1_checksum,
+                                                     result_pool,
+                                                     scratch_pool));
 }
 
 svn_error_t *

Modified: subversion/branches/svn-bisect/subversion/libsvn_wc/props.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_wc/props.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_wc/props.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_wc/props.c Wed Jul 20 13:06:00 2011
@@ -370,17 +370,17 @@ svn_wc_merge_props3(svn_wc_notify_state_
                     apr_pool_t *scratch_pool)
 {
   return svn_error_trace(svn_wc__perform_props_merge(
-                            state,
-                            wc_ctx->db,
-                            local_abspath,
-                            left_version, right_version,
-                            baseprops,
-                            propchanges,
-                            FALSE /* base_merge */,
-                            dry_run,
-                            conflict_func, conflict_baton,
-                            cancel_func, cancel_baton,
-                            scratch_pool));
+                           state,
+                           wc_ctx->db,
+                           local_abspath,
+                           left_version, right_version,
+                           baseprops,
+                           propchanges,
+                           FALSE /* base_merge */,
+                           dry_run,
+                           conflict_func, conflict_baton,
+                           cancel_func, cancel_baton,
+                           scratch_pool));
 }
 
 
@@ -803,7 +803,6 @@ maybe_generate_propconflict(svn_boolean_
                             apr_pool_t *scratch_pool)
 {
   svn_wc_conflict_result_t *result = NULL;
-  svn_string_t *mime_propval = NULL;
   apr_pool_t *filepool = svn_pool_create(scratch_pool);
   svn_wc_conflict_description2_t *cdesc;
   const char *dirpath = svn_dirent_dirname(local_abspath, filepool);
@@ -930,12 +929,10 @@ maybe_generate_propconflict(svn_boolean_
     }
 
   /* Build the rest of the description object: */
-  if (!is_dir && working_props)
-    mime_propval = apr_hash_get(working_props, SVN_PROP_MIME_TYPE,
-                                APR_HASH_KEY_STRING);
-  cdesc->mime_type = mime_propval ? mime_propval->data : NULL;
-  cdesc->is_binary = mime_propval ?
-      svn_mime_type_is_binary(mime_propval->data) : FALSE;
+  cdesc->mime_type = (is_dir ? NULL : svn_prop_get_value(working_props,
+                                                         SVN_PROP_MIME_TYPE));
+  cdesc->is_binary = (cdesc->mime_type
+                      && svn_mime_type_is_binary(cdesc->mime_type));
 
   if (!incoming_old_val && incoming_new_val)
     cdesc->action = svn_wc_conflict_action_add;
@@ -1396,7 +1393,9 @@ apply_single_generic_prop_change(svn_wc_
   if (working_val && new_val
       && svn_string_compare(working_val, new_val))
     {
-       set_prop_merge_state(state, svn_wc_notify_state_merged);
+      /* All values identical is a trivial, non-notifiable merge */
+      if (! old_val || ! svn_string_compare(old_val, new_val))
+        set_prop_merge_state(state, svn_wc_notify_state_merged);
     }
   /* If working_val is the same as old_val... */
   else if (working_val && old_val
@@ -1766,8 +1765,8 @@ wcprop_set(svn_wc__db_t *db,
 
   apr_hash_set(prophash, name, APR_HASH_KEY_STRING, value);
   return svn_error_trace(svn_wc__db_base_set_dav_cache(db, local_abspath,
-                                                        prophash,
-                                                        scratch_pool));
+                                                       prophash,
+                                                       scratch_pool));
 }
 
 
@@ -1785,7 +1784,7 @@ svn_wc__get_actual_props(apr_hash_t **pr
      ### should not have any ACTUAL props.  */
 
   return svn_error_trace(svn_wc__db_read_props(props, db, local_abspath,
-                                                result_pool, scratch_pool));
+                                               result_pool, scratch_pool));
 }
 
 
@@ -1797,10 +1796,10 @@ svn_wc_prop_list2(apr_hash_t **props,
                   apr_pool_t *scratch_pool)
 {
   return svn_error_trace(svn_wc__get_actual_props(props,
-                                                   wc_ctx->db,
-                                                   local_abspath,
-                                                   result_pool,
-                                                   scratch_pool));
+                                                  wc_ctx->db,
+                                                  local_abspath,
+                                                  result_pool,
+                                                  scratch_pool));
 }
 
 struct propname_filter_baton_t {
@@ -1965,10 +1964,10 @@ svn_wc_get_pristine_props(apr_hash_t **p
                           apr_pool_t *scratch_pool)
 {
   return svn_error_trace(svn_wc__get_pristine_props(props,
-                                                     wc_ctx->db,
-                                                     local_abspath,
-                                                     result_pool,
-                                                     scratch_pool));
+                                                    wc_ctx->db,
+                                                    local_abspath,
+                                                    result_pool,
+                                                    scratch_pool));
 }
 
 
@@ -2435,7 +2434,7 @@ svn_wc_prop_set4(svn_wc_context_t *wc_ct
     {
       SVN_ERR_ASSERT(depth == svn_depth_empty);
       return svn_error_trace(wcprop_set(wc_ctx->db, local_abspath,
-                                         name, value, scratch_pool));
+                                        name, value, scratch_pool));
     }
 
   /* We have to do this little DIR_ABSPATH dance for backwards compat.

Modified: subversion/branches/svn-bisect/subversion/libsvn_wc/questions.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_wc/questions.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_wc/questions.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_wc/questions.c Wed Jul 20 13:06:00 2011
@@ -335,12 +335,22 @@ svn_wc__internal_file_modified_p(svn_boo
                                    scratch_pool, scratch_pool));
 
   /* Check all bytes, and verify checksum if requested. */
-  SVN_ERR(compare_and_verify(modified_p, db,
+  {
+    svn_error_t *err;
+    err = compare_and_verify(modified_p, db,
                              local_abspath, dirent->filesize,
                              pristine_stream, pristine_size,
                              has_props, props_mod,
                              exact_comparison,
-                             scratch_pool));
+                             scratch_pool);
+
+    /* At this point we already opened the pristine file, so we know that
+       the access denied applies to the working copy path */
+    if (err && APR_STATUS_IS_EACCES(err->apr_err))
+      return svn_error_create(SVN_ERR_WC_PATH_ACCESS_DENIED, err, NULL);
+    else
+      SVN_ERR(err);
+  }
 
   if (!*modified_p)
     {
@@ -496,11 +506,11 @@ svn_wc_conflicted_p3(svn_boolean_t *text
                      apr_pool_t *scratch_pool)
 {
   return svn_error_trace(svn_wc__internal_conflicted_p(text_conflicted_p,
-                                                        prop_conflicted_p,
-                                                        tree_conflicted_p,
-                                                        wc_ctx->db,
-                                                        local_abspath,
-                                                        scratch_pool));
+                                                       prop_conflicted_p,
+                                                       tree_conflicted_p,
+                                                       wc_ctx->db,
+                                                       local_abspath,
+                                                       scratch_pool));
 }
 
 svn_error_t *
@@ -512,11 +522,11 @@ svn_wc__min_max_revisions(svn_revnum_t *
                           apr_pool_t *scratch_pool)
 {
   return svn_error_trace(svn_wc__db_min_max_revisions(min_revision,
-                                                       max_revision,
-                                                       wc_ctx->db,
-                                                       local_abspath,
-                                                       committed,
-                                                       scratch_pool));
+                                                      max_revision,
+                                                      wc_ctx->db,
+                                                      local_abspath,
+                                                      committed,
+                                                      scratch_pool));
 }
 
 
@@ -527,9 +537,9 @@ svn_wc__is_sparse_checkout(svn_boolean_t
                            apr_pool_t *scratch_pool)
 {
   return svn_error_trace(svn_wc__db_is_sparse_checkout(is_sparse_checkout,
-                                                        wc_ctx->db,
-                                                        local_abspath,
-                                                        scratch_pool));
+                                                       wc_ctx->db,
+                                                       local_abspath,
+                                                       scratch_pool));
 }
 
 
@@ -541,10 +551,10 @@ svn_wc__has_switched_subtrees(svn_boolea
                               apr_pool_t *scratch_pool)
 {
   return svn_error_trace(svn_wc__db_has_switched_subtrees(is_switched,
-                                                           wc_ctx->db,
-                                                           local_abspath,
-                                                           trail_url,
-                                                           scratch_pool));
+                                                          wc_ctx->db,
+                                                          local_abspath,
+                                                          trail_url,
+                                                          scratch_pool));
 }
 
 
@@ -557,9 +567,9 @@ svn_wc__has_local_mods(svn_boolean_t *is
                        apr_pool_t *scratch_pool)
 {
   return svn_error_trace(svn_wc__db_has_local_mods(is_modified,
-                                                    wc_ctx->db,
-                                                    local_abspath,
-                                                    cancel_func,
-                                                    cancel_baton,
-                                                    scratch_pool));
+                                                   wc_ctx->db,
+                                                   local_abspath,
+                                                   cancel_func,
+                                                   cancel_baton,
+                                                   scratch_pool));
 }

Modified: subversion/branches/svn-bisect/subversion/libsvn_wc/relocate.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_wc/relocate.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_wc/relocate.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_wc/relocate.c Wed Jul 20 13:06:00 2011
@@ -165,6 +165,6 @@ svn_wc_relocate4(svn_wc_context_t *wc_ct
                     scratch_pool));
 
   return svn_error_trace(svn_wc__db_global_relocate(wc_ctx->db, local_abspath,
-                                                     new_repos_root,
-                                                     scratch_pool));
+                                                    new_repos_root,
+                                                    scratch_pool));
 }



Mime
View raw message