You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2015/03/23 16:27:33 UTC

svn commit: r1668667 [2/3] - in /subversion/branches/move-tracking-2: ./ subversion/ subversion/bindings/javahl/native/ subversion/bindings/swig/include/ subversion/bindings/swig/perl/native/ subversion/include/ subversion/include/private/ subversion/l...

Modified: subversion/branches/move-tracking-2/subversion/libsvn_wc/conflicts.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_wc/conflicts.c?rev=1668667&r1=1668666&r2=1668667&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_wc/conflicts.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_wc/conflicts.c Mon Mar 23 15:27:31 2015
@@ -1142,6 +1142,7 @@ static svn_error_t *
 generate_propconflict(svn_boolean_t *conflict_remains,
                       svn_wc__db_t *db,
                       const char *local_abspath,
+                      svn_node_kind_t kind,
                       svn_wc_operation_t operation,
                       const svn_wc_conflict_version_t *left_version,
                       const svn_wc_conflict_version_t *right_version,
@@ -1159,24 +1160,11 @@ generate_propconflict(svn_boolean_t *con
   svn_wc_conflict_result_t *result = NULL;
   svn_wc_conflict_description2_t *cdesc;
   const char *dirpath = svn_dirent_dirname(local_abspath, scratch_pool);
-  svn_node_kind_t kind;
   const svn_string_t *new_value = NULL;
 
-  SVN_ERR(svn_wc__db_read_kind(&kind, db, local_abspath,
-                               FALSE /* allow_missing */,
-                               FALSE /* show_deleted */,
-                               FALSE /* show_hidden */,
-                               scratch_pool));
-
-  if (kind == svn_node_none)
-    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));
-
   cdesc = svn_wc_conflict_description_create_prop2(
                 local_abspath,
-                (kind == svn_node_dir) ? svn_node_dir : svn_node_file,
+                kind,
                 propname, scratch_pool);
 
   cdesc->operation = operation;
@@ -1681,7 +1669,13 @@ build_text_conflict_resolve_items(svn_sk
         SVN_ERR_ASSERT(choice == svn_wc_conflict_choose_postpone);
     }
 
-  SVN_ERR_ASSERT(install_from_abspath != NULL);
+  if (install_from_abspath == NULL)
+    return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL,
+                             _("Conflict on '%s' could not be resolved "
+                               "because the chosen version of the file "
+                               "is not available."),
+                             svn_dirent_local_style(local_abspath,
+                                                    scratch_pool));
 
   /* ### It would be nice if we could somehow pass RECORD_FILEINFO
          as true in some easy cases. */
@@ -1739,7 +1733,6 @@ read_text_conflict_desc(svn_wc_conflict_
                         svn_wc__db_t *db,
                         const char *local_abspath,
                         const svn_skel_t *conflict_skel,
-                        svn_boolean_t is_binary,
                         const char *mime_type,
                         svn_wc_operation_t operation,
                         const svn_wc_conflict_version_t *left_version,
@@ -1748,8 +1741,8 @@ read_text_conflict_desc(svn_wc_conflict_
                         apr_pool_t *scratch_pool)
 {
   *desc = svn_wc_conflict_description_create_text2(local_abspath, result_pool);
-  (*desc)->is_binary = is_binary;
   (*desc)->mime_type = mime_type;
+  (*desc)->is_binary = mime_type ? svn_mime_type_is_binary(mime_type) : FALSE;
   (*desc)->operation = operation;
   (*desc)->src_left_version = left_version;
   (*desc)->src_right_version = right_version;
@@ -1839,6 +1832,7 @@ resolve_tree_conflict_on_node(svn_boolea
 svn_error_t *
 svn_wc__conflict_invoke_resolver(svn_wc__db_t *db,
                                  const char *local_abspath,
+                                 svn_node_kind_t kind,
                                  const svn_skel_t *conflict_skel,
                                  const apr_array_header_t *merge_options,
                                  svn_wc_conflict_resolver_func2_t resolver_func,
@@ -1915,7 +1909,7 @@ svn_wc__conflict_invoke_resolver(svn_wc_
             SVN_ERR(cancel_func(cancel_baton));
 
           SVN_ERR(generate_propconflict(&conflict_remains,
-                                        db, local_abspath,
+                                        db, local_abspath, kind,
                                         operation,
                                         left_version,
                                         right_version,
@@ -1960,7 +1954,7 @@ svn_wc__conflict_invoke_resolver(svn_wc_
                                     scratch_pool, scratch_pool));
 
       SVN_ERR(read_text_conflict_desc(&desc,
-                                      db, local_abspath, conflict_skel, FALSE,
+                                      db, local_abspath, conflict_skel,
                                       svn_prop_get_value(props,
                                                          SVN_PROP_MIME_TYPE),
                                       operation, left_version, right_version,
@@ -2066,7 +2060,7 @@ read_prop_conflict_descs(apr_array_heade
                          apr_pool_t *result_pool,
                          apr_pool_t *scratch_pool)
 {
-  const char *prop_reject_file;
+  const char *prop_reject_abspath;
   apr_hash_t *base_props;
   apr_hash_t *my_props;
   apr_hash_t *their_old_props;
@@ -2074,8 +2068,16 @@ read_prop_conflict_descs(apr_array_heade
   apr_hash_t *conflicted_props;
   apr_hash_index_t *hi;
   apr_pool_t *iterpool;
+  svn_boolean_t prop_conflicted;
 
-  SVN_ERR(svn_wc__conflict_read_prop_conflict(&prop_reject_file,
+  SVN_ERR(svn_wc__conflict_read_info(&operation, NULL, NULL, &prop_conflicted,
+                                     NULL, db, local_abspath, conflict_skel,
+                                     scratch_pool, scratch_pool));
+
+  if (!prop_conflicted)
+    return SVN_NO_ERROR;
+
+  SVN_ERR(svn_wc__conflict_read_prop_conflict(&prop_reject_abspath,
                                               &my_props,
                                               &their_old_props,
                                               &their_props,
@@ -2084,7 +2086,9 @@ read_prop_conflict_descs(apr_array_heade
                                               conflict_skel,
                                               scratch_pool, scratch_pool));
 
-  if ((! create_tempfiles) || apr_hash_count(conflicted_props) == 0)
+  prop_reject_abspath = apr_pstrdup(result_pool, prop_reject_abspath);
+
+  if (apr_hash_count(conflicted_props) == 0)
     {
       /* Legacy prop conflict with only a .reject file. */
       svn_wc_conflict_description2_t *desc;
@@ -2095,7 +2099,7 @@ read_prop_conflict_descs(apr_array_heade
 
       /* ### For property conflicts, cd2 stores prop_reject_abspath in
        * ### their_abspath, and stores theirs_abspath in merged_file. */
-      desc->prop_reject_abspath = apr_pstrdup(result_pool, prop_reject_file);
+      desc->prop_reject_abspath = prop_reject_abspath; /* in result_pool */
       desc->their_abspath = desc->prop_reject_abspath;
 
       desc->operation = operation;
@@ -2107,8 +2111,11 @@ read_prop_conflict_descs(apr_array_heade
       return SVN_NO_ERROR;
     }
 
-  SVN_ERR(svn_wc__db_read_pristine_props(&base_props, db, local_abspath,
-                                         result_pool, scratch_pool));
+  if (operation == svn_wc_operation_merge)
+    SVN_ERR(svn_wc__db_read_pristine_props(&base_props, db, local_abspath,
+                                           result_pool, scratch_pool));
+  else
+    base_props = NULL;
   iterpool = svn_pool_create(scratch_pool);
   for (hi = apr_hash_first(scratch_pool, conflicted_props);
        hi;
@@ -2155,22 +2162,26 @@ read_prop_conflict_descs(apr_array_heade
 
       /* ### For property conflicts, cd2 stores prop_reject_abspath in
        * ### their_abspath, and stores theirs_abspath in merged_file. */
-      desc->prop_reject_abspath = apr_pstrdup(result_pool, prop_reject_file);
+      desc->prop_reject_abspath = prop_reject_abspath; /* in result_pool */
       desc->their_abspath = desc->prop_reject_abspath;
 
-      desc->prop_value_base = svn_hash_gets(base_props, propname);
+      desc->prop_value_base = base_props ? svn_hash_gets(base_props, propname)
+                                         : desc->prop_value_incoming_old;
 
       if (my_value)
         {
           svn_stream_t *s;
           apr_size_t len;
 
-          SVN_ERR(svn_stream_open_unique(&s, &desc->my_abspath, NULL,
-                                         svn_io_file_del_on_pool_cleanup,
-                                         result_pool, iterpool));
-          len = my_value->len;
-          SVN_ERR(svn_stream_write(s, my_value->data, &len));
-          SVN_ERR(svn_stream_close(s));
+          if (create_tempfiles)
+            {
+              SVN_ERR(svn_stream_open_unique(&s, &desc->my_abspath, NULL,
+                                             svn_io_file_del_on_pool_cleanup,
+                                             result_pool, iterpool));
+              len = my_value->len;
+              SVN_ERR(svn_stream_write(s, my_value->data, &len));
+              SVN_ERR(svn_stream_close(s));
+            }
 
           desc->prop_value_working = svn_string_dup(my_value, result_pool);
         }
@@ -2182,12 +2193,15 @@ read_prop_conflict_descs(apr_array_heade
 
           /* ### For property conflicts, cd2 stores prop_reject_abspath in
            * ### their_abspath, and stores theirs_abspath in merged_file. */
-          SVN_ERR(svn_stream_open_unique(&s, &desc->merged_file, NULL,
-                                         svn_io_file_del_on_pool_cleanup,
-                                         result_pool, iterpool));
-          len = their_value->len;
-          SVN_ERR(svn_stream_write(s, their_value->data, &len));
-          SVN_ERR(svn_stream_close(s));
+          if (create_tempfiles)
+            {
+              SVN_ERR(svn_stream_open_unique(&s, &desc->merged_file, NULL,
+                                             svn_io_file_del_on_pool_cleanup,
+                                             result_pool, iterpool));
+              len = their_value->len;
+              SVN_ERR(svn_stream_write(s, their_value->data, &len));
+              SVN_ERR(svn_stream_close(s));
+            }
 
           desc->prop_value_incoming_new = svn_string_dup(their_value, result_pool);
         }
@@ -2197,12 +2211,15 @@ read_prop_conflict_descs(apr_array_heade
           svn_stream_t *s;
           apr_size_t len;
 
-          SVN_ERR(svn_stream_open_unique(&s, &desc->base_abspath, NULL,
-                                         svn_io_file_del_on_pool_cleanup,
-                                         result_pool, iterpool));
-          len = old_value->len;
-          SVN_ERR(svn_stream_write(s, old_value->data, &len));
-          SVN_ERR(svn_stream_close(s));
+          if (create_tempfiles)
+            {
+              SVN_ERR(svn_stream_open_unique(&s, &desc->base_abspath, NULL,
+                                             svn_io_file_del_on_pool_cleanup,
+                                             result_pool, iterpool));
+              len = old_value->len;
+              SVN_ERR(svn_stream_write(s, old_value->data, &len));
+              SVN_ERR(svn_stream_close(s));
+            }
 
           desc->prop_value_incoming_old = svn_string_dup(old_value, result_pool);
         }
@@ -2216,13 +2233,15 @@ read_prop_conflict_descs(apr_array_heade
 
 svn_error_t *
 svn_wc__read_conflicts(const apr_array_header_t **conflicts,
+                       svn_skel_t **conflict_skel,
                        svn_wc__db_t *db,
                        const char *local_abspath,
                        svn_boolean_t create_tempfiles,
+                       svn_boolean_t only_tree_conflict,
                        apr_pool_t *result_pool,
                        apr_pool_t *scratch_pool)
 {
-  svn_skel_t *conflict_skel;
+  svn_skel_t *the_conflict_skel;
   apr_array_header_t *cflcts;
   svn_boolean_t prop_conflicted;
   svn_boolean_t text_conflicted;
@@ -2232,12 +2251,19 @@ svn_wc__read_conflicts(const apr_array_h
   const svn_wc_conflict_version_t *left_version = NULL;
   const svn_wc_conflict_version_t *right_version = NULL;
   svn_node_kind_t node_kind;
+  apr_hash_t *props;
 
-  SVN_ERR(svn_wc__db_read_conflict(&conflict_skel, &node_kind,
+  if (!conflict_skel)
+    conflict_skel = &the_conflict_skel;
+
+  SVN_ERR(svn_wc__db_read_conflict(conflict_skel, &node_kind, &props,
                                    db, local_abspath,
-                                   scratch_pool, scratch_pool));
+                                   (conflict_skel == &the_conflict_skel)
+                                        ? scratch_pool
+                                        : result_pool,
+                                   scratch_pool));
 
-  if (!conflict_skel)
+  if (!*conflict_skel)
     {
       /* Some callers expect not NULL */
       *conflicts = apr_array_make(result_pool, 0,
@@ -2247,7 +2273,7 @@ svn_wc__read_conflicts(const apr_array_h
 
   SVN_ERR(svn_wc__conflict_read_info(&operation, &locations, &text_conflicted,
                                      &prop_conflicted, &tree_conflicted,
-                                     db, local_abspath, conflict_skel,
+                                     db, local_abspath, *conflict_skel,
                                      result_pool, scratch_pool));
 
   cflcts = apr_array_make(result_pool, 4,
@@ -2258,22 +2284,23 @@ svn_wc__read_conflicts(const apr_array_h
   if (locations && locations->nelts > 1)
     right_version = APR_ARRAY_IDX(locations, 1, const svn_wc_conflict_version_t *);
 
-  if (prop_conflicted)
+  if (prop_conflicted && !only_tree_conflict)
     {
       SVN_ERR(read_prop_conflict_descs(cflcts,
-                                       db, local_abspath, conflict_skel,
+                                       db, local_abspath, *conflict_skel,
                                        create_tempfiles, node_kind,
                                        operation, left_version, right_version,
                                        result_pool, scratch_pool));
     }
 
-  if (text_conflicted)
+  if (text_conflicted && !only_tree_conflict)
     {
       svn_wc_conflict_description2_t *desc;
 
       SVN_ERR(read_text_conflict_desc(&desc,
-                                      db, local_abspath, conflict_skel,
-                                      FALSE /*is_binary*/, NULL /*mime_type*/,
+                                      db, local_abspath, *conflict_skel,
+                                      svn_prop_get_value(props,
+                                                         SVN_PROP_MIME_TYPE),
                                       operation, left_version, right_version,
                                       result_pool, scratch_pool));
       APR_ARRAY_PUSH(cflcts, svn_wc_conflict_description2_t *) = desc;
@@ -2285,7 +2312,7 @@ svn_wc__read_conflicts(const apr_array_h
 
       SVN_ERR(read_tree_conflict_desc(&desc,
                                       db, local_abspath, node_kind,
-                                      conflict_skel,
+                                      *conflict_skel,
                                       operation, left_version, right_version,
                                       result_pool, scratch_pool));
 
@@ -2656,7 +2683,7 @@ resolve_tree_conflict_on_node(svn_boolea
 
               /* We might now have a moved-away on *this* path, let's
                  try to resolve that directly if that is the case */
-              SVN_ERR(svn_wc__db_read_conflict(&new_conflicts, NULL,
+              SVN_ERR(svn_wc__db_read_conflict(&new_conflicts, NULL, NULL,
                                                db, local_abspath,
                                                scratch_pool, scratch_pool));
 
@@ -2828,7 +2855,8 @@ svn_wc__mark_resolved_text_conflict(svn_
   svn_skel_t *work_items;
   svn_skel_t *conflict;
 
-  SVN_ERR(svn_wc__db_read_conflict(&conflict, NULL, db, local_abspath,
+  SVN_ERR(svn_wc__db_read_conflict(&conflict, NULL, NULL,
+                                   db, local_abspath,
                                    scratch_pool, scratch_pool));
 
   if (!conflict)
@@ -2857,7 +2885,8 @@ svn_wc__mark_resolved_prop_conflicts(svn
   svn_boolean_t ignored_result;
   svn_skel_t *conflicts;
 
-  SVN_ERR(svn_wc__db_read_conflict(&conflicts, NULL, db, local_abspath,
+  SVN_ERR(svn_wc__db_read_conflict(&conflicts, NULL, NULL,
+                                   db, local_abspath,
                                    scratch_pool, scratch_pool));
 
   if (!conflicts)
@@ -2942,10 +2971,10 @@ conflict_status_walker(void *baton,
 
   iterpool = svn_pool_create(scratch_pool);
 
-  SVN_ERR(svn_wc__db_read_conflict(&conflict, NULL, db, local_abspath,
-                                   scratch_pool, scratch_pool));
-
-  SVN_ERR(svn_wc__read_conflicts(&conflicts, db, local_abspath, TRUE,
+  SVN_ERR(svn_wc__read_conflicts(&conflicts, &conflict,
+                                 db, local_abspath,
+                                 (cswb->conflict_func != NULL) /* tmp files */,
+                                 FALSE /* only tree conflicts */,
                                  scratch_pool, iterpool));
 
   for (i = 0; i < conflicts->nelts; i++)

Modified: subversion/branches/move-tracking-2/subversion/libsvn_wc/conflicts.h
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_wc/conflicts.h?rev=1668667&r1=1668666&r2=1668667&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_wc/conflicts.h (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_wc/conflicts.h Mon Mar 23 15:27:31 2015
@@ -419,6 +419,7 @@ svn_wc__conflict_create_markers(svn_skel
 svn_error_t *
 svn_wc__conflict_invoke_resolver(svn_wc__db_t *db,
                                  const char *local_abspath,
+                                 svn_node_kind_t kind,
                                  const svn_skel_t *conflict_skel,
                                  const apr_array_header_t *merge_options,
                                  svn_wc_conflict_resolver_func2_t resolver_func,

Modified: subversion/branches/move-tracking-2/subversion/libsvn_wc/copy.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_wc/copy.c?rev=1668667&r1=1668666&r2=1668667&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_wc/copy.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_wc/copy.c Mon Mar 23 15:27:31 2015
@@ -258,8 +258,9 @@ copy_versioned_file(svn_wc__db_t *db,
           svn_error_t *err;
 
           /* Is there a text conflict at the source path? */
-          SVN_ERR(svn_wc__db_read_conflict(&conflict, NULL, db, src_abspath,
-                                         scratch_pool, scratch_pool));
+          SVN_ERR(svn_wc__db_read_conflict(&conflict, NULL, NULL,
+                                           db, src_abspath,
+                                           scratch_pool, scratch_pool));
 
           err = svn_wc__conflict_read_text_conflict(&conflict_working, NULL, NULL,
                                                     db, src_abspath, conflict,
@@ -945,7 +946,8 @@ remove_node_conflict_markers(svn_wc__db_
 {
   svn_skel_t *conflict;
 
-  SVN_ERR(svn_wc__db_read_conflict(&conflict, NULL, db, src_abspath,
+  SVN_ERR(svn_wc__db_read_conflict(&conflict, NULL, NULL,
+                                   db, src_abspath,
                                    scratch_pool, scratch_pool));
 
   /* Do we have conflict markers that should be removed? */

Modified: subversion/branches/move-tracking-2/subversion/libsvn_wc/delete.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_wc/delete.c?rev=1668667&r1=1668666&r2=1668667&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_wc/delete.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_wc/delete.c Mon Mar 23 15:27:31 2015
@@ -135,7 +135,8 @@ create_delete_wq_items(svn_skel_t **work
       const apr_array_header_t *markers;
       int i;
 
-      SVN_ERR(svn_wc__db_read_conflict(&conflict, NULL, db, local_abspath,
+      SVN_ERR(svn_wc__db_read_conflict(&conflict, NULL, NULL,
+                                       db, local_abspath,
                                        scratch_pool, scratch_pool));
 
       SVN_ERR(svn_wc__conflict_read_markers(&markers, db, local_abspath,

Modified: subversion/branches/move-tracking-2/subversion/libsvn_wc/diff_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_wc/diff_editor.c?rev=1668667&r1=1668666&r2=1668667&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_wc/diff_editor.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_wc/diff_editor.c Mon Mar 23 15:27:31 2015
@@ -2404,8 +2404,8 @@ wrap_dir_opened(void **new_dir_baton,
   wc_diff_wrap_baton_t *wb = processor->baton;
   svn_boolean_t tree_conflicted = FALSE;
 
-  assert(left_source || right_source);
-  assert(!copyfrom_source || !right_source);
+  assert(left_source || right_source);      /* Must exist at one point. */
+  assert(!left_source || !copyfrom_source); /* Either existed or added. */
 
   /* Maybe store state and tree_conflicted in baton? */
   if (left_source != NULL)

Modified: subversion/branches/move-tracking-2/subversion/libsvn_wc/entries.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_wc/entries.c?rev=1668667&r1=1668666&r2=1668667&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_wc/entries.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_wc/entries.c Mon Mar 23 15:27:31 2015
@@ -483,9 +483,10 @@ read_one_entry(const svn_wc_entry_t **ne
           child_abspath = svn_dirent_join(dir_abspath, child_name,
                                           scratch_pool);
 
-          SVN_ERR(svn_wc__read_conflicts(&child_conflicts,
+          SVN_ERR(svn_wc__read_conflicts(&child_conflicts, NULL,
                                          db, child_abspath,
                                          FALSE /* create tempfiles */,
+                                         TRUE /* tree_conflicts_only */,
                                          scratch_pool, scratch_pool));
 
           for (j = 0; j < child_conflicts->nelts; j++)
@@ -938,7 +939,7 @@ read_one_entry(const svn_wc_entry_t **ne
       svn_skel_t *conflict;
       svn_boolean_t text_conflicted;
       svn_boolean_t prop_conflicted;
-      SVN_ERR(svn_wc__db_read_conflict_internal(&conflict, NULL,
+      SVN_ERR(svn_wc__db_read_conflict_internal(&conflict, NULL, NULL,
                                                 wcroot, entry_relpath,
                                                 scratch_pool, scratch_pool));
 

Modified: subversion/branches/move-tracking-2/subversion/libsvn_wc/info.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_wc/info.c?rev=1668667&r1=1668666&r2=1668667&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_wc/info.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_wc/info.c Mon Mar 23 15:27:31 2015
@@ -283,9 +283,10 @@ build_info_for_node(svn_wc__info2_t **in
                                 local_abspath, result_pool, scratch_pool));
 
   if (conflicted)
-    SVN_ERR(svn_wc__read_conflicts(&wc_info->conflicts, db,
-                                   local_abspath,
-                                   TRUE /* ### create tempfiles */,
+    SVN_ERR(svn_wc__read_conflicts(&wc_info->conflicts, NULL,
+                                   db, local_abspath,
+                                   FALSE /* create tempfiles */,
+                                   FALSE /* only tree conflicts */,
                                    result_pool, scratch_pool));
   else
     wc_info->conflicts = NULL;
@@ -530,9 +531,10 @@ svn_wc__get_info(svn_wc_context_t *wc_ct
       info->repos_root_URL = repos_root_url;
       info->repos_UUID = repos_uuid;
 
-      SVN_ERR(svn_wc__read_conflicts(&conflicts,
+      SVN_ERR(svn_wc__read_conflicts(&conflicts, NULL,
                                      wc_ctx->db, this_abspath,
-                                     TRUE /* ### create tempfiles */,
+                                     FALSE /* create tempfiles */,
+                                     FALSE /* only tree conflicts */,
                                      iterpool, iterpool));
       if (! conflicts || ! conflicts->nelts)
         continue;

Modified: subversion/branches/move-tracking-2/subversion/libsvn_wc/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_wc/merge.c?rev=1668667&r1=1668666&r2=1668667&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_wc/merge.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_wc/merge.c Mon Mar 23 15:27:31 2015
@@ -1230,6 +1230,7 @@ svn_wc_merge5(enum svn_wc_merge_outcome_
   apr_hash_t *pristine_props = NULL;
   apr_hash_t *old_actual_props;
   apr_hash_t *new_actual_props = NULL;
+  svn_node_kind_t kind;
 
   SVN_ERR_ASSERT(svn_dirent_is_absolute(left_abspath));
   SVN_ERR_ASSERT(svn_dirent_is_absolute(right_abspath));
@@ -1242,7 +1243,6 @@ svn_wc_merge5(enum svn_wc_merge_outcome_
   /* Sanity check:  the merge target must be a file under revision control */
   {
     svn_wc__db_status_t status;
-    svn_node_kind_t kind;
     svn_boolean_t had_props;
     svn_boolean_t props_mod;
     svn_boolean_t conflicted;
@@ -1405,7 +1405,7 @@ svn_wc_merge5(enum svn_wc_merge_outcome_
           svn_boolean_t text_conflicted, prop_conflicted;
 
           SVN_ERR(svn_wc__conflict_invoke_resolver(
-                    wc_ctx->db, target_abspath,
+                    wc_ctx->db, target_abspath, kind,
                     conflict_skel, merge_options,
                     conflict_func, conflict_baton,
                     cancel_func, cancel_baton,

Modified: subversion/branches/move-tracking-2/subversion/libsvn_wc/props.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_wc/props.c?rev=1668667&r1=1668666&r2=1668667&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_wc/props.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_wc/props.c Mon Mar 23 15:27:31 2015
@@ -327,7 +327,8 @@ svn_wc_merge_props3(svn_wc_notify_state_
     {
       svn_boolean_t prop_conflicted;
 
-      SVN_ERR(svn_wc__conflict_invoke_resolver(db, local_abspath, conflict_skel,
+      SVN_ERR(svn_wc__conflict_invoke_resolver(db, local_abspath, kind,
+                                               conflict_skel,
                                                NULL /* merge_options */,
                                                conflict_func, conflict_baton,
                                                cancel_func, cancel_baton,
@@ -750,7 +751,8 @@ svn_wc__create_prejfile(const char **tmp
       apr_hash_t *conflicted_props;
       svn_skel_t *conflicts;
 
-      SVN_ERR(svn_wc__db_read_conflict(&conflicts, NULL, db, local_abspath,
+      SVN_ERR(svn_wc__db_read_conflict(&conflicts, NULL, NULL,
+                                       db, local_abspath,
                                       scratch_pool, scratch_pool));
 
       SVN_ERR(svn_wc__conflict_read_info(&operation, NULL, NULL, NULL, NULL,

Modified: subversion/branches/move-tracking-2/subversion/libsvn_wc/questions.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_wc/questions.c?rev=1668667&r1=1668666&r2=1668667&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_wc/questions.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_wc/questions.c Mon Mar 23 15:27:31 2015
@@ -369,7 +369,8 @@ internal_conflicted_p(svn_boolean_t *tex
   svn_boolean_t resolved_text = FALSE;
   svn_boolean_t resolved_props = FALSE;
 
-  SVN_ERR(svn_wc__db_read_conflict(&conflicts, NULL, db, local_abspath,
+  SVN_ERR(svn_wc__db_read_conflict(&conflicts, NULL, NULL,
+                                   db, local_abspath,
                                    scratch_pool, scratch_pool));
 
   if (!conflicts)

Modified: subversion/branches/move-tracking-2/subversion/libsvn_wc/tree_conflicts.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_wc/tree_conflicts.c?rev=1668667&r1=1668666&r2=1668667&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_wc/tree_conflicts.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_wc/tree_conflicts.c Mon Mar 23 15:27:31 2015
@@ -485,8 +485,10 @@ svn_wc__get_tree_conflict(const svn_wc_c
   int i;
   SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
 
-  SVN_ERR(svn_wc__read_conflicts(&conflicts,
-                                 wc_ctx->db, local_abspath, FALSE,
+  SVN_ERR(svn_wc__read_conflicts(&conflicts, NULL,
+                                 wc_ctx->db, local_abspath,
+                                 FALSE /* temp files */,
+                                 TRUE /* only tree conflicts */,
                                  scratch_pool, scratch_pool));
 
   if (!conflicts || conflicts->nelts == 0)

Modified: subversion/branches/move-tracking-2/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_wc/update_editor.c?rev=1668667&r1=1668666&r2=1668667&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_wc/update_editor.c Mon Mar 23 15:27:31 2015
@@ -1812,6 +1812,7 @@ delete_entry(const char *path,
     {
       if (eb->conflict_func)
         SVN_ERR(svn_wc__conflict_invoke_resolver(eb->db, local_abspath,
+                                                 kind,
                                                  tree_conflict,
                                                  NULL /* merge_options */,
                                                  eb->conflict_func,
@@ -2815,6 +2816,7 @@ close_directory(void *dir_baton,
 
   if (conflict_skel && eb->conflict_func)
     SVN_ERR(svn_wc__conflict_invoke_resolver(eb->db, db->local_abspath,
+                                             svn_node_dir,
                                              conflict_skel,
                                              NULL /* merge_options */,
                                              eb->conflict_func,
@@ -3000,6 +3002,7 @@ absent_node(const char *path,
       {
         if (eb->conflict_func)
           SVN_ERR(svn_wc__conflict_invoke_resolver(eb->db, local_abspath,
+                                                   kind,
                                                    tree_conflict,
                                                    NULL /* merge_options */,
                                                    eb->conflict_func,
@@ -4539,6 +4542,7 @@ close_file(void *file_baton,
 
   if (conflict_skel && eb->conflict_func)
     SVN_ERR(svn_wc__conflict_invoke_resolver(eb->db, fb->local_abspath,
+                                             svn_node_file,
                                              conflict_skel,
                                              NULL /* merge_options */,
                                              eb->conflict_func,

Modified: subversion/branches/move-tracking-2/subversion/libsvn_wc/wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_wc/wc.h?rev=1668667&r1=1668666&r2=1668667&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_wc/wc.h (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_wc/wc.h Mon Mar 23 15:27:31 2015
@@ -635,9 +635,11 @@ svn_wc__write_check(svn_wc__db_t *db,
  */
 svn_error_t *
 svn_wc__read_conflicts(const apr_array_header_t **conflicts,
+                       svn_skel_t **conflict_skel,
                        svn_wc__db_t *db,
                        const char *local_abspath,
                        svn_boolean_t create_tempfiles,
+                       svn_boolean_t only_tree_conflict,
                        apr_pool_t *result_pool,
                        apr_pool_t *scratch_pool);
 

Modified: subversion/branches/move-tracking-2/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_wc/wc_db.c?rev=1668667&r1=1668666&r2=1668667&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_wc/wc_db.c Mon Mar 23 15:27:31 2015
@@ -6889,7 +6889,7 @@ op_revert_txn(void *baton,
     }
   else
     {
-      SVN_ERR(svn_wc__db_read_conflict_internal(&conflict, NULL, wcroot,
+      SVN_ERR(svn_wc__db_read_conflict_internal(&conflict, NULL, NULL, wcroot,
                                                 local_relpath,
                                                 scratch_pool, scratch_pool));
     }
@@ -13942,6 +13942,7 @@ svn_wc__db_get_conflict_marker_files(apr
 svn_error_t *
 svn_wc__db_read_conflict(svn_skel_t **conflict,
                          svn_node_kind_t *kind,
+                         apr_hash_t **props,
                          svn_wc__db_t *db,
                          const char *local_abspath,
                          apr_pool_t *result_pool,
@@ -13955,7 +13956,7 @@ svn_wc__db_read_conflict(svn_skel_t **co
                               local_abspath, scratch_pool, scratch_pool));
   VERIFY_USABLE_WCROOT(wcroot);
 
-  return svn_error_trace(svn_wc__db_read_conflict_internal(conflict, kind,
+  return svn_error_trace(svn_wc__db_read_conflict_internal(conflict, kind, props,
                                                            wcroot, local_relpath,
                                                            result_pool,
                                                            scratch_pool));
@@ -13964,6 +13965,7 @@ svn_wc__db_read_conflict(svn_skel_t **co
 svn_error_t *
 svn_wc__db_read_conflict_internal(svn_skel_t **conflict,
                                   svn_node_kind_t *kind,
+                                  apr_hash_t **props,
                                   svn_wc__db_wcroot_t *wcroot,
                                   const char *local_relpath,
                                   apr_pool_t *result_pool,
@@ -13974,6 +13976,8 @@ svn_wc__db_read_conflict_internal(svn_sk
 
   if (kind)
     *kind = svn_node_none;
+  if (props)
+    *props = NULL;
 
   /* Check if we have a conflict in ACTUAL */
   SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
@@ -13982,59 +13986,82 @@ svn_wc__db_read_conflict_internal(svn_sk
 
   SVN_ERR(svn_sqlite__step(&have_row, stmt));
 
-  if (!have_row || kind)
+  if (have_row)
     {
-      /* Do this while stmt is still open to avoid closing the sqlite
-         transaction and then reopening. */
-      svn_sqlite__stmt_t *stmt_node;
-      svn_error_t *err;
-      svn_boolean_t have_info = FALSE;
+      apr_size_t cfl_len;
+      const void *cfl_data;
 
-      err = svn_sqlite__get_statement(&stmt_node, wcroot->sdb,
-                                      STMT_SELECT_NODE_INFO);
+      /* svn_skel__parse doesn't copy data, so store in result_pool */
+      cfl_data = svn_sqlite__column_blob(stmt, 2, &cfl_len, result_pool);
 
-      if (err)
-        stmt_node = NULL;
+      if (cfl_data)
+        *conflict = svn_skel__parse(cfl_data, cfl_len, result_pool);
       else
-        err = svn_sqlite__bindf(stmt_node, "is", wcroot->wc_id,
-                                local_relpath);
+        *conflict = NULL;
 
-      if (!err)
-        err = svn_sqlite__step(&have_info, stmt_node);
-
-      if (!err && kind && have_info)
+      if (props)
         {
-          svn_wc__db_status_t status;
-          int op_depth = svn_sqlite__column_int(stmt_node, 0);
-
-          status = svn_sqlite__column_token(stmt_node, 3, presence_map);
+          svn_error_t *err;
 
-          if (op_depth > 0)
-            err = convert_to_working_status(&status, status);
+          err = svn_error_trace(svn_sqlite__column_properties(props, stmt, 1,
+                                                              result_pool,
+                                                              scratch_pool));
 
-          if (!err && (status == svn_wc__db_status_normal
-                       || status == svn_wc__db_status_added
-                       || status == svn_wc__db_status_deleted
-                       || status == svn_wc__db_status_incomplete))
-            {
-              *kind = svn_sqlite__column_token(stmt_node, 4, kind_map);
-            }
+          if (err)
+            return svn_error_compose_create(err, svn_sqlite__reset(stmt));
         }
+    }
+  else
+    *conflict = NULL;
+
+  SVN_ERR(svn_sqlite__reset(stmt));
+
+  if (!have_row || kind || (props && !*props))
+    {
+      svn_error_t *err = NULL;
+      svn_boolean_t have_info = FALSE;
+
+      SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
+                                        STMT_SELECT_NODE_INFO));
 
-      if (stmt_node)
-        err = svn_error_compose_create(err,
-                                       svn_sqlite__reset(stmt_node));
+      SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id,
+                                local_relpath));
+
+      SVN_ERR(svn_sqlite__step(&have_info, stmt));
 
-      if (!have_row || err)
+      if (have_info)
         {
-          SVN_ERR(svn_error_compose_create(err, svn_sqlite__reset(stmt)));
+          if (kind)
+            {
+              svn_wc__db_status_t status;
+              int op_depth = svn_sqlite__column_int(stmt, 0);
+
+              status = svn_sqlite__column_token(stmt, 3, presence_map);
+
+              if (op_depth > 0)
+                err = convert_to_working_status(&status, status);
 
-          if (have_info)
+              if (!err && (status == svn_wc__db_status_normal
+                           || status == svn_wc__db_status_added
+                           || status == svn_wc__db_status_deleted
+                           || status == svn_wc__db_status_incomplete))
+                {
+                  *kind = svn_sqlite__column_token(stmt, 4, kind_map);
+                }
+            }
+
+          /* Need props, and no props in ACTUAL? */
+          if (!err && (props && !*props))
             {
-              *conflict = NULL;
-              return SVN_NO_ERROR;
+              err = svn_sqlite__column_properties(props, stmt, 14,
+                                                  result_pool, scratch_pool);
             }
+        }
 
+      SVN_ERR(svn_error_compose_create(err, svn_sqlite__reset(stmt)));
+
+      if (!have_row && !have_info)
+        {
           return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND, NULL,
                                    _("The node '%s' was not found."),
                                    path_for_error_message(wcroot,
@@ -14043,20 +14070,7 @@ svn_wc__db_read_conflict_internal(svn_sk
         }
     }
 
-  {
-    apr_size_t cfl_len;
-    const void *cfl_data;
-
-    /* svn_skel__parse doesn't copy data, so store in result_pool */
-    cfl_data = svn_sqlite__column_blob(stmt, 2, &cfl_len, result_pool);
-
-    if (cfl_data)
-      *conflict = svn_skel__parse(cfl_data, cfl_len, result_pool);
-    else
-      *conflict = NULL;
-
-    return svn_error_trace(svn_sqlite__reset(stmt));
-  }
+  return SVN_NO_ERROR;
 }
 
 

Modified: subversion/branches/move-tracking-2/subversion/libsvn_wc/wc_db.h
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_wc/wc_db.h?rev=1668667&r1=1668666&r2=1668667&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_wc/wc_db.h (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_wc/wc_db.h Mon Mar 23 15:27:31 2015
@@ -2364,7 +2364,9 @@ svn_wc__db_get_conflict_marker_files(apr
 
 /* Read the conflict information recorded on LOCAL_ABSPATH in *CONFLICT,
    an editable conflict skel. If kind is not NULL, also read the node kind
-   in *KIND. (SHOW_HIDDEN: false, SHOW_DELETED: true)
+   in *KIND. (SHOW_HIDDEN: false, SHOW_DELETED: true). If props is not NULL
+   read the actual properties in this value if they exist. (Set to NULL in case
+   the node is deleted, etc.)
 
    If the node exists, but does not have a conflict set *CONFLICT to NULL,
    otherwise return a SVN_ERR_WC_PATH_NOT_FOUND error.
@@ -2374,6 +2376,7 @@ svn_wc__db_get_conflict_marker_files(apr
 svn_error_t *
 svn_wc__db_read_conflict(svn_skel_t **conflict,
                          svn_node_kind_t *kind,
+                         apr_hash_t **props,
                          svn_wc__db_t *db,
                          const char *local_abspath,
                          apr_pool_t *result_pool,

Modified: subversion/branches/move-tracking-2/subversion/libsvn_wc/wc_db_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_wc/wc_db_private.h?rev=1668667&r1=1668666&r2=1668667&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_wc/wc_db_private.h (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_wc/wc_db_private.h Mon Mar 23 15:27:31 2015
@@ -355,6 +355,7 @@ svn_wc__db_fetch_repos_info(const char *
 svn_error_t *
 svn_wc__db_read_conflict_internal(svn_skel_t **conflict,
                                   svn_node_kind_t *kind,
+                                  apr_hash_t **props,
                                   svn_wc__db_wcroot_t *wcroot,
                                   const char *local_relpath,
                                   apr_pool_t *result_pool,

Modified: subversion/branches/move-tracking-2/subversion/libsvn_wc/wc_db_update_move.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_wc/wc_db_update_move.c?rev=1668667&r1=1668666&r2=1668667&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_wc/wc_db_update_move.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_wc/wc_db_update_move.c Mon Mar 23 15:27:31 2015
@@ -377,7 +377,7 @@ create_tree_conflict(svn_skel_t **confli
                                            child_relpath, scratch_pool);
     }
 
-  err = svn_wc__db_read_conflict_internal(&conflict, NULL,
+  err = svn_wc__db_read_conflict_internal(&conflict, NULL, NULL,
                                           wcroot, local_relpath,
                                           result_pool, scratch_pool);
   if (err && err->apr_err != SVN_ERR_WC_PATH_NOT_FOUND)
@@ -2095,8 +2095,8 @@ bump_moved_layer(svn_boolean_t *recurse,
       return SVN_NO_ERROR;
     }
 
-  SVN_ERR(svn_wc__db_read_conflict_internal(&conflict, NULL, wcroot,
-                                            src_root_relpath,
+  SVN_ERR(svn_wc__db_read_conflict_internal(&conflict, NULL, NULL,
+                                            wcroot, src_root_relpath,
                                             scratch_pool, scratch_pool));
 
   /* ### TODO: check this is the right sort of tree-conflict? */
@@ -2450,7 +2450,7 @@ svn_wc__db_op_raise_moved_away(svn_wc__d
   VERIFY_USABLE_WCROOT(wcroot);
 
   SVN_WC__DB_WITH_TXN4(
-    svn_wc__db_read_conflict_internal(&conflict, NULL,
+    svn_wc__db_read_conflict_internal(&conflict, NULL, NULL,
                                       wcroot, local_relpath,
                                       scratch_pool, scratch_pool),
     fetch_conflict_details(&move_src_op_depth,

Modified: subversion/branches/move-tracking-2/subversion/libsvn_wc/workqueue.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_wc/workqueue.c?rev=1668667&r1=1668666&r2=1668667&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_wc/workqueue.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_wc/workqueue.c Mon Mar 23 15:27:31 2015
@@ -1106,7 +1106,7 @@ run_prej_install(work_item_baton_t *wqb,
   SVN_ERR(svn_wc__db_from_relpath(&local_abspath, db, wri_abspath,
                                   local_relpath, scratch_pool, scratch_pool));
 
-  SVN_ERR(svn_wc__db_read_conflict(&conflicts, NULL, db, local_abspath,
+  SVN_ERR(svn_wc__db_read_conflict(&conflicts, NULL, NULL, db, local_abspath,
                                    scratch_pool, scratch_pool));
 
   SVN_ERR(svn_wc__conflict_read_prop_conflict(&prejfile_abspath,
@@ -1286,7 +1286,7 @@ run_set_text_conflict_markers(work_item_
     /* Check if we should combine with a property conflict... */
     svn_skel_t *conflicts;
 
-    SVN_ERR(svn_wc__db_read_conflict(&conflicts, NULL, db, local_abspath,
+    SVN_ERR(svn_wc__db_read_conflict(&conflicts, NULL, NULL, db, local_abspath,
                                      scratch_pool, scratch_pool));
 
     if (! conflicts)
@@ -1352,7 +1352,8 @@ run_set_property_conflict_marker(work_it
     svn_skel_t *conflicts;
     apr_hash_t *prop_names;
 
-    SVN_ERR(svn_wc__db_read_conflict(&conflicts, NULL, db, local_abspath,
+    SVN_ERR(svn_wc__db_read_conflict(&conflicts, NULL, NULL,
+                                     db, local_abspath,
                                      scratch_pool, scratch_pool));
 
     if (! conflicts)

Modified: subversion/branches/move-tracking-2/subversion/mod_dav_svn/deadprops.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/mod_dav_svn/deadprops.c?rev=1668667&r1=1668666&r2=1668667&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/mod_dav_svn/deadprops.c (original)
+++ subversion/branches/move-tracking-2/subversion/mod_dav_svn/deadprops.c Mon Mar 23 15:27:31 2015
@@ -163,6 +163,23 @@ get_value(dav_db *db, const dav_prop_nam
 }
 
 
+static svn_error_t *
+change_txn_prop(svn_fs_txn_t *txn,
+                const char *propname,
+                const svn_string_t *value,
+                apr_pool_t *scratch_pool)
+{
+  if (strcmp(propname, SVN_PROP_REVISION_AUTHOR) == 0)
+    return svn_error_create(SVN_ERR_RA_DAV_REQUEST_FAILED, NULL,
+                            "Attempted to modify 'svn:author' property "
+                            "on a transaction");
+
+  SVN_ERR(svn_repos_fs_change_txn_prop(txn, propname, value, scratch_pool));
+
+  return SVN_NO_ERROR;
+}
+
+
 static dav_error *
 save_value(dav_db *db, const dav_prop_name *name,
            const svn_string_t *const *old_value_p,
@@ -213,9 +230,8 @@ save_value(dav_db *db, const dav_prop_na
     {
       if (resource->working)
         {
-          serr = svn_repos_fs_change_txn_prop(resource->info->root.txn,
-                                              propname, value,
-                                              subpool);
+          serr = change_txn_prop(resource->info->root.txn, propname,
+                                 value, subpool);
         }
       else
         {
@@ -254,8 +270,8 @@ save_value(dav_db *db, const dav_prop_na
     }
   else if (resource->info->restype == DAV_SVN_RESTYPE_TXN_COLLECTION)
     {
-      serr = svn_repos_fs_change_txn_prop(resource->info->root.txn,
-                                          propname, value, subpool);
+      serr = change_txn_prop(resource->info->root.txn, propname,
+                             value, subpool);
     }
   else
     {
@@ -560,8 +576,8 @@ db_remove(dav_db *db, const dav_prop_nam
   /* Working Baseline or Working (Version) Resource */
   if (db->resource->baselined)
     if (db->resource->working)
-      serr = svn_repos_fs_change_txn_prop(db->resource->info->root.txn,
-                                          propname, NULL, subpool);
+      serr = change_txn_prop(db->resource->info->root.txn, propname,
+                             NULL, subpool);
     else
       /* ### VIOLATING deltaV: you can't proppatch a baseline, it's
          not a working resource!  But this is how we currently

Modified: subversion/branches/move-tracking-2/subversion/mod_dav_svn/reports/get-location-segments.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/mod_dav_svn/reports/get-location-segments.c?rev=1668667&r1=1668666&r2=1668667&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/mod_dav_svn/reports/get-location-segments.c (original)
+++ subversion/branches/move-tracking-2/subversion/mod_dav_svn/reports/get-location-segments.c Mon Mar 23 15:27:31 2015
@@ -177,16 +177,37 @@ dav_svn__get_location_segments_report(co
   if (! abs_path)
     return dav_svn__new_error_svn(resource->pool, HTTP_BAD_REQUEST, 0,
                                   "Not all parameters passed");
-  if (SVN_IS_VALID_REVNUM(start_rev)
-      && SVN_IS_VALID_REVNUM(end_rev)
-      && (end_rev > start_rev))
-    return dav_svn__new_error_svn(resource->pool, HTTP_BAD_REQUEST, 0,
+
+  /* No START_REV or PEG_REVISION?  We'll use HEAD. */
+  if (!SVN_IS_VALID_REVNUM(start_rev) || !SVN_IS_VALID_REVNUM(peg_revision))
+    {
+      svn_revnum_t youngest;
+
+      serr = svn_fs_youngest_rev(&youngest, resource->info->repos->fs,
+                                 resource->pool);
+      if (serr != NULL)
+        return dav_svn__convert_err(serr, HTTP_INTERNAL_SERVER_ERROR,
+                                    "Could not determine youngest revision",
+                                    resource->pool);
+
+      if (!SVN_IS_VALID_REVNUM(start_rev))
+        start_rev = youngest;
+      if (!SVN_IS_VALID_REVNUM(peg_revision))
+        peg_revision = youngest;
+    }
+
+  /* No END_REV?  We'll use 0. */
+  if (!SVN_IS_VALID_REVNUM(end_rev))
+    end_rev = 0;
+
+  if (end_rev > start_rev)
+    return dav_svn__new_error_svn(resource->pool, HTTP_BAD_REQUEST,
+                                  SVN_ERR_FS_NO_SUCH_REVISION,
                                   "End revision must not be younger than "
                                   "start revision");
-  if (SVN_IS_VALID_REVNUM(peg_revision)
-      && SVN_IS_VALID_REVNUM(start_rev)
-      && (start_rev > peg_revision))
-    return dav_svn__new_error_svn(resource->pool, HTTP_BAD_REQUEST, 0,
+  if (start_rev > peg_revision)
+    return dav_svn__new_error_svn(resource->pool, HTTP_BAD_REQUEST,
+                                  SVN_ERR_FS_NO_SUCH_REVISION,
                                   "Start revision must not be younger than "
                                   "peg revision");
 

Modified: subversion/branches/move-tracking-2/subversion/mod_dav_svn/reports/log.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/mod_dav_svn/reports/log.c?rev=1668667&r1=1668666&r2=1668667&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/mod_dav_svn/reports/log.c (original)
+++ subversion/branches/move-tracking-2/subversion/mod_dav_svn/reports/log.c Mon Mar 23 15:27:31 2015
@@ -65,6 +65,10 @@ struct log_receiver_baton
 
   /* whether the client can handle encoded binary property values */
   svn_boolean_t encode_binary_props;
+
+  /* Helper variables to force early bucket brigade flushes */
+  int result_count;
+  int next_forced_flush;
 };
 
 
@@ -282,6 +286,41 @@ log_receiver(void *baton,
   SVN_ERR(dav_svn__brigade_puts(lrb->bb, lrb->output,
                                 "</S:log-item>" DEBUG_CR));
 
+  /* In general APR will flush the brigade every 8000 bytes through the filter
+     stack, but log items may not be generated that fast, especially in
+     combination with authz and busy servers. We now explictly flush after
+     log-item 4, 16, 64 and 256 to produce a few results fast.
+
+     This introduces 4 full flushes of our brigade and the installed output
+     filters at growing intervals and then falls back to the standard
+     buffering of 8000 bytes + whatever buffers are added in output filters. */
+  lrb->result_count++;
+  if (lrb->result_count == lrb->next_forced_flush)
+    {
+      apr_status_t apr_err;
+
+      /* This flush is similar to that in dav_svn__final_flush_or_error().
+
+         Compared to using ap_filter_flush(), which we use in other place
+         this adds a flush frame before flushing the brigade, to make output
+         filters perform a flush as well */
+
+      /* No brigade empty check. We want output filters to flush anyway */
+      apr_err = ap_fflush(lrb->output, lrb->bb);
+      if (apr_err)
+        return svn_error_create(apr_err, NULL, NULL);
+
+      /* Check for an aborted connection, just like our brigade write
+         helper functions, since the brigade functions don't appear to
+         be return useful errors when the connection is dropped. */
+      if (lrb->output->c->aborted)
+        return svn_error_create(SVN_ERR_APMOD_CONNECTION_ABORTED,
+                                NULL, NULL);
+
+      if (lrb->result_count < 256)
+        lrb->next_forced_flush = lrb->next_forced_flush * 4;
+    }
+
   return SVN_NO_ERROR;
 }
 
@@ -427,6 +466,9 @@ dav_svn__log_report(const dav_resource *
   lrb.stack_depth = 0;
   /* lrb.requested_custom_revprops set above */
 
+  lrb.result_count = 0;
+  lrb.next_forced_flush = 4;
+
   /* Our svn_log_entry_receiver_t sends the <S:log-report> header in
      a lazy fashion.  Before writing the first log message, it assures
      that the header has already been sent (checking the needs_header

Modified: subversion/branches/move-tracking-2/subversion/svn/conflict-callbacks.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/svn/conflict-callbacks.c?rev=1668667&r1=1668666&r2=1668667&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/svn/conflict-callbacks.c (original)
+++ subversion/branches/move-tracking-2/subversion/svn/conflict-callbacks.c Mon Mar 23 15:27:31 2015
@@ -422,7 +422,7 @@ static const resolver_option_t text_conf
                                   svn_wc_conflict_choose_undefined },
   { "df", N_("show diff"),        N_("show all changes made to merged file"),
                                   svn_wc_conflict_choose_undefined },
-  { "r",  N_("mark resolved"),   N_("accept merged version of file"),
+  { "r",  N_("mark resolved"),   N_("accept merged version of file  [working]"),
                                   svn_wc_conflict_choose_merged },
   { "",   "",                     "", svn_wc_conflict_choose_unspecified },
   { "dc", N_("display conflict"), N_("show all conflicts "
@@ -461,6 +461,28 @@ static const resolver_option_t text_conf
   { NULL }
 };
 
+/* Resolver options for a binary file conflict. */
+static const resolver_option_t binary_conflict_options[] =
+{
+  /* Translators: keep long_desc below 70 characters (wrap with a left
+     margin of 9 spaces if needed); don't translate the words within square
+     brackets. */
+  { "r",  N_("mark resolved"),   N_("accept the working copy version of file "
+                                    " [working]"),
+                                  svn_wc_conflict_choose_merged },
+  { "tf", N_("their version"),    N_("accept the incoming version of file "
+                                     " [theirs-full]"),
+                                  svn_wc_conflict_choose_theirs_full },
+  { "p",  N_("postpone"),         N_("mark the conflict to be resolved later "
+                                     " [postpone]"),
+                                  svn_wc_conflict_choose_postpone },
+  { "q",  N_("quit resolution"),  N_("postpone all remaining conflicts"),
+                                  svn_wc_conflict_choose_postpone },
+  { "s",  N_("show all options"), N_("show this list (also 'h', '?')"),
+                                  svn_wc_conflict_choose_undefined },
+  { NULL }
+};
+
 /* Resolver options for a property conflict */
 static const resolver_option_t prop_conflict_options[] =
 {
@@ -686,14 +708,22 @@ handle_text_conflict(svn_wc_conflict_res
   /* Have they done *something* (edit, look at diff, etc) to
      give them a rational basis for choosing (r)esolved? */
   svn_boolean_t knows_something = FALSE;
-
+  const char *local_relpath;
+  
   SVN_ERR_ASSERT(desc->kind == svn_wc_conflict_kind_text);
 
-  SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool,
-                              _("Conflict discovered in file '%s'.\n"),
-                              svn_cl__local_style_skip_ancestor(
-                                b->path_prefix, desc->local_abspath,
-                                scratch_pool)));
+  local_relpath = svn_cl__local_style_skip_ancestor(b->path_prefix,
+                                                    desc->local_abspath,
+                                                    scratch_pool);;
+
+  if (desc->is_binary)
+    SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool,
+                                _("Conflict discovered in binary file '%s'.\n"),
+                                local_relpath));
+  else
+    SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool,
+                                _("Conflict discovered in file '%s'.\n"),
+                                local_relpath));
 
   /* ### TODO This whole feature availability check is grossly outdated.
      DIFF_ALLOWED needs either to be redefined or to go away.
@@ -703,18 +733,29 @@ handle_text_conflict(svn_wc_conflict_res
      markers to the user (this is the typical 3-way merge
      scenario), or if no base is available, we can show a diff
      between mine and theirs. */
-  if ((desc->merged_file && desc->base_abspath)
-      || (!desc->base_abspath && desc->my_abspath && desc->their_abspath))
+  if (!desc->is_binary &&
+      ((desc->merged_file && desc->base_abspath)
+      || (!desc->base_abspath && desc->my_abspath && desc->their_abspath)))
     diff_allowed = TRUE;
 
   while (TRUE)
     {
-      const char *options[ARRAY_LEN(text_conflict_options)];
-      const char **next_option = options;
+      const resolver_option_t *conflict_options = desc->is_binary
+                                                    ? binary_conflict_options
+                                                    : text_conflict_options;
+      const char **options;
+      const char **next_option;
       const resolver_option_t *opt;
 
       svn_pool_clear(iterpool);
 
+      options = apr_palloc(iterpool,
+                           sizeof (const char *) *
+                           (desc->is_binary
+                              ? ARRAY_LEN(binary_conflict_options)
+                              : ARRAY_LEN(text_conflict_options)));
+      next_option = options;
+
       *next_option++ = "p";
       if (diff_allowed)
         {
@@ -731,24 +772,26 @@ handle_text_conflict(svn_wc_conflict_res
           if (knows_something)
             *next_option++ = "r";
 
-          if (! desc->is_binary)
-            {
-              *next_option++ = "mc";
-              *next_option++ = "tc";
-            }
+          *next_option++ = "mc";
+          *next_option++ = "tc";
         }
       else
         {
           if (knows_something)
             *next_option++ = "r";
-          *next_option++ = "mf";
+
+          /* The 'mine-full' option selects the ".mine" file so only offer
+           * it if that file exists. It does not exist for binary files,
+           * for example (questionable historical behaviour since 1.0). */
+          if (desc->my_abspath)
+            *next_option++ = "mf";
+
           *next_option++ = "tf";
         }
       *next_option++ = "s";
       *next_option++ = NULL;
 
-      SVN_ERR(prompt_user(&opt, text_conflict_options, options, b->pb,
-                          iterpool));
+      SVN_ERR(prompt_user(&opt, conflict_options, options, b->pb, iterpool));
       if (! opt)
         continue;
 
@@ -762,7 +805,7 @@ handle_text_conflict(svn_wc_conflict_res
       else if (strcmp(opt->code, "s") == 0)
         {
           SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool, "\n%s\n",
-                                      help_string(text_conflict_options,
+                                      help_string(conflict_options,
                                                   iterpool)));
         }
       else if (strcmp(opt->code, "dc") == 0)

Modified: subversion/branches/move-tracking-2/subversion/svn/diff-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/svn/diff-cmd.c?rev=1668667&r1=1668666&r2=1668667&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/svn/diff-cmd.c (original)
+++ subversion/branches/move-tracking-2/subversion/svn/diff-cmd.c Mon Mar 23 15:27:31 2015
@@ -82,6 +82,7 @@ kind_to_word(svn_client_diff_summarize_k
 struct summarize_baton_t
 {
   const char *anchor;
+  svn_boolean_t ignore_properties;
 };
 
 /* Print summary information about a given change as XML, implements the
@@ -98,6 +99,11 @@ summarize_xml(const svn_client_diff_summ
    * baton, and appending the target's relative path. */
   const char *path = b->anchor;
   svn_stringbuf_t *sb = svn_stringbuf_create_empty(pool);
+  const char *prop_change;
+
+  if (b->ignore_properties &&
+      summary->summarize_kind == svn_client_diff_summarize_kind_normal)
+    return SVN_NO_ERROR;
 
   /* Tack on the target path, so we can differentiate between different parts
    * of the output when we're given multiple targets. */
@@ -114,10 +120,14 @@ summarize_xml(const svn_client_diff_summ
       path = svn_dirent_local_style(path, pool);
     }
 
+  prop_change = summary->prop_changed ? "modified" : "none";
+  if (b->ignore_properties)
+    prop_change = "none";
+
   svn_xml_make_open_tag(&sb, pool, svn_xml_protect_pcdata, "path",
                         "kind", svn_cl__node_kind_str_xml(summary->node_kind),
                         "item", kind_to_word(summary->summarize_kind),
-                        "props", summary->prop_changed ? "modified" : "none",
+                        "props",  prop_change,
                         SVN_VA_NULL);
 
   svn_xml_escape_cdata_cstring(&sb, path, pool);
@@ -135,6 +145,11 @@ summarize_regular(const svn_client_diff_
 {
   struct summarize_baton_t *b = baton;
   const char *path = b->anchor;
+  char prop_change;
+
+  if (b->ignore_properties &&
+      summary->summarize_kind == svn_client_diff_summarize_kind_normal)
+    return SVN_NO_ERROR;
 
   /* Tack on the target path, so we can differentiate between different parts
    * of the output when we're given multiple targets. */
@@ -155,11 +170,13 @@ summarize_regular(const svn_client_diff_
    *       thus the blank spaces where information that is not relevant to
    *       a diff summary would go. */
 
-  SVN_ERR(svn_cmdline_printf(pool,
-                             "%c%c      %s\n",
+  prop_change = summary->prop_changed ? 'M' : ' ';
+  if (b->ignore_properties)
+    prop_change = ' ';
+
+  SVN_ERR(svn_cmdline_printf(pool, "%c%c      %s\n",
                              kind_to_char(summary->summarize_kind),
-                             summary->prop_changed ? 'M' : ' ',
-                             path));
+                             prop_change, path));
 
   return svn_cmdline_fflush(stdout);
 }
@@ -216,6 +233,43 @@ svn_cl__diff(apr_getopt_t *os,
       svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "paths", SVN_VA_NULL);
       SVN_ERR(svn_cl__error_checked_fputs(sb->data, stdout));
     }
+  if (opt_state->diff.summarize)
+    {
+      if (opt_state->diff.use_git_diff_format)
+        return svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                                 _("'%s' not valid with '--summarize' option"),
+                                 "--git");
+      if (opt_state->diff.patch_compatible)
+        return svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                                 _("'%s' not valid with '--summarize' option"),
+                                 "--patch-compatible");
+      if (opt_state->diff.show_copies_as_adds)
+        return svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                                 _("'%s' not valid with '--summarize' option"),
+                                 "--show-copies-as-adds");
+      if (opt_state->diff.internal_diff)
+        return svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                                 _("'%s' not valid with '--summarize' option"),
+                                 "--internal-diff");
+      if (opt_state->diff.diff_cmd)
+        return svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                                 _("'%s' not valid with '--summarize' option"),
+                                 "--diff-cmd");
+      if (opt_state->diff.no_diff_added)
+        return svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                                 _("'%s' not valid with '--summarize' option"),
+                                 "--no-diff-added");
+      if (opt_state->diff.no_diff_deleted)
+        return svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                                 _("'%s' not valid with '--summarize' option"),
+                                 "--no-diff-deleted");
+      if (opt_state->force)
+        return svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                                 _("'%s' not valid with '--summarize' option"),
+                                 "--force");
+      /* Not handling ignore-properties, and properties-only as there should
+         be a patch adding support for these being applied soon */
+    }
 
   SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
                                                       opt_state->targets,
@@ -395,6 +449,7 @@ svn_cl__diff(apr_getopt_t *os,
           if (opt_state->diff.summarize)
             {
               summarize_baton.anchor = target1;
+              summarize_baton.ignore_properties = ignore_properties;
 
               SVN_ERR(svn_client_diff_summarize2(
                                 target1,
@@ -447,6 +502,7 @@ svn_cl__diff(apr_getopt_t *os,
           if (opt_state->diff.summarize)
             {
               summarize_baton.anchor = truepath;
+              summarize_baton.ignore_properties = ignore_properties;
               SVN_ERR(svn_client_diff_summarize_peg2(
                                 truepath,
                                 &peg_revision,

Modified: subversion/branches/move-tracking-2/subversion/svnrdump/load_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/svnrdump/load_editor.c?rev=1668667&r1=1668666&r2=1668667&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/svnrdump/load_editor.c (original)
+++ subversion/branches/move-tracking-2/subversion/svnrdump/load_editor.c Mon Mar 23 15:27:31 2015
@@ -392,7 +392,7 @@ new_revision_record(void **revision_bato
 {
   struct revision_baton *rb;
   struct parse_baton *pb;
-  apr_hash_index_t *hi;
+  const char *rev_str;
   svn_revnum_t head_rev;
 
   rb = apr_pcalloc(pool, sizeof(*rb));
@@ -401,14 +401,9 @@ new_revision_record(void **revision_bato
   rb->pb = pb;
   rb->db = NULL;
 
-  for (hi = apr_hash_first(pool, headers); hi; hi = apr_hash_next(hi))
-    {
-      const char *hname = apr_hash_this_key(hi);
-      const char *hval = apr_hash_this_val(hi);
-
-      if (strcmp(hname, SVN_REPOS_DUMPFILE_REVISION_NUMBER) == 0)
-        rb->rev = atoi(hval);
-    }
+  rev_str = svn_hash_gets(headers, SVN_REPOS_DUMPFILE_REVISION_NUMBER);
+  if (rev_str)
+    rb->rev = SVN_STR_TO_REV(rev_str);
 
   SVN_ERR(svn_ra_get_latest_revnum(pb->session, &head_rev, pool));
 
@@ -499,6 +494,7 @@ new_node_record(void **node_baton,
   const struct svn_delta_editor_t *commit_editor = rb->pb->commit_editor;
   void *commit_edit_baton = rb->pb->commit_edit_baton;
   struct node_baton *nb;
+  svn_revnum_t head_rev_before_commit = rb->rev - rb->rev_offset - 1;
   apr_hash_index_t *hi;
   void *child_baton;
   const char *nb_dirname;
@@ -537,7 +533,7 @@ new_node_record(void **node_baton,
       rb->pb->commit_edit_baton = commit_edit_baton;
 
       SVN_ERR(commit_editor->open_root(commit_edit_baton,
-                                       rb->rev - rb->rev_offset - 1,
+                                       head_rev_before_commit,
                                        rb->pool, &child_baton));
 
       /* child_baton corresponds to the root directory baton here */
@@ -570,7 +566,7 @@ new_node_record(void **node_baton,
       if (strcmp(hname, SVN_REPOS_DUMPFILE_TEXT_DELTA_BASE_MD5) == 0)
         nb->base_checksum = apr_pstrdup(rb->pool, hval);
       if (strcmp(hname, SVN_REPOS_DUMPFILE_NODE_COPYFROM_REV) == 0)
-        nb->copyfrom_rev = atoi(hval);
+        nb->copyfrom_rev = SVN_STR_TO_REV(hval);
       if (strcmp(hname, SVN_REPOS_DUMPFILE_NODE_COPYFROM_PATH) == 0)
         nb->copyfrom_path = apr_pstrdup(rb->pool, hval);
     }
@@ -617,7 +613,7 @@ new_node_record(void **node_baton,
                              rb->pool);
           SVN_ERR(commit_editor->open_directory(relpath_compose,
                                                 rb->db->baton,
-                                                rb->rev - rb->rev_offset - 1,
+                                                head_rev_before_commit,
                                                 rb->pool, &child_baton));
           push_directory(rb, child_baton, relpath_compose, TRUE /*is_added*/,
                          NULL, SVN_INVALID_REVNUM);
@@ -660,7 +656,7 @@ new_node_record(void **node_baton,
     case svn_node_action_delete:
     case svn_node_action_replace:
       SVN_ERR(commit_editor->delete_entry(nb->path,
-                                          rb->rev - rb->rev_offset - 1,
+                                          head_rev_before_commit,
                                           rb->db->baton, rb->pool));
       if (nb->action == svn_node_action_delete)
         break;
@@ -698,7 +694,7 @@ new_node_record(void **node_baton,
           break;
         default:
           SVN_ERR(commit_editor->open_directory(nb->path, rb->db->baton,
-                                                rb->rev - rb->rev_offset - 1,
+                                                head_rev_before_commit,
                                                 rb->pool, &child_baton));
           push_directory(rb, child_baton, nb->path, FALSE /*is_added*/,
                          NULL, SVN_INVALID_REVNUM);
@@ -988,6 +984,7 @@ close_revision(void *baton)
     }
   else
     {
+      svn_revnum_t head_rev_before_commit = rb->rev - rb->rev_offset - 1;
       void *child_baton;
 
       /* Legitimate revision with no node information */
@@ -997,7 +994,7 @@ close_revision(void *baton)
                                         NULL, FALSE, rb->pool));
 
       SVN_ERR(commit_editor->open_root(commit_edit_baton,
-                                       rb->rev - rb->rev_offset - 1,
+                                       head_rev_before_commit,
                                        rb->pool, &child_baton));
 
       SVN_ERR(commit_editor->close_directory(child_baton, rb->pool));

Modified: subversion/branches/move-tracking-2/subversion/svnserve/serve.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/svnserve/serve.c?rev=1668667&r1=1668666&r2=1668667&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/svnserve/serve.c (original)
+++ subversion/branches/move-tracking-2/subversion/svnserve/serve.c Mon Mar 23 15:27:31 2015
@@ -2506,32 +2506,56 @@ static svn_error_t *get_location_segment
   abs_path = svn_fspath__join(b->repository->fs_path->data, relative_path,
                               pool);
 
-  if (SVN_IS_VALID_REVNUM(start_rev)
-      && SVN_IS_VALID_REVNUM(end_rev)
-      && (end_rev > start_rev))
+  SVN_ERR(trivial_auth_request(conn, pool, b));
+  SVN_ERR(log_command(baton, conn, pool, "%s",
+                      svn_log__get_location_segments(abs_path, peg_revision,
+                                                     start_rev, end_rev,
+                                                     pool)));
+
+  /* No START_REV or PEG_REVISION?  We'll use HEAD. */
+  if (!SVN_IS_VALID_REVNUM(start_rev) || !SVN_IS_VALID_REVNUM(peg_revision))
+    {
+      svn_revnum_t youngest;
+
+      err = svn_fs_youngest_rev(&youngest, b->repository->fs, pool);
+
+      if (err)
+        {
+          err = svn_error_compose_create(
+                    svn_ra_svn__write_word(conn, pool, "done"),
+                    err);
+
+          return log_fail_and_flush(err, b, conn, pool);
+        }
+
+      if (!SVN_IS_VALID_REVNUM(start_rev))
+        start_rev = youngest;
+      if (!SVN_IS_VALID_REVNUM(peg_revision))
+        peg_revision = youngest;
+    }
+
+  /* No END_REV?  We'll use 0. */
+  if (!SVN_IS_VALID_REVNUM(end_rev))
+    end_rev = 0;
+
+  if (end_rev > start_rev)
     {
-      err = svn_error_createf(SVN_ERR_INCORRECT_PARAMS, NULL,
+      err = svn_ra_svn__write_word(conn, pool, "done");
+      err = svn_error_createf(SVN_ERR_FS_NO_SUCH_REVISION, err,
                               "Get-location-segments end revision must not be "
                               "younger than start revision");
       return log_fail_and_flush(err, b, conn, pool);
     }
 
-  if (SVN_IS_VALID_REVNUM(peg_revision)
-      && SVN_IS_VALID_REVNUM(start_rev)
-      && (start_rev > peg_revision))
+  if (start_rev > peg_revision)
     {
-      err = svn_error_createf(SVN_ERR_INCORRECT_PARAMS, NULL,
+      err = svn_ra_svn__write_word(conn, pool, "done");
+      err = svn_error_createf(SVN_ERR_FS_NO_SUCH_REVISION, err,
                               "Get-location-segments start revision must not "
                               "be younger than peg revision");
       return log_fail_and_flush(err, b, conn, pool);
     }
 
-  SVN_ERR(trivial_auth_request(conn, pool, b));
-  SVN_ERR(log_command(baton, conn, pool, "%s",
-                      svn_log__get_location_segments(abs_path, peg_revision,
-                                                     start_rev, end_rev,
-                                                     pool)));
-
   /* All the parameters are fine - let's perform the query against the
    * repository. */
 
@@ -2546,8 +2570,7 @@ static svn_error_t *get_location_segment
   write_err = svn_ra_svn__write_word(conn, pool, "done");
   if (write_err)
     {
-      svn_error_clear(err);
-      return write_err;
+      return svn_error_compose_create(write_err, err);
     }
   SVN_CMD_ERR(err);
 

Modified: subversion/branches/move-tracking-2/subversion/tests/cmdline/diff_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/tests/cmdline/diff_tests.py?rev=1668667&r1=1668666&r2=1668667&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/tests/cmdline/diff_tests.py (original)
+++ subversion/branches/move-tracking-2/subversion/tests/cmdline/diff_tests.py Mon Mar 23 15:27:31 2015
@@ -4826,6 +4826,48 @@ def diff_local_copied_dir(sbox):
     os.chdir(was_cwd)
 
 
+def diff_summarize_ignore_properties(sbox):
+  "diff --summarize --ignore-properties"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  # Make a property change and a content change to 'iota'
+  sbox.simple_propset('svn:eol-style', 'native', 'iota')
+  svntest.main.file_append(sbox.ospath('iota'), 'new text')
+
+  # Make a property change to 'A/mu'
+  sbox.simple_propset('svn:eol-style', 'native', 'A/mu')
+
+  # Make a content change to 'A/B/lambda'
+  svntest.main.file_append(sbox.ospath('A/B/lambda'), 'new text')
+
+  # Add a file.
+  svntest.main.file_write(sbox.ospath('new'), 'new text')
+  sbox.simple_add('new')
+
+  # Delete a file
+  sbox.simple_rm('A/B/E/alpha')
+
+  expected_diff = svntest.wc.State(wc_dir, {
+    'iota': Item(status='M '),
+    'new': Item(status='A '),
+    'A/B/lambda': Item(status='M '),
+    'A/B/E/alpha': Item(status='D '),
+    })
+  svntest.actions.run_and_verify_diff_summarize(expected_diff,
+                                                '--ignore-properties',
+                                                sbox.wc_dir)
+
+  # test with --xml, too
+  paths = ['iota', 'new', 'A/B/lambda', 'A/B/E/alpha']
+  items = ['modified', 'added', 'modified', 'deleted' ]
+  kinds = ['file','file', 'file', 'file']
+  props = ['none', 'none', 'none', 'none']
+  svntest.actions.run_and_verify_diff_summarize_xml(
+    [], wc_dir, paths, items, props, kinds, wc_dir, '--ignore-properties')
+
+
 ########################################################################
 #Run the tests
 
@@ -4916,6 +4958,7 @@ test_list = [ None,
               diff_deleted_in_move_against_repos,
               diff_replaced_moved,
               diff_local_copied_dir,
+              diff_summarize_ignore_properties,
               ]
 
 if __name__ == '__main__':

Modified: subversion/branches/move-tracking-2/subversion/tests/libsvn_fs/fs-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/tests/libsvn_fs/fs-test.c?rev=1668667&r1=1668666&r2=1668667&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/tests/libsvn_fs/fs-test.c (original)
+++ subversion/branches/move-tracking-2/subversion/tests/libsvn_fs/fs-test.c Mon Mar 23 15:27:31 2015
@@ -4359,15 +4359,19 @@ check_txn_related(const svn_test_opts_t
      and two transactions, T1 and T2 - yet uncommitted.
 
      A is a file that exists in r1 (A-0) and gets modified in both txns.
-     C is a copy of A1 made in both txns.
+     C is a copy of A-0 made in both txns.
      B is a new node created in both txns
      D is a file that exists in r1 (D-0) and never gets modified.
+     / is the root folder, touched in r0, r1 and both txns (root-0)
+     R is a copy of the root-0 made in both txns.
 
-                 +--A-0--+                  D-0
-                 |       |
-           +-----+       +-----+
-           |     |       |     |
-     B-1   C-T   A-1     A-2   C-1   B-2
+     The edges in the graph connect related noderevs:
+
+                 +--A-0--+                D-0           +-root-0-+
+                 |       |                              |        |
+           +-----+       +-----+                 +------+        +------+
+           |     |       |     |                 |      |        |      |
+     B-1   C-1   A-1     A-2   C-2   B-2         R-1    root-1   root-2 R-2
   */
   /* Revision 1 */
   SVN_ERR(svn_fs_begin_txn(&txn[0], fs, youngest_rev, subpool));
@@ -4385,6 +4389,7 @@ check_txn_related(const svn_test_opts_t
   SVN_ERR(svn_fs_txn_root(&root[1], txn[1], pool));
   SVN_ERR(svn_test__set_file_contents(root[1], "A", "2", pool));
   SVN_ERR(svn_fs_copy(root[0], "A", root[1], "C", pool));
+  SVN_ERR(svn_fs_copy(root[0], "", root[1], "R", pool));
   SVN_ERR(svn_fs_make_file(root[1], "B", pool));
 
   /* Transaction 2 */
@@ -4392,11 +4397,13 @@ check_txn_related(const svn_test_opts_t
   SVN_ERR(svn_fs_txn_root(&root[2], txn[2], pool));
   SVN_ERR(svn_test__set_file_contents(root[2], "A", "2", pool));
   SVN_ERR(svn_fs_copy(root[0], "A", root[2], "C", pool));
+  SVN_ERR(svn_fs_copy(root[0], "", root[2], "R", pool));
   SVN_ERR(svn_fs_make_file(root[2], "B", pool));
 
   /*** Step II: Exhaustively verify relationship between all nodes in
        existence. */
   {
+    enum { NODE_COUNT = 13 };
     int i, j;
 
     struct path_rev_t
@@ -4406,29 +4413,36 @@ check_txn_related(const svn_test_opts_t
     };
 
     /* Our 16 existing files/revisions. */
-    struct path_rev_t path_revs[8] = {
+    struct path_rev_t path_revs[NODE_COUNT] = {
       { "A", 0 }, { "A", 1 }, { "A", 2 },
       { "B", 1 }, { "B", 2 },
       { "C", 1 }, { "C", 2 },
-      { "D", 0 }
+      { "D", 0 },
+      { "/", 0 }, { "/", 1 }, { "/", 2 },
+      { "R", 1 }, { "R", 2 }
     };
 
-    int related_matrix[8][8] = {
-      /* A-0 ... D-0 across the top here*/
-      { 1, 1, 1, 0, 0, 1, 1, 0 }, /* A-0 */
-      { 1, 1, 1, 0, 0, 1, 1, 0 }, /* A-1 */
-      { 1, 1, 1, 0, 0, 1, 1, 0 }, /* A-2 */
-      { 0, 0, 0, 1, 0, 0, 0, 0 }, /* C-1 */
-      { 0, 0, 0, 0, 1, 0, 0, 0 }, /* C-2 */
-      { 1, 1, 1, 0, 0, 1, 1, 0 }, /* B-1 */
-      { 1, 1, 1, 0, 0, 1, 1, 0 }, /* B-2 */
-      { 0, 0, 0, 0, 0, 0, 0, 1 }  /* D-0 */
+    int related_matrix[NODE_COUNT][NODE_COUNT] = {
+      /* A-0 ... R-2 across the top here*/
+      { 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0 }, /* A-0 */
+      { 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0 }, /* A-1 */
+      { 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0 }, /* A-2 */
+      { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* B-1 */
+      { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 }, /* B-2 */
+      { 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0 }, /* C-1 */
+      { 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0 }, /* C-2 */
+      { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 }, /* D-0 */
+      { 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1 }, /* root-0 */
+      { 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1 }, /* root-1 */
+      { 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1 }, /* root-2 */
+      { 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1 }, /* R-1 */
+      { 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1 }, /* R-2 */
     };
 
     /* Here's the fun part.  Running the tests. */
-    for (i = 0; i < 8; i++)
+    for (i = 0; i < NODE_COUNT; i++)
       {
-        for (j = 0; j < 8; j++)
+        for (j = 0; j < NODE_COUNT; j++)
           {
             struct path_rev_t pr1 = path_revs[i];
             struct path_rev_t pr2 = path_revs[j];
@@ -4471,7 +4485,7 @@ check_txn_related(const svn_test_opts_t
                                          root[pr2.root], pr2.path, subpool));
             if (i == j)
               {
-                /* Identical note. */
+                /* Identical noderev. */
                 if (!related || relation != svn_fs_node_same)
                   {
                     return svn_error_createf
@@ -4898,7 +4912,7 @@ unordered_txn_dirprops(const svn_test_op
   svn_fs_root_t *txn_root, *txn_root2;
   svn_string_t pval;
   svn_revnum_t new_rev, not_rev;
-  svn_boolean_t is_bdb = strcmp(opts->fs_type, "bdb") == 0;
+  svn_boolean_t is_bdb = strcmp(opts->fs_type, SVN_FS_TYPE_BDB) == 0;
 
   /* This is a regression test for issue #2751. */
 
@@ -5530,7 +5544,7 @@ dir_prop_merge(const svn_test_opts_t *op
   svn_revnum_t head_rev;
   svn_fs_root_t *root;
   svn_fs_txn_t *txn, *mid_txn, *top_txn, *sub_txn, *c_txn;
-  svn_boolean_t is_bdb = strcmp(opts->fs_type, "bdb") == 0;
+  svn_boolean_t is_bdb = strcmp(opts->fs_type, SVN_FS_TYPE_BDB) == 0;
 
   /* Create test repository. */
   SVN_ERR(svn_test__create_fs(&fs, "test-fs-dir_prop-merge", opts, pool));
@@ -5795,7 +5809,7 @@ test_paths_changed(const svn_test_opts_t
   int i;
 
   /* The "mergeinfo_mod flag will say "unknown" until recently. */
-  if (   strcmp(opts->fs_type, "bdb") != 0
+  if (   strcmp(opts->fs_type, SVN_FS_TYPE_BDB) != 0
       && (!opts->server_minor_version || (opts->server_minor_version >= 9)))
     has_mergeinfo_mod = TRUE;
 
@@ -6379,11 +6393,11 @@ test_print_modules(const svn_test_opts_t
   svn_stringbuf_t *modules = svn_stringbuf_create_empty(pool);
 
   /* Name of the providing module */
-  if (strcmp(opts->fs_type, "fsx") == 0)
+  if (strcmp(opts->fs_type, SVN_FS_TYPE_FSX) == 0)
     module_name = "fs_x";
-  else if (strcmp(opts->fs_type, "fsfs") == 0)
+  else if (strcmp(opts->fs_type, SVN_FS_TYPE_FSFS) == 0)
     module_name = "fs_fs";
-  else if (strcmp(opts->fs_type, "bdb") == 0)
+  else if (strcmp(opts->fs_type, SVN_FS_TYPE_BDB) == 0)
     module_name = "fs_base";
   else
     return svn_error_createf(SVN_ERR_TEST_SKIPPED, NULL,
@@ -6710,7 +6724,7 @@ test_fsfs_config_opts(const svn_test_opt
   const svn_fs_fsfs_info_t *fsfs_info;
 
   /* Bail (with SKIP) on known-untestable scenarios */
-  if (strcmp(opts->fs_type, "fsfs") != 0)
+  if (strcmp(opts->fs_type, SVN_FS_TYPE_FSFS) != 0)
     return svn_error_create(SVN_ERR_TEST_SKIPPED, NULL,
                             "this will test FSFS repositories only");
 
@@ -6816,9 +6830,9 @@ test_modify_txn_being_written(const svn_
   svn_stream_t *bar_contents;
 
   /* Bail (with success) on known-untestable scenarios */
-  if (strcmp(opts->fs_type, SVN_FS_TYPE_FSFS) != 0)
+  if (strcmp(opts->fs_type, SVN_FS_TYPE_BDB) == 0)
     return svn_error_create(SVN_ERR_TEST_SKIPPED, NULL,
-                            "this will test FSFS repositories only");
+                            "this will not test BDB repositories");
 
   /* Create a new repo. */
   SVN_ERR(svn_test__create_fs(&fs, "test-modify-txn-being-written",
@@ -7099,7 +7113,7 @@ static struct svn_test_descriptor_t test
     SVN_TEST_OPTS_PASS(test_txn_pool_lifetime,
                        "test pool lifetime dependencies with txn roots"),
     SVN_TEST_OPTS_PASS(test_modify_txn_being_written,
-                       "test modify txn being written in FSFS"),
+                       "test modify txn being written"),
     SVN_TEST_OPTS_PASS(test_prop_and_text_rep_sharing_collision,
                        "test property and text rep-sharing collision"),
     SVN_TEST_OPTS_PASS(test_internal_txn_props,