subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pbu...@apache.org
Subject svn commit: r1395146 [6/7] - in /subversion/branches/auto-props-sdc: ./ build/ build/ac-macros/ subversion/bindings/swig/ subversion/bindings/swig/include/ subversion/bindings/swig/perl/libsvn_swig_perl/ subversion/bindings/swig/perl/native/ subversion...
Date Sat, 06 Oct 2012 18:31:33 GMT
Modified: subversion/branches/auto-props-sdc/subversion/libsvn_subr/string.c
URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/libsvn_subr/string.c?rev=1395146&r1=1395145&r2=1395146&view=diff
==============================================================================
--- subversion/branches/auto-props-sdc/subversion/libsvn_subr/string.c (original)
+++ subversion/branches/auto-props-sdc/subversion/libsvn_subr/string.c Sat Oct  6 18:31:28 2012
@@ -1093,3 +1093,44 @@ svn__i64toa(char * dest, apr_int64_t num
   *dest = '-';
   return svn__ui64toa(dest + 1, (apr_uint64_t)(0-number)) + 1;
 }
+
+static void
+ui64toa_sep(apr_uint64_t number, char seperator, char *buffer)
+{
+  apr_size_t length = svn__ui64toa(buffer, number);
+  apr_size_t i;
+
+  for (i = length; i > 3; i -= 3)
+    {
+      memmove(&buffer[i - 2], &buffer[i - 3], length - i + 3);
+      buffer[i-3] = seperator;
+      length++;
+    }
+
+  buffer[length] = 0;
+}
+
+char *
+svn__ui64toa_sep(apr_uint64_t number, char seperator, apr_pool_t *pool)
+{
+  char buffer[2 * SVN_INT64_BUFFER_SIZE];
+  ui64toa_sep(number, seperator, buffer);
+
+  return apr_pstrdup(pool, buffer);
+}
+
+char *
+svn__i64toa_sep(apr_uint64_t number, char seperator, apr_pool_t *pool)
+{
+  char buffer[2 * SVN_INT64_BUFFER_SIZE];
+  if (number < 0)
+    {
+      buffer[0] = '-';
+      ui64toa_sep((apr_uint64_t)(-number), seperator, &buffer[1]);
+    }
+  else
+    ui64toa_sep((apr_uint64_t)(number), seperator, buffer);
+
+  return apr_pstrdup(pool, buffer);
+}
+

Modified: subversion/branches/auto-props-sdc/subversion/libsvn_wc/conflicts.c
URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/libsvn_wc/conflicts.c?rev=1395146&r1=1395145&r2=1395146&view=diff
==============================================================================
--- subversion/branches/auto-props-sdc/subversion/libsvn_wc/conflicts.c (original)
+++ subversion/branches/auto-props-sdc/subversion/libsvn_wc/conflicts.c Sat Oct  6 18:31:28 2012
@@ -1600,6 +1600,10 @@ eval_text_conflict_func_result(svn_skel_
                                           FALSE /* record_fileinfo */,
                                           result_pool, scratch_pool));
     *work_items = svn_wc__wq_merge(*work_items, work_item, result_pool);
+    
+    SVN_ERR(svn_wc__wq_build_sync_file_flags(&work_item, db, local_abspath,
+                                             result_pool, scratch_pool));
+    *work_items = svn_wc__wq_merge(*work_items, work_item, result_pool);
 
     if (remove_source)
       {
@@ -1679,7 +1683,6 @@ save_merge_result(svn_skel_t **work_item
                                                 db, local_abspath,
                                                 source, edited_copy_abspath,
                                                 result_pool, scratch_pool));
-
   return SVN_NO_ERROR;
 }
 
@@ -2341,6 +2344,11 @@ resolve_conflict_on_node(svn_boolean_t *
                     &work_item, db, local_abspath,
                     auto_resolve_src, local_abspath, pool, pool));
           work_items = svn_wc__wq_merge(work_items, work_item, pool);
+
+          SVN_ERR(svn_wc__wq_build_sync_file_flags(&work_item, db,
+                                                   local_abspath,
+                                                   pool, pool));
+          work_items = svn_wc__wq_merge(work_items, work_item, pool);
         }
 
       /* Legacy behavior: Only report text conflicts as resolved when at least

Modified: subversion/branches/auto-props-sdc/subversion/libsvn_wc/copy.c
URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/libsvn_wc/copy.c?rev=1395146&r1=1395145&r2=1395146&view=diff
==============================================================================
--- subversion/branches/auto-props-sdc/subversion/libsvn_wc/copy.c (original)
+++ subversion/branches/auto-props-sdc/subversion/libsvn_wc/copy.c Sat Oct  6 18:31:28 2012
@@ -287,7 +287,9 @@ copy_versioned_file(svn_wc__db_t *db,
    otherwise copy both the versioned metadata and the filesystem nodes (even
    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.
+   data in addition to copying the directory. If IS_MOVE is TRUE and
+   ALLOW_MIXED_REVISIONS is FALSE, raise an error if a move of a
+   mixed-revision subtree is attempted.
 
    WITHIN_ONE_WC is TRUE if the copy/move is within a single working copy (root)
  */
@@ -299,6 +301,7 @@ copy_versioned_dir(svn_wc__db_t *db,
                    const char *tmpdir_abspath,
                    svn_boolean_t metadata_only,
                    svn_boolean_t is_move,
+                   svn_boolean_t allow_mixed_revisions,
                    svn_boolean_t within_one_wc,
                    svn_cancel_func_t cancel_func,
                    void *cancel_baton,
@@ -315,6 +318,24 @@ copy_versioned_dir(svn_wc__db_t *db,
   svn_node_kind_t disk_kind;
   apr_pool_t *iterpool;
 
+  if (is_move && !allow_mixed_revisions)
+    {
+      svn_revnum_t min_rev;
+      svn_revnum_t max_rev;
+
+      /* Verify that the move source is a single-revision subtree. */
+      SVN_ERR(svn_wc__db_min_max_revisions(&min_rev, &max_rev, db,
+                                           src_abspath, FALSE, scratch_pool));
+      if (SVN_IS_VALID_REVNUM(min_rev) && SVN_IS_VALID_REVNUM(max_rev) &&
+          min_rev != max_rev)
+        return svn_error_createf(SVN_ERR_WC_MIXED_REVISIONS, NULL,
+                                 _("Cannot move mixed-revision subtree '%s' "
+                                   "[%lu:%lu]; try updating it first"),
+                                   svn_dirent_local_style(src_abspath,
+                                                          scratch_pool),
+                                   min_rev, max_rev);
+    }
+
   /* Prepare a temp copy of the single filesystem node (usually a dir). */
   if (!metadata_only)
     {
@@ -412,7 +433,8 @@ 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, is_move, within_one_wc,
+                                       metadata_only, is_move,
+                                       allow_mixed_revisions, within_one_wc,
                                        cancel_func, cancel_baton, NULL, NULL,
                                        iterpool));
           else
@@ -523,6 +545,7 @@ copy_or_move(svn_wc_context_t *wc_ctx,
              const char *dst_abspath,
              svn_boolean_t metadata_only,
              svn_boolean_t is_move,
+             svn_boolean_t allow_mixed_revisions,
              svn_cancel_func_t cancel_func,
              void *cancel_baton,
              svn_wc_notify_func2_t notify_func,
@@ -737,8 +760,8 @@ copy_or_move(svn_wc_context_t *wc_ctx,
   else
     {
       err = copy_versioned_dir(db, src_abspath, dst_abspath, dst_abspath,
-                               tmpdir_abspath,
-                               metadata_only, is_move, within_one_wc,
+                               tmpdir_abspath, metadata_only, is_move,
+                               allow_mixed_revisions, within_one_wc,
                                cancel_func, cancel_baton,
                                notify_func, notify_baton,
                                scratch_pool);
@@ -773,6 +796,7 @@ svn_wc_copy3(svn_wc_context_t *wc_ctx,
 {
   return svn_error_trace(copy_or_move(wc_ctx, src_abspath, dst_abspath,
                                       metadata_only, FALSE /* is_move */,
+                                      TRUE /* allow_mixed_revisions */,
                                       cancel_func, cancel_baton,
                                       notify_func, notify_baton,
                                       scratch_pool));
@@ -928,21 +952,23 @@ remove_all_conflict_markers(svn_wc__db_t
 }
 
 svn_error_t *
-svn_wc_move(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)
+svn_wc__move2(svn_wc_context_t *wc_ctx,
+              const char *src_abspath,
+              const char *dst_abspath,
+              svn_boolean_t metadata_only,
+              svn_boolean_t allow_mixed_revisions,
+              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_wc__db_t *db = wc_ctx->db;
 
   SVN_ERR(copy_or_move(wc_ctx, src_abspath, dst_abspath,
                        TRUE /* metadata_only */,
                        TRUE /* is_move */,
+                       allow_mixed_revisions,
                        cancel_func, cancel_baton,
                        notify_func, notify_baton,
                        scratch_pool));

Modified: subversion/branches/auto-props-sdc/subversion/libsvn_wc/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/libsvn_wc/deprecated.c?rev=1395146&r1=1395145&r2=1395146&view=diff
==============================================================================
--- subversion/branches/auto-props-sdc/subversion/libsvn_wc/deprecated.c (original)
+++ subversion/branches/auto-props-sdc/subversion/libsvn_wc/deprecated.c Sat Oct  6 18:31:28 2012
@@ -4463,3 +4463,22 @@ svn_wc_crop_tree(svn_wc_adm_access_t *an
 
   return svn_error_trace(svn_wc_context_destroy(wc_ctx));
 }
+
+svn_error_t *
+svn_wc_move(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(svn_wc__move2(wc_ctx, src_abspath, dst_abspath,
+                                       metadata_only,
+                                       TRUE, /* allow_mixed_revisions */
+                                       cancel_func, cancel_baton,
+                                       notify_func, notify_baton,
+                                       scratch_pool));
+}

Modified: subversion/branches/auto-props-sdc/subversion/libsvn_wc/lock.c
URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/libsvn_wc/lock.c?rev=1395146&r1=1395145&r2=1395146&view=diff
==============================================================================
--- subversion/branches/auto-props-sdc/subversion/libsvn_wc/lock.c (original)
+++ subversion/branches/auto-props-sdc/subversion/libsvn_wc/lock.c Sat Oct  6 18:31:28 2012
@@ -97,7 +97,8 @@ svn_wc__internal_check_wc(int *wc_format
     {
       svn_node_kind_t kind;
 
-      if (err->apr_err != SVN_ERR_WC_MISSING)
+      if (err->apr_err != SVN_ERR_WC_MISSING &&
+          err->apr_err != SVN_ERR_WC_UNSUPPORTED_FORMAT)
         return svn_error_trace(err);
       svn_error_clear(err);
 

Modified: subversion/branches/auto-props-sdc/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/libsvn_wc/update_editor.c?rev=1395146&r1=1395145&r2=1395146&view=diff
==============================================================================
--- subversion/branches/auto-props-sdc/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/branches/auto-props-sdc/subversion/libsvn_wc/update_editor.c Sat Oct  6 18:31:28 2012
@@ -1410,7 +1410,18 @@ check_tree_conflict(svn_skel_t **pconfli
 
 
       case svn_wc__db_status_deleted:
-        reason = svn_wc_conflict_reason_deleted;
+        {
+          const char *moved_to_abspath;
+
+          SVN_ERR(svn_wc__db_scan_deletion(NULL, &moved_to_abspath,
+                                           NULL, NULL, eb->db,
+                                           local_abspath,
+                                           scratch_pool, scratch_pool));
+          if (moved_to_abspath)
+            reason = svn_wc_conflict_reason_moved_away;
+          else
+            reason = svn_wc_conflict_reason_deleted;
+        }
         break;
 
       case svn_wc__db_status_incomplete:

Modified: subversion/branches/auto-props-sdc/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/libsvn_wc/wc_db.c?rev=1395146&r1=1395145&r2=1395146&view=diff
==============================================================================
--- subversion/branches/auto-props-sdc/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/branches/auto-props-sdc/subversion/libsvn_wc/wc_db.c Sat Oct  6 18:31:28 2012
@@ -3839,6 +3839,7 @@ op_depth_of(int *op_depth,
 static svn_error_t *
 op_depth_for_copy(int *op_depth,
                   int *np_op_depth,
+                  int *parent_op_depth,
                   apr_int64_t copyfrom_repos_id,
                   const char *copyfrom_relpath,
                   svn_revnum_t copyfrom_revision,
@@ -3848,14 +3849,16 @@ op_depth_for_copy(int *op_depth,
 
 
 /* Like svn_wc__db_op_copy(), but with WCROOT+LOCAL_RELPATH
- * instead of DB+LOCAL_ABSPATH.  */
+ * instead of DB+LOCAL_ABSPATH. A non-zero MOVE_OP_DEPTH implies that the
+ * copy operation is part of a move, and indicates the op-depth of the
+ * move destination op-root. */
 static svn_error_t *
 db_op_copy(svn_wc__db_wcroot_t *src_wcroot,
            const char *src_relpath,
            svn_wc__db_wcroot_t *dst_wcroot,
            const char *dst_relpath,
            const svn_skel_t *work_items,
-           svn_boolean_t is_move,
+           int move_op_depth,
            apr_pool_t *scratch_pool)
 {
   const char *copyfrom_relpath;
@@ -3866,6 +3869,7 @@ db_op_copy(svn_wc__db_wcroot_t *src_wcro
   apr_int64_t copyfrom_id;
   int dst_op_depth;
   int dst_np_op_depth;
+  int dst_parent_op_depth;
   svn_kind_t kind;
   const apr_array_header_t *children;
 
@@ -3873,8 +3877,9 @@ db_op_copy(svn_wc__db_wcroot_t *src_wcro
                             &status, &kind, &op_root, src_wcroot,
                             src_relpath, scratch_pool, scratch_pool));
 
-  SVN_ERR(op_depth_for_copy(&dst_op_depth, &dst_np_op_depth, copyfrom_id,
-                            copyfrom_relpath, copyfrom_rev,
+  SVN_ERR(op_depth_for_copy(&dst_op_depth, &dst_np_op_depth,
+                            &dst_parent_op_depth,
+                            copyfrom_id, copyfrom_relpath, copyfrom_rev,
                             dst_wcroot, dst_relpath, scratch_pool));
 
   SVN_ERR_ASSERT(kind == svn_kind_file || kind == svn_kind_dir);
@@ -3975,9 +3980,9 @@ db_op_copy(svn_wc__db_wcroot_t *src_wcro
                     dst_parent_relpath,
                     presence_map, dst_presence));
 
-      if (is_move)
+      if (move_op_depth > 0)
         {
-          if (dst_op_depth == relpath_depth(dst_relpath))
+          if (relpath_depth(dst_relpath) == move_op_depth)
             {
               /* We're moving the root of the move operation.
                *
@@ -3996,8 +4001,8 @@ db_op_copy(svn_wc__db_wcroot_t *src_wcro
 
               /* We're moving a child along with the root of the move.
                *
-               * Set moved-here depending on dst_parent, propagating
-               * the above decision to moved-along children.
+               * Set moved-here depending on dst_parent, propagating the
+               * above decision to moved-along children at the same op_depth.
                * We can't use scan_addition() to detect moved-here because
                * the delete-half of the move might not yet exist. */
               SVN_ERR(svn_sqlite__get_statement(&info_stmt, dst_wcroot->sdb,
@@ -4006,9 +4011,29 @@ db_op_copy(svn_wc__db_wcroot_t *src_wcro
                                         dst_parent_relpath));
               SVN_ERR(svn_sqlite__step(&have_row, info_stmt));
               SVN_ERR_ASSERT(have_row);
-              if (svn_sqlite__column_boolean(info_stmt, 15))
-                SVN_ERR(svn_sqlite__bind_int(stmt, 7, 1));
-              SVN_ERR(svn_sqlite__reset(info_stmt));
+              if (svn_sqlite__column_boolean(info_stmt, 15) &&
+                  dst_op_depth == dst_parent_op_depth)
+                {
+                  SVN_ERR(svn_sqlite__bind_int(stmt, 7, 1));
+                  SVN_ERR(svn_sqlite__reset(info_stmt));
+                }
+              else
+                {
+                  SVN_ERR(svn_sqlite__reset(info_stmt));
+
+                  /* If the child has been moved into the tree we're moving,
+                   * keep its moved-here bit set. */
+                  SVN_ERR(svn_sqlite__get_statement(&info_stmt,
+                                                    dst_wcroot->sdb,
+                                                    STMT_SELECT_NODE_INFO));
+                  SVN_ERR(svn_sqlite__bindf(info_stmt, "is",
+                                            dst_wcroot->wc_id, src_relpath));
+                  SVN_ERR(svn_sqlite__step(&have_row, info_stmt));
+                  SVN_ERR_ASSERT(have_row);
+                  if (svn_sqlite__column_boolean(info_stmt, 15))
+                    SVN_ERR(svn_sqlite__bind_int(stmt, 7, 1));
+                  SVN_ERR(svn_sqlite__reset(info_stmt));
+                }
             }
         }
 
@@ -4080,7 +4105,9 @@ struct op_copy_baton
   const char *dst_relpath;
 
   const svn_skel_t *work_items;
+
   svn_boolean_t is_move;
+  const char *dst_op_root_relpath;
 };
 
 /* Helper for svn_wc__db_op_copy.
@@ -4089,6 +4116,7 @@ static svn_error_t *
 op_copy_txn(void * baton, svn_sqlite__db_t *sdb, apr_pool_t *scratch_pool)
 {
   struct op_copy_baton *ocb = baton;
+  int move_op_depth;
 
   if (sdb != ocb->dst_wcroot->sdb)
     {
@@ -4102,9 +4130,14 @@ op_copy_txn(void * baton, svn_sqlite__db
 
   /* From this point we can assume a lock in the src and dst databases */
 
+  if (ocb->is_move)
+    move_op_depth = relpath_depth(ocb->dst_op_root_relpath);
+  else
+    move_op_depth = 0;
+
   SVN_ERR(db_op_copy(ocb->src_wcroot, ocb->src_relpath,
                      ocb->dst_wcroot, ocb->dst_relpath,
-                     ocb->work_items, ocb->is_move, scratch_pool));
+                     ocb->work_items, move_op_depth, scratch_pool));
 
   return SVN_NO_ERROR;
 }
@@ -4122,6 +4155,7 @@ svn_wc__db_op_copy(svn_wc__db_t *db,
 
   SVN_ERR_ASSERT(svn_dirent_is_absolute(src_abspath));
   SVN_ERR_ASSERT(svn_dirent_is_absolute(dst_abspath));
+  SVN_ERR_ASSERT(svn_dirent_is_absolute(dst_op_root_abspath));
 
   SVN_ERR(svn_wc__db_wcroot_parse_local_abspath(&ocb.src_wcroot,
                                                 &ocb.src_relpath, db,
@@ -4137,6 +4171,8 @@ svn_wc__db_op_copy(svn_wc__db_t *db,
 
   ocb.work_items = work_items;
   ocb.is_move = is_move;
+  ocb.dst_op_root_relpath = svn_dirent_skip_ancestor(ocb.dst_wcroot->abspath,
+                                                     dst_op_root_abspath);
 
   /* Call with the sdb in src_wcroot. It might call itself again to
      also obtain a lock in dst_wcroot */
@@ -4147,7 +4183,10 @@ svn_wc__db_op_copy(svn_wc__db_t *db,
 }
 
 
-/* The recursive implementation of svn_wc__db_op_copy_shadowed_layer */
+/* The recursive implementation of svn_wc__db_op_copy_shadowed_layer.
+ *
+ * A non-zero MOVE_OP_DEPTH implies that the copy operation is part of
+ * a move, and indicates the op-depth of the move destination op-root. */
 static svn_error_t *
 db_op_copy_shadowed_layer(svn_wc__db_wcroot_t *src_wcroot,
                           const char *src_relpath,
@@ -4159,7 +4198,7 @@ db_op_copy_shadowed_layer(svn_wc__db_wcr
                           apr_int64_t repos_id,
                           const char *repos_relpath,
                           svn_revnum_t revision,
-                          svn_boolean_t is_move,
+                          int move_op_depth,
                           apr_pool_t *scratch_pool)
 {
   const apr_array_header_t *children;
@@ -4273,15 +4312,13 @@ db_op_copy_shadowed_layer(svn_wc__db_wcr
       SVN_ERR(svn_sqlite__get_statement(&stmt, src_wcroot->sdb,
                              STMT_INSERT_WORKING_NODE_COPY_FROM_DEPTH));
 
-      /* Perhaps we should avoid setting moved_here to 0 and leave it
-         null instead? */
       SVN_ERR(svn_sqlite__bindf(stmt, "issdstdd",
                         src_wcroot->wc_id, src_relpath,
                         dst_relpath,
                         dst_op_depth,
                         svn_relpath_dirname(dst_relpath, iterpool),
                         presence_map, dst_presence,
-                        (is_move ? 1 : 0),
+                        (dst_op_depth == move_op_depth), /* moved_here */
                         src_op_depth));
 
       SVN_ERR(svn_sqlite__step_done(stmt));
@@ -4340,8 +4377,8 @@ db_op_copy_shadowed_layer(svn_wc__db_wcr
                          src_wcroot, child_src_relpath, src_op_depth,
                          dst_wcroot, child_dst_relpath, dst_op_depth,
                          del_op_depth,
-                         repos_id, child_repos_relpath, revision, is_move,
-                         scratch_pool));
+                         repos_id, child_repos_relpath, revision,
+                         move_op_depth, scratch_pool));
     }
 
   svn_pool_destroy(iterpool);
@@ -4415,7 +4452,8 @@ op_copy_shadowed_layer_txn(void * baton,
                         ocb->src_wcroot, ocb->src_relpath, src_op_depth,
                         ocb->dst_wcroot, ocb->dst_relpath, dst_op_depth,
                         del_op_depth,
-                        repos_id, repos_relpath, revision, ocb->is_move,
+                        repos_id, repos_relpath, revision,
+                        (ocb->is_move ? dst_op_depth : 0),
                         scratch_pool));
 
   return SVN_NO_ERROR;
@@ -4446,6 +4484,8 @@ svn_wc__db_op_copy_shadowed_layer(svn_wc
   VERIFY_USABLE_WCROOT(ocb.dst_wcroot);
 
   ocb.is_move = is_move;
+  ocb.dst_op_root_relpath = NULL; /* not used by op_copy_shadowed_layer_txn */
+
   ocb.work_items = NULL;
 
   /* Call with the sdb in src_wcroot. It might call itself again to
@@ -4524,10 +4564,14 @@ catch_copy_of_server_excluded(svn_wc__db
 
    If the parent node is not the parent of the to be copied node, then
    *OP_DEPTH will be set to the proper op_depth for a new operation root.
+
+   Set *PARENT_OP_DEPTH to the op_depth of the parent.
+
  */
 static svn_error_t *
 op_depth_for_copy(int *op_depth,
                   int *np_op_depth,
+                  int *parent_op_depth,
                   apr_int64_t copyfrom_repos_id,
                   const char *copyfrom_relpath,
                   svn_revnum_t copyfrom_revision,
@@ -4544,6 +4588,9 @@ op_depth_for_copy(int *op_depth,
   *op_depth = relpath_depth(local_relpath);
   *np_op_depth = -1;
 
+  svn_relpath_split(&parent_relpath, &name, local_relpath, scratch_pool);
+  *parent_op_depth = relpath_depth(parent_relpath);
+
   if (!copyfrom_relpath)
     return SVN_NO_ERROR;
 
@@ -4562,18 +4609,17 @@ op_depth_for_copy(int *op_depth,
     }
   SVN_ERR(svn_sqlite__reset(stmt));
 
-  svn_relpath_split(&parent_relpath, &name, local_relpath, scratch_pool);
   SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
                                     STMT_SELECT_WORKING_NODE));
   SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, parent_relpath));
   SVN_ERR(svn_sqlite__step(&have_row, stmt));
   if (have_row)
     {
-      int parent_op_depth = svn_sqlite__column_int(stmt, 0);
       svn_wc__db_status_t presence = svn_sqlite__column_token(stmt, 1,
                                                               presence_map);
 
-      if (parent_op_depth < min_op_depth)
+      *parent_op_depth = svn_sqlite__column_int(stmt, 0);
+      if (*parent_op_depth < min_op_depth)
         {
           /* We want to create a copy; not overwrite the lower layers */
           SVN_ERR(svn_sqlite__reset(stmt));
@@ -4586,7 +4632,7 @@ op_depth_for_copy(int *op_depth,
       SVN_ERR_ASSERT(presence == svn_wc__db_status_normal);
 
       if ((incomplete_op_depth < 0)
-          || (incomplete_op_depth == parent_op_depth))
+          || (incomplete_op_depth == *parent_op_depth))
         {
           apr_int64_t parent_copyfrom_repos_id
             = svn_sqlite__column_int64(stmt, 10);
@@ -4601,7 +4647,7 @@ op_depth_for_copy(int *op_depth,
                   && !strcmp(copyfrom_relpath,
                              svn_relpath_join(parent_copyfrom_relpath, name,
                                               scratch_pool)))
-                *op_depth = parent_op_depth;
+                *op_depth = *parent_op_depth;
               else if (incomplete_op_depth > 0)
                 *np_op_depth = incomplete_op_depth;
             }
@@ -4634,6 +4680,7 @@ svn_wc__db_op_copy_dir(svn_wc__db_t *db,
   svn_wc__db_wcroot_t *wcroot;
   const char *local_relpath;
   insert_working_baton_t iwb;
+  int parent_op_depth;
 
   SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
   SVN_ERR_ASSERT(props != NULL);
@@ -4656,7 +4703,6 @@ svn_wc__db_op_copy_dir(svn_wc__db_t *db,
   iwb.changed_rev = changed_rev;
   iwb.changed_date = changed_date;
   iwb.changed_author = changed_author;
-  iwb.moved_here = is_move;
 
   if (original_root_url != NULL)
     {
@@ -4669,12 +4715,14 @@ svn_wc__db_op_copy_dir(svn_wc__db_t *db,
 
   /* ### Should we do this inside the transaction? */
   SVN_ERR(op_depth_for_copy(&iwb.op_depth, &iwb.not_present_op_depth,
-                            iwb.original_repos_id,
+                            &parent_op_depth, iwb.original_repos_id,
                             original_repos_relpath, original_revision,
                             wcroot, local_relpath, scratch_pool));
 
   iwb.children = children;
   iwb.depth = depth;
+  iwb.moved_here = is_move && (parent_op_depth == 0 ||
+                               iwb.op_depth == parent_op_depth);
 
   iwb.work_items = work_items;
   iwb.conflict = conflict;
@@ -4709,6 +4757,7 @@ svn_wc__db_op_copy_file(svn_wc__db_t *db
   svn_wc__db_wcroot_t *wcroot;
   const char *local_relpath;
   insert_working_baton_t iwb;
+  int parent_op_depth;
 
   SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
   SVN_ERR_ASSERT(props != NULL);
@@ -4733,7 +4782,6 @@ svn_wc__db_op_copy_file(svn_wc__db_t *db
   iwb.changed_rev = changed_rev;
   iwb.changed_date = changed_date;
   iwb.changed_author = changed_author;
-  iwb.moved_here = is_move;
 
   if (original_root_url != NULL)
     {
@@ -4746,11 +4794,13 @@ svn_wc__db_op_copy_file(svn_wc__db_t *db
 
   /* ### Should we do this inside the transaction? */
   SVN_ERR(op_depth_for_copy(&iwb.op_depth, &iwb.not_present_op_depth,
-                            iwb.original_repos_id,
+                            &parent_op_depth, iwb.original_repos_id,
                             original_repos_relpath, original_revision,
                             wcroot, local_relpath, scratch_pool));
 
   iwb.checksum = checksum;
+  iwb.moved_here = is_move && (parent_op_depth == 0 ||
+                               iwb.op_depth == parent_op_depth);
 
   if (update_actual_props)
     {
@@ -4788,6 +4838,7 @@ svn_wc__db_op_copy_symlink(svn_wc__db_t 
   svn_wc__db_wcroot_t *wcroot;
   const char *local_relpath;
   insert_working_baton_t iwb;
+  int parent_op_depth;
 
   SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
   SVN_ERR_ASSERT(props != NULL);
@@ -4821,7 +4872,7 @@ svn_wc__db_op_copy_symlink(svn_wc__db_t 
 
   /* ### Should we do this inside the transaction? */
   SVN_ERR(op_depth_for_copy(&iwb.op_depth, &iwb.not_present_op_depth,
-                            iwb.original_repos_id,
+                            &parent_op_depth, iwb.original_repos_id,
                             original_repos_relpath, original_revision,
                             wcroot, local_relpath, scratch_pool));
 

Modified: subversion/branches/auto-props-sdc/subversion/libsvn_wc/wc_db_wcroot.c
URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/libsvn_wc/wc_db_wcroot.c?rev=1395146&r1=1395145&r2=1395146&view=diff
==============================================================================
--- subversion/branches/auto-props-sdc/subversion/libsvn_wc/wc_db_wcroot.c (original)
+++ subversion/branches/auto-props-sdc/subversion/libsvn_wc/wc_db_wcroot.c Sat Oct  6 18:31:28 2012
@@ -599,11 +599,22 @@ try_symlink_as_dir:
          inside the wcroot, but we know the abspath is this directory
          (ie. where we found it).  */
 
-      SVN_ERR(svn_wc__db_pdh_create_wcroot(wcroot,
+      err = svn_wc__db_pdh_create_wcroot(wcroot,
                             apr_pstrdup(db->state_pool, local_abspath),
                             sdb, wc_id, FORMAT_FROM_SDB,
                             db->auto_upgrade, db->enforce_empty_wq,
-                            db->state_pool, scratch_pool));
+                            db->state_pool, scratch_pool);
+      if (err && err->apr_err == SVN_ERR_WC_UNSUPPORTED_FORMAT &&
+          kind == svn_kind_symlink)
+        {
+          /* We found an unsupported WC after traversing upwards from a
+           * symlink. Fall through to code below to check if the symlink
+           * points at a supported WC. */
+          svn_error_clear(err);
+          *wcroot = NULL;
+        }
+      else
+        SVN_ERR(err);
     }
   else
     {
@@ -615,16 +626,17 @@ try_symlink_as_dir:
                             db->state_pool, scratch_pool));
     }
 
-  {
-    const char *dir_relpath;
+  if (*wcroot)
+    {
+      const char *dir_relpath;
+
+      /* The subdirectory's relpath is easily computed relative to the
+         wcroot that we just found.  */
+      dir_relpath = compute_relpath(*wcroot, local_dir_abspath, NULL);
 
-    /* The subdirectory's relpath is easily computed relative to the
-       wcroot that we just found.  */
-    dir_relpath = compute_relpath(*wcroot, local_dir_abspath, NULL);
-
-    /* And the result local_relpath may include a filename.  */
-    *local_relpath = svn_relpath_join(dir_relpath, build_relpath, result_pool);
-  }
+      /* And the result local_relpath may include a filename.  */
+      *local_relpath = svn_relpath_join(dir_relpath, build_relpath, result_pool);
+    }
 
   if (kind == svn_kind_symlink)
     {
@@ -638,33 +650,38 @@ try_symlink_as_dir:
        * points to a directory, try to find a wcroot in that directory
        * instead. */
 
-      err = svn_wc__db_read_info_internal(&status, NULL, NULL, NULL, NULL,
-                                          NULL, NULL, NULL, NULL, NULL, NULL,
-                                          NULL, NULL, NULL, NULL, NULL, NULL,
-                                          NULL, &conflicted, NULL, NULL, NULL,
-                                          NULL, NULL, NULL,
-                                          *wcroot, *local_relpath,
-                                          scratch_pool, scratch_pool);
-      if (err)
+      if (*wcroot)
         {
-          if (err->apr_err != SVN_ERR_WC_PATH_NOT_FOUND
-              && !SVN_WC__ERR_IS_NOT_CURRENT_WC(err))
-            return svn_error_trace(err);
+          err = svn_wc__db_read_info_internal(&status, NULL, NULL, NULL, NULL,
+                                              NULL, NULL, NULL, NULL, NULL,
+                                              NULL, NULL, NULL, NULL, NULL,
+                                              NULL, NULL, NULL, &conflicted,
+                                              NULL, NULL, NULL, NULL, NULL,
+                                              NULL, *wcroot, *local_relpath,
+                                              scratch_pool, scratch_pool);
+          if (err)
+            {
+              if (err->apr_err != SVN_ERR_WC_PATH_NOT_FOUND
+                  && !SVN_WC__ERR_IS_NOT_CURRENT_WC(err))
+                return svn_error_trace(err);
 
-          svn_error_clear(err);
-          retry_if_dir = TRUE; /* The symlink is unversioned. */
+              svn_error_clear(err);
+              retry_if_dir = TRUE; /* The symlink is unversioned. */
+            }
+          else
+            {
+              /* The symlink is versioned, or obstructs a versioned node.
+               * Ignore non-conflicted not-present/excluded nodes.
+               * This allows the symlink to redirect the wcroot query to a
+               * directory, regardless of 'invisible' nodes in this WC. */
+              retry_if_dir = ((status == svn_wc__db_status_not_present ||
+                               status == svn_wc__db_status_excluded ||
+                               status == svn_wc__db_status_server_excluded)
+                              && !conflicted);
+            }
         }
       else
-        {
-          /* The symlink is versioned, or obstructs a versioned node.
-           * Ignore non-conflicted not-present/excluded nodes.
-           * This allows the symlink to redirect the wcroot query to a
-           * directory, regardless of 'invisible' nodes in this WC. */
-          retry_if_dir = ((status == svn_wc__db_status_not_present ||
-                           status == svn_wc__db_status_excluded ||
-                           status == svn_wc__db_status_server_excluded)
-                          && !conflicted);
-        }
+        retry_if_dir = TRUE;
 
       if (retry_if_dir)
         {

Modified: subversion/branches/auto-props-sdc/subversion/mod_dav_svn/dav_svn.h
URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/mod_dav_svn/dav_svn.h?rev=1395146&r1=1395145&r2=1395146&view=diff
==============================================================================
--- subversion/branches/auto-props-sdc/subversion/mod_dav_svn/dav_svn.h (original)
+++ subversion/branches/auto-props-sdc/subversion/mod_dav_svn/dav_svn.h Sat Oct  6 18:31:28 2012
@@ -307,6 +307,10 @@ svn_boolean_t dav_svn__get_bulk_updates_
 /* for the repository referred to by this request, should httpv2 be advertised? */
 svn_boolean_t dav_svn__get_v2_protocol_flag(request_rec *r);
 
+/* for the repository referred to by this request, should ephemeral
+   txnprop support be advertised? */
+svn_boolean_t dav_svn__get_ephemeral_txnprops_flag(request_rec *r);
+
 /* for the repository referred to by this request, are subrequests active? */
 svn_boolean_t dav_svn__get_pathauthz_flag(request_rec *r);
 

Modified: subversion/branches/auto-props-sdc/subversion/mod_dav_svn/mod_dav_svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/mod_dav_svn/mod_dav_svn.c?rev=1395146&r1=1395145&r2=1395146&view=diff
==============================================================================
--- subversion/branches/auto-props-sdc/subversion/mod_dav_svn/mod_dav_svn.c (original)
+++ subversion/branches/auto-props-sdc/subversion/mod_dav_svn/mod_dav_svn.c Sat Oct  6 18:31:28 2012
@@ -88,6 +88,7 @@ typedef struct dir_conf_t {
   enum conf_flag autoversioning;     /* whether autoversioning is active */
   enum conf_flag bulk_updates;       /* whether bulk updates are allowed */
   enum conf_flag v2_protocol;        /* whether HTTP v2 is advertised */
+  enum conf_flag ephemeral_txnprops; /* advertise ephemeral txnprop support? */
   enum path_authz_conf path_authz_method; /* how GET subrequests are handled */
   enum conf_flag list_parentpath;    /* whether to allow GET of parentpath */
   const char *root_dir;              /* our top-level directory */
@@ -196,6 +197,7 @@ create_dir_config(apr_pool_t *p, char *d
     conf->root_dir = svn_urlpath__canonicalize(dir, p);
   conf->bulk_updates = CONF_FLAG_ON;
   conf->v2_protocol = CONF_FLAG_ON;
+  conf->ephemeral_txnprops = CONF_FLAG_ON;
   conf->hooks_env = NULL;
 
   return conf;
@@ -221,6 +223,8 @@ merge_dir_config(apr_pool_t *p, void *ba
   newconf->autoversioning = INHERIT_VALUE(parent, child, autoversioning);
   newconf->bulk_updates = INHERIT_VALUE(parent, child, bulk_updates);
   newconf->v2_protocol = INHERIT_VALUE(parent, child, v2_protocol);
+  newconf->ephemeral_txnprops = INHERIT_VALUE(parent, child,
+                                              ephemeral_txnprops);
   newconf->path_authz_method = INHERIT_VALUE(parent, child, path_authz_method);
   newconf->list_parentpath = INHERIT_VALUE(parent, child, list_parentpath);
   newconf->txdelta_cache = INHERIT_VALUE(parent, child, txdelta_cache);
@@ -346,6 +350,20 @@ SVNAdvertiseV2Protocol_cmd(cmd_parms *cm
 
 
 static const char *
+SVNAdvertiseEphemeralTXNProps_cmd(cmd_parms *cmd, void *config, int arg)
+{
+  dir_conf_t *conf = config;
+
+  if (arg)
+    conf->ephemeral_txnprops = CONF_FLAG_ON;
+  else
+    conf->ephemeral_txnprops = CONF_FLAG_OFF;
+
+  return NULL;
+}
+
+
+static const char *
 SVNPathAuthz_cmd(cmd_parms *cmd, void *config, const char *arg1)
 {
   dir_conf_t *conf = config;
@@ -761,6 +779,16 @@ dav_svn__get_v2_protocol_flag(request_re
 }
 
 
+svn_boolean_t
+dav_svn__get_ephemeral_txnprops_flag(request_rec *r)
+{
+  dir_conf_t *conf;
+
+  conf = ap_get_module_config(r->per_dir_config, &dav_svn_module);
+  return conf->ephemeral_txnprops == CONF_FLAG_ON;
+}
+
+
 /* FALSE if path authorization should be skipped.
  * TRUE if either the bypass or the apache subrequest methods should be used.
  */
@@ -1061,6 +1089,12 @@ static const command_rec cmds[] =
                "Subversion's HTTP protocol (default values is On)."),
 
   /* per directory/location */
+  AP_INIT_FLAG("SVNAdvertiseEphemeralTXNProps",
+               SVNAdvertiseEphemeralTXNProps_cmd, NULL, ACCESS_CONF|RSRC_CONF,
+               "enables server advertising of support for ephemeral "
+               "commit transaction properties (default value is On)."),
+
+  /* per directory/location */
   AP_INIT_FLAG("SVNCacheTextDeltas", SVNCacheTextDeltas_cmd, NULL,
                ACCESS_CONF|RSRC_CONF,
                "speeds up data access to older revisions by caching "

Modified: subversion/branches/auto-props-sdc/subversion/mod_dav_svn/reports/update.c
URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/mod_dav_svn/reports/update.c?rev=1395146&r1=1395145&r2=1395146&view=diff
==============================================================================
--- subversion/branches/auto-props-sdc/subversion/mod_dav_svn/reports/update.c (original)
+++ subversion/branches/auto-props-sdc/subversion/mod_dav_svn/reports/update.c Sat Oct  6 18:31:28 2012
@@ -1219,7 +1219,7 @@ dav_svn__update_report(const dav_resourc
   editor->close_file = upd_close_file;
   editor->absent_file = upd_absent_file;
   editor->close_edit = upd_close_edit;
-  if ((serr = svn_repos_begin_report2(&rbaton, revnum,
+  if ((serr = svn_repos_begin_report3(&rbaton, revnum,
                                       repos->repos,
                                       src_path, target,
                                       dst_path,
@@ -1230,6 +1230,7 @@ dav_svn__update_report(const dav_resourc
                                       editor, &uc,
                                       dav_svn__authz_read_func(&arb),
                                       &arb,
+                                      0,  /* disable zero-copy for now */
                                       resource->pool)))
     {
       return dav_svn__convert_err(serr, HTTP_INTERNAL_SERVER_ERROR,

Modified: subversion/branches/auto-props-sdc/subversion/mod_dav_svn/repos.c
URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/mod_dav_svn/repos.c?rev=1395146&r1=1395145&r2=1395146&view=diff
==============================================================================
--- subversion/branches/auto-props-sdc/subversion/mod_dav_svn/repos.c (original)
+++ subversion/branches/auto-props-sdc/subversion/mod_dav_svn/repos.c Sat Oct  6 18:31:28 2012
@@ -3083,6 +3083,13 @@ set_headers(request_rec *r, const dav_re
       if ((serr == NULL) && (info.rev != SVN_INVALID_REVNUM))
         {
           mimetype = SVN_SVNDIFF_MIME_TYPE;
+
+          /* Note the base that this svndiff is based on, and tell any
+             intermediate caching proxies that this header is
+             significant.  */
+          apr_table_setn(r->headers_out, "Vary", SVN_DAV_DELTA_BASE_HEADER);
+          apr_table_setn(r->headers_out, SVN_DAV_DELTA_BASE_HEADER,
+                         resource->info->delta_base);
         }
       svn_error_clear(serr);
     }

Modified: subversion/branches/auto-props-sdc/subversion/mod_dav_svn/version.c
URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/mod_dav_svn/version.c?rev=1395146&r1=1395145&r2=1395146&view=diff
==============================================================================
--- subversion/branches/auto-props-sdc/subversion/mod_dav_svn/version.c (original)
+++ subversion/branches/auto-props-sdc/subversion/mod_dav_svn/version.c Sat Oct  6 18:31:28 2012
@@ -193,6 +193,14 @@ get_option(const dav_resource *resource,
         }
     }
 
+  /* If we're allowed (by configuration) to do so, advertise support
+     for ephemeral transaction properties. */
+  if (dav_svn__get_ephemeral_txnprops_flag(r))
+    {
+      apr_table_addn(r->headers_out, "DAV",
+                     SVN_DAV_NS_DAV_SVN_EPHEMERAL_TXNPROPS);
+    }
+
   if (resource->info->repos->fs)
     {
       svn_error_t *serr;

Modified: subversion/branches/auto-props-sdc/subversion/svn/cl.h
URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/svn/cl.h?rev=1395146&r1=1395145&r2=1395146&view=diff
==============================================================================
--- subversion/branches/auto-props-sdc/subversion/svn/cl.h (original)
+++ subversion/branches/auto-props-sdc/subversion/svn/cl.h Sat Oct  6 18:31:28 2012
@@ -238,9 +238,6 @@ typedef struct svn_cl__opt_state_t
   svn_boolean_t include_externals; /* Recurses (in)to file & dir externals */
   svn_boolean_t show_inherited_props; /* get inherited properties */
   apr_array_header_t* search_patterns; /* pattern arguments for --search */
-
-  svn_wc_conflict_resolver_func2_t conflict_func;
-  void *conflict_baton;
 } svn_cl__opt_state_t;
 
 
@@ -333,37 +330,58 @@ svn_cl__check_cancel(void *baton);
 
 /* Various conflict-resolution callbacks. */
 
-typedef struct svn_cl__conflict_baton_t {
-  svn_cl__accept_t accept_which;
-  apr_hash_t *config;
-  const char *editor_cmd;
-  svn_boolean_t external_failed;
-  svn_cmdline_prompt_baton_t *pb;
-  const char *path_prefix;
-} svn_cl__conflict_baton_t;
-
-/* Create and return a conflict baton in *B, allocated from POOL, with the
- * values ACCEPT_WHICH, CONFIG, EDITOR_CMD and PB placed in the same-named
- * fields of the baton, and its 'external_failed' field initialised to FALSE. */
-svn_error_t *
-svn_cl__conflict_baton_make(svn_cl__conflict_baton_t **b,
-                            svn_cl__accept_t accept_which,
-                            apr_hash_t *config,
-                            const char *editor_cmd,
-                            svn_cmdline_prompt_baton_t *pb,
-                            apr_pool_t *pool);
+/* Opaque baton type for svn_cl__conflict_func_interactive(). */
+typedef struct svn_cl__interactive_conflict_baton_t
+  svn_cl__interactive_conflict_baton_t;
+
+/* Create and return an baton for use with svn_cl__conflict_func_interactive
+ * in *B, allocated from RESULT_POOL, and initialised with the values
+ * ACCEPT_WHICH, CONFIG, EDITOR_CMD, CANCEL_FUNC and CANCEL_BATON. */
+svn_error_t *
+svn_cl__get_conflict_func_interactive_baton(
+  svn_cl__interactive_conflict_baton_t **b,
+  svn_cl__accept_t accept_which,
+  apr_hash_t *config,
+  const char *editor_cmd,
+  svn_cancel_func_t cancel_func,
+  void *cancel_baton,
+  apr_pool_t *result_pool);
 
 /* A conflict-resolution callback which prompts the user to choose
    one of the 3 fulltexts, edit the merged file on the spot, or just
    skip the conflict (to be resolved later).
    Implements @c svn_wc_conflict_resolver_func_t. */
 svn_error_t *
-svn_cl__conflict_handler(svn_wc_conflict_result_t **result,
-                         const svn_wc_conflict_description2_t *desc,
-                         void *baton,
-                         apr_pool_t *result_pool,
-                         apr_pool_t *scratch_pool);
-
+svn_cl__conflict_func_interactive(svn_wc_conflict_result_t **result,
+                                  const svn_wc_conflict_description2_t *desc,
+                                  void *baton,
+                                  apr_pool_t *result_pool,
+                                  apr_pool_t *scratch_pool);
+
+/* Create an return a baton for use with svn_cl__conflict_func_postpone(),
+ * allocated in RESULT_POOL. */
+void *
+svn_cl__get_conflict_func_postpone_baton(apr_pool_t *result_pool);
+
+/* A conflict-resolution callback which postpones all conflicts and
+ * remembers conflicted paths in BATON. */
+svn_error_t *
+svn_cl__conflict_func_postpone(svn_wc_conflict_result_t **result,
+                               const svn_wc_conflict_description2_t *desc,
+                               void *baton,
+                               apr_pool_t *result_pool,
+                               apr_pool_t *scratch_pool);
+
+/* Run the interactive conflict resolver, obtained internally from
+ * svn_cl__get_conflict_func_interactive(), on any conflicted paths
+ * stored in the BATON obtained from svn_cl__get_conflict_func_postpone(). */
+svn_error_t *
+svn_cl__resolve_postponed_conflicts(void *baton,
+                                    svn_depth_t depth,
+                                    svn_cl__accept_t accept_which,
+                                    const char *editor_cmd,
+                                    svn_client_ctx_t *ctx,
+                                    apr_pool_t *scratch_pool);
 
 
 /*** Command-line output functions -- printing to the user. ***/
@@ -621,14 +639,6 @@ svn_cl__notifier_mark_export(void *baton
 svn_error_t *
 svn_cl__notifier_mark_wc_to_repos_copy(void *baton);
 
-/* Return TRUE if any conflicts were detected during notification. */
-svn_boolean_t
-svn_cl__notifier_check_conflicts(void *baton);
-
-/* Return a sorted array of conflicted paths detected during notification. */
-apr_array_header_t *
-svn_cl__notifier_get_conflicted_paths(void *baton, apr_pool_t *result_pool);
-
 /* Baton for use with svn_cl__check_externals_failed_notify_wrapper(). */
 struct svn_cl__check_externals_failed_notify_baton
 {
@@ -876,15 +886,6 @@ svn_cl__check_related_source_and_target(
                                         svn_client_ctx_t *ctx,
                                         apr_pool_t *pool);
 
-/* Run the conflict resolver for all targets in the TARGETS list with
- * the specified DEPTH. */
-svn_error_t *
-svn_cl__resolve_conflicts(apr_array_header_t *targets,
-                          svn_depth_t depth,
-                          const svn_cl__opt_state_t *opt_state,
-                          svn_client_ctx_t *ctx,
-                          apr_pool_t *scratch_pool);
-
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */

Modified: subversion/branches/auto-props-sdc/subversion/svn/conflict-callbacks.c
URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/svn/conflict-callbacks.c?rev=1395146&r1=1395145&r2=1395146&view=diff
==============================================================================
--- subversion/branches/auto-props-sdc/subversion/svn/conflict-callbacks.c (original)
+++ subversion/branches/auto-props-sdc/subversion/svn/conflict-callbacks.c Sat Oct  6 18:31:28 2012
@@ -33,6 +33,7 @@
 #include "svn_dirent_uri.h"
 #include "svn_types.h"
 #include "svn_pools.h"
+#include "svn_sorts.h"
 
 #include "cl.h"
 #include "tree-conflicts.h"
@@ -41,22 +42,37 @@
 
 
 
+struct svn_cl__interactive_conflict_baton_t {
+  svn_cl__accept_t accept_which;
+  apr_hash_t *config;
+  const char *editor_cmd;
+  svn_boolean_t external_failed;
+  svn_cmdline_prompt_baton_t *pb;
+  const char *path_prefix;
+};
 
 svn_error_t *
-svn_cl__conflict_baton_make(svn_cl__conflict_baton_t **b,
-                            svn_cl__accept_t accept_which,
-                            apr_hash_t *config,
-                            const char *editor_cmd,
-                            svn_cmdline_prompt_baton_t *pb,
-                            apr_pool_t *pool)
+svn_cl__get_conflict_func_interactive_baton(
+  svn_cl__interactive_conflict_baton_t **b,
+  svn_cl__accept_t accept_which,
+  apr_hash_t *config,
+  const char *editor_cmd,
+  svn_cancel_func_t cancel_func,
+  void *cancel_baton,
+  apr_pool_t *result_pool)
 {
-  *b = apr_palloc(pool, sizeof(**b));
+  svn_cmdline_prompt_baton_t *pb = apr_palloc(result_pool, sizeof(*pb));
+  pb->cancel_func = cancel_func;
+  pb->cancel_baton = cancel_baton;
+
+  *b = apr_palloc(result_pool, sizeof(**b));
   (*b)->accept_which = accept_which;
   (*b)->config = config;
   (*b)->editor_cmd = editor_cmd;
   (*b)->external_failed = FALSE;
   (*b)->pb = pb;
-  SVN_ERR(svn_dirent_get_absolute(&(*b)->path_prefix, "", pool));
+  SVN_ERR(svn_dirent_get_absolute(&(*b)->path_prefix, "", result_pool));
+
   return SVN_NO_ERROR;
 }
 
@@ -180,7 +196,7 @@ show_conflicts(const svn_wc_conflict_des
 static svn_error_t *
 open_editor(svn_boolean_t *performed_edit,
             const svn_wc_conflict_description2_t *desc,
-            svn_cl__conflict_baton_t *b,
+            svn_cl__interactive_conflict_baton_t *b,
             apr_pool_t *pool)
 {
   svn_error_t *err;
@@ -232,7 +248,7 @@ open_editor(svn_boolean_t *performed_edi
 static svn_error_t *
 launch_resolver(svn_boolean_t *performed_edit,
                 const svn_wc_conflict_description2_t *desc,
-                svn_cl__conflict_baton_t *b,
+                svn_cl__interactive_conflict_baton_t *b,
                 apr_pool_t *pool)
 {
   svn_error_t *err;
@@ -272,7 +288,7 @@ launch_resolver(svn_boolean_t *performed
 static svn_error_t *
 handle_text_conflict(svn_wc_conflict_result_t *result,
                      const svn_wc_conflict_description2_t *desc,
-                     svn_cl__conflict_baton_t *b,
+                     svn_cl__interactive_conflict_baton_t *b,
                      apr_pool_t *scratch_pool)
 {
   const char *answer;
@@ -533,7 +549,7 @@ handle_text_conflict(svn_wc_conflict_res
 static svn_error_t *
 handle_prop_conflict(svn_wc_conflict_result_t *result,
                      const svn_wc_conflict_description2_t *desc,
-                     svn_cl__conflict_baton_t *b,
+                     svn_cl__interactive_conflict_baton_t *b,
                      apr_pool_t *scratch_pool)
 {
   const char *answer;
@@ -610,13 +626,13 @@ handle_prop_conflict(svn_wc_conflict_res
 /* Implement svn_wc_conflict_resolver_func2_t; resolves based on
    --accept option if given, else by prompting. */
 svn_error_t *
-svn_cl__conflict_handler(svn_wc_conflict_result_t **result,
-                         const svn_wc_conflict_description2_t *desc,
-                         void *baton,
-                         apr_pool_t *result_pool,
-                         apr_pool_t *scratch_pool)
+svn_cl__conflict_func_interactive(svn_wc_conflict_result_t **result,
+                                  const svn_wc_conflict_description2_t *desc,
+                                  void *baton,
+                                  apr_pool_t *result_pool,
+                                  apr_pool_t *scratch_pool)
 {
-  svn_cl__conflict_baton_t *b = baton;
+  svn_cl__interactive_conflict_baton_t *b = baton;
   svn_error_t *err;
   apr_pool_t *subpool;
 
@@ -875,16 +891,77 @@ svn_cl__conflict_handler(svn_wc_conflict
   return SVN_NO_ERROR;
 }
 
+/* Implement svn_wc_conflict_resolver_func2_t; postpones all conflicts
+ * and remembers conflicted paths in BATON. */
 svn_error_t *
-svn_cl__resolve_conflicts(apr_array_header_t *targets,
-                          svn_depth_t depth,
-                          const svn_cl__opt_state_t *opt_state,
-                          svn_client_ctx_t *ctx,
-                          apr_pool_t *scratch_pool)
+svn_cl__conflict_func_postpone(svn_wc_conflict_result_t **result,
+                               const svn_wc_conflict_description2_t *desc,
+                               void *baton,
+                               apr_pool_t *result_pool,
+                               apr_pool_t *scratch_pool)
+{
+  apr_hash_t *conflicted_paths = baton;
+  
+  apr_hash_set(conflicted_paths,
+               apr_pstrdup(apr_hash_pool_get(conflicted_paths),
+                           desc->local_abspath),
+               APR_HASH_KEY_STRING, "");
+
+  *result = svn_wc_create_conflict_result(svn_wc_conflict_choose_postpone,
+                                          NULL, result_pool);
+  return SVN_NO_ERROR;
+}
+
+void *
+svn_cl__get_conflict_func_postpone_baton(apr_pool_t *result_pool)
+{
+  return apr_hash_make(result_pool);
+}
+
+static apr_array_header_t *
+get_postponed_conflicted_paths(void *baton, apr_pool_t *result_pool)
 {
+  apr_hash_t *conflicted_paths = baton;
+  apr_array_header_t *sorted_array;
+  apr_array_header_t *result_array;
+  int i;
+
+  if (apr_hash_count(conflicted_paths) == 0)
+    return NULL;
+
+  sorted_array = svn_sort__hash(conflicted_paths,
+                                svn_sort_compare_items_as_paths,
+                                apr_hash_pool_get(conflicted_paths));
+  result_array = apr_array_make(result_pool, sorted_array->nelts,
+                                sizeof(const char *));
+  for (i = 0; i < sorted_array->nelts; i++)
+    {
+      svn_sort__item_t item;
+      
+      item = APR_ARRAY_IDX(sorted_array, i, svn_sort__item_t);
+      APR_ARRAY_PUSH(result_array, const char *) = apr_pstrdup(result_pool,
+                                                               item.key);
+    }
+
+  return result_array;
+}
+
+svn_error_t *
+svn_cl__resolve_postponed_conflicts(void *baton,
+                                    svn_depth_t depth,
+                                    svn_cl__accept_t accept_which,
+                                    const char *editor_cmd,
+                                    svn_client_ctx_t *ctx,
+                                    apr_pool_t *scratch_pool)
+{
+  apr_array_header_t *targets;
   int i;
   apr_pool_t *iterpool;
 
+  targets = get_postponed_conflicted_paths(baton, scratch_pool);
+  if (targets == NULL)
+    return SVN_NO_ERROR;
+
   iterpool = svn_pool_create(scratch_pool);
   for (i = 0; i < targets->nelts; i++)
     {
@@ -893,19 +970,25 @@ svn_cl__resolve_conflicts(apr_array_head
       const char *local_abspath;
       svn_wc_conflict_resolver_func2_t conflict_func2;
       void *conflict_baton2;
+      svn_cl__interactive_conflict_baton_t *b;
 
       svn_pool_clear(iterpool);
 
       SVN_ERR(svn_dirent_get_absolute(&local_abspath, target, iterpool));
 
-
       /* Store old state */
       conflict_func2 = ctx->conflict_func2;
       conflict_baton2 = ctx->conflict_baton2;
 
-      /* Store interactive resolver */
-      ctx->conflict_func2 = opt_state->conflict_func;
-      ctx->conflict_baton2 = opt_state->conflict_baton;
+      /* Set up the interactive resolver. */
+      ctx->conflict_func2 = svn_cl__conflict_func_interactive;
+      SVN_ERR(svn_cl__get_conflict_func_interactive_baton(&b, accept_which,
+                                                          ctx->config,
+                                                          editor_cmd,
+                                                          ctx->cancel_func,
+                                                          ctx->cancel_baton,
+                                                          scratch_pool));
+      ctx->conflict_baton2 = b;
 
       err = svn_client_resolve(local_abspath, depth,
                                svn_wc_conflict_choose_unspecified,

Modified: subversion/branches/auto-props-sdc/subversion/svn/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/svn/main.c?rev=1395146&r1=1395145&r2=1395146&view=diff
==============================================================================
--- subversion/branches/auto-props-sdc/subversion/svn/main.c (original)
+++ subversion/branches/auto-props-sdc/subversion/svn/main.c Sat Oct  6 18:31:28 2012
@@ -350,7 +350,7 @@ const apr_getopt_option_t svn_cl__option
                        )},
   /* end of diff options */
   {"allow-mixed-revisions", opt_allow_mixed_revisions, 0,
-                       N_("Allow merge into mixed-revision working copy.\n"
+                       N_("Allow operation on mixed-revision working copy.\n"
                        "                             "
                        "Use of this option is not recommended!\n"
                        "                             "
@@ -488,19 +488,16 @@ const svn_opt_subcommand_desc2_t svn_cl_
      opt_changelist, opt_keep_changelists, opt_include_externals} },
 
   { "copy", svn_cl__copy, {"cp"}, N_
-    ("Duplicate something in working copy or repository, remembering\n"
-     "history.\n"
+    ("Copy files and directories in a working copy or repository.\n"
      "usage: copy SRC[@REV]... DST\n"
      "\n"
-     "  When copying multiple sources, they will be added as children of DST,\n"
-     "  which must be a directory.\n"
-     "\n"
      "  SRC and DST can each be either a working copy (WC) path or URL:\n"
      "    WC  -> WC:   copy and schedule for addition (with history)\n"
      "    WC  -> URL:  immediately commit a copy of WC to URL\n"
      "    URL -> WC:   check out URL into WC, schedule for addition\n"
      "    URL -> URL:  complete server-side copy;  used to branch and tag\n"
-     "  All the SRCs must be of the same type.\n"
+     "  All the SRCs must be of the same type. When copying multiple sources,\n"
+     "  they will be added as children of DST, which must be a directory.\n"
      "\n"
      "  WARNING: For compatibility with previous versions of Subversion,\n"
      "  copies performed using two working copy paths (WC -> WC) will not\n"
@@ -1040,22 +1037,30 @@ const svn_opt_subcommand_desc2_t svn_cl_
   { "mergeinfo", svn_cl__mergeinfo, {0}, N_
     ("Display merge-related information.\n"
      "usage: 1. mergeinfo SOURCE[@REV] [TARGET[@REV]]\n"
-     "       2. mergeinfo --show-revs=merged SOURCE[@REV] [TARGET[@REV]]\n"
-     "       3. mergeinfo --show-revs=eligible SOURCE[@REV] [TARGET[@REV]]\n"
+     "       2. mergeinfo --show-revs=WHICH SOURCE[@REV] [TARGET[@REV]]\n"
      "\n"
-     "  1. Display the following information about merges between SOURCE and\n"
-     "     TARGET:\n"
-     "       the youngest common ancestor;\n"
-     "       the latest full merge in either direction, and thus the\n"
-     "         base that will be used for the next full merge.\n"
-     "  2. Print the revision numbers on SOURCE that have been merged to TARGET.\n"
-     "  3. Print the revision numbers on SOURCE that have NOT been merged to TARGET.\n"
-     "\n"
-     "  The default TARGET is the current working directory ('.').\n"
-     "  If --revision (-r) is provided, filter the displayed information to\n"
-     "  show only that which is associated with the revisions within the\n"
-     "  specified range.  Revision numbers, dates, and the 'HEAD' keyword are\n"
-     "  valid range values.\n"
+     "  1. Summarize the history of merging between SOURCE and TARGET. The graph\n"
+     "     shows, from left to right:\n"
+     "       the youngest common ancestor of the branches;\n"
+     "       the latest full merge in either direction, and thus the common base\n"
+     "         that will be used for the next automatic merge;\n"
+     "       the repository path and revision number of the tip of each branch.\n"
+     "\n"
+     "  2. Print the revision numbers on SOURCE that have been merged to TARGET\n"
+     "     (with --show-revs=merged), or that have not been merged to TARGET\n"
+     "     (with --show-revs=eligible). Print only revisions in which there was\n"
+     "     at least one change in SOURCE.\n"
+     "\n"
+     "     If --revision (-r) is provided, filter the displayed information to\n"
+     "     show only that which is associated with the revisions within the\n"
+     "     specified range.  Revision numbers, dates, and the 'HEAD' keyword are\n"
+     "     valid range values.\n"
+     "\n"
+     "  SOURCE and TARGET are the source and target branch URLs, respectively.\n"
+     "  (If a WC path is given, the corresponding base URL is used.) The default\n"
+     "  TARGET is the current working directory ('.'). REV specifies the revision\n"
+     "  to be considered the tip of the branch; the default for SOURCE is HEAD,\n"
+     "  and the default for TARGET is HEAD for a URL or BASE for a WC path.\n"
      "\n"
      "  The depth can be 'empty' or 'infinity'; the default is 'empty'.\n"),
     {'r', 'R', opt_depth, opt_show_revs} },
@@ -1078,20 +1083,26 @@ const svn_opt_subcommand_desc2_t svn_cl_
     {'q', opt_parents, SVN_CL__LOG_MSG_OPTIONS} },
 
   { "move", svn_cl__move, {"mv", "rename", "ren"}, N_
-    ("Move and/or rename something in working copy or repository.\n"
+    ("Move (rename) an item in a working copy or repository.\n"
      "usage: move SRC... DST\n"
      "\n"
-     "  When moving multiple sources, they will be added as children of DST,\n"
-     "  which must be a directory.\n"
-     "\n"
-     "  Note:  this subcommand is equivalent to a 'copy' and 'delete'.\n"
-     "  Note:  the --revision option has no use and is deprecated.\n"
-     "\n"
      "  SRC and DST can both be working copy (WC) paths or URLs:\n"
-     "    WC  -> WC:   move and schedule for addition (with history)\n"
-     "    URL -> URL:  complete server-side rename.\n"
-     "  All the SRCs must be of the same type.\n"),
-    {'r', 'q', opt_force, opt_parents, SVN_CL__LOG_MSG_OPTIONS} },
+     "    WC  -> WC:  move an item in a working copy, as a local change to\n"
+     "                be committed later (with or without further changes)\n"
+     "    URL -> URL: move an item in the repository directly, immediately\n"
+     "                creating a new revision in the repository\n"
+     "  All the SRCs must be of the same type. When moving multiple sources,\n"
+     "  they will be added as children of DST, which must be a directory.\n"
+     "\n"
+     "  SRC and DST of WC -> WC moves must be committed in the same revision.\n"
+     "  Furthermore, WC -> WC moves will refuse to move a mixed-revision subtree.\n"
+     "  To avoid unnecessary conflicts, it is recommended to run 'svn update'\n"
+     "  to update the subtree to a single revision before moving it.\n"
+     "  The --allow-mixed-revisions option is provided for backward compatibility.\n"
+     "\n"
+     "  The --revision option has no use and is deprecated.\n"),
+    {'r', 'q', opt_force, opt_parents, opt_allow_mixed_revisions, 
+     SVN_CL__LOG_MSG_OPTIONS} },
 
   { "patch", svn_cl__patch, {0}, N_
     ("Apply a patch to a working copy.\n"
@@ -2657,60 +2668,53 @@ sub_main(int argc, const char *argv[], a
 
   ctx->auth_baton = ab;
 
-  /* Set up conflict resolution callback. */
-  SVN_INT_ERR(svn_config_get_bool(cfg_config, &interactive_conflicts,
-                                  SVN_CONFIG_SECTION_MISCELLANY,
-                                  SVN_CONFIG_OPTION_INTERACTIVE_CONFLICTS,
-                                  TRUE));  /* ### interactivity on by default.
-                                                  we can change this. */
-
-  /* The new svn behavior is to postpone everything until after the operation
-     completed */
+  /* Install the default conflict handler which postpones all conflicts
+   * and remembers the list of conflicted paths to be resolved later.
+   * This is overridden only within the 'resolve' subcommand. */
   ctx->conflict_func = NULL;
   ctx->conflict_baton = NULL;
-  ctx->conflict_func2 = NULL;
-  ctx->conflict_baton2 = NULL;
+  ctx->conflict_func2 = svn_cl__conflict_func_postpone;
+  ctx->conflict_baton2 = svn_cl__get_conflict_func_postpone_baton(pool);
 
-  if ((opt_state.accept_which == svn_cl__accept_unspecified
-       && (!interactive_conflicts || opt_state.non_interactive))
-      || opt_state.accept_which == svn_cl__accept_postpone)
-    {
-      /* If no --accept option at all and we're non-interactive, we're
-         leaving the conflicts behind, so don't need the callback.  Same if
-         the user said to postpone. */
-      opt_state.conflict_func = NULL;
-      opt_state.conflict_baton = NULL;
-    }
-  else
+  if (opt_state.non_interactive)
     {
-      svn_cl__conflict_baton_t * conflict_baton2;
-      svn_cmdline_prompt_baton_t *pb = apr_palloc(pool, sizeof(*pb));
-      pb->cancel_func = ctx->cancel_func;
-      pb->cancel_baton = ctx->cancel_baton;
-
-      if (opt_state.non_interactive)
-        {
-          if (opt_state.accept_which == svn_cl__accept_edit)
-            return EXIT_ERROR
-              (svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
-                                 _("--accept=%s incompatible with"
-                                   " --non-interactive"), SVN_CL__ACCEPT_EDIT));
-          if (opt_state.accept_which == svn_cl__accept_launch)
-            return EXIT_ERROR
-              (svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
-                                 _("--accept=%s incompatible with"
-                                   " --non-interactive"),
-                                 SVN_CL__ACCEPT_LAUNCH));
-        }
+      if (opt_state.accept_which == svn_cl__accept_edit)
+        return EXIT_ERROR(
+                 svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                                   _("--accept=%s incompatible with"
+                                     " --non-interactive"),
+                                   SVN_CL__ACCEPT_EDIT));
+
+      if (opt_state.accept_which == svn_cl__accept_launch)
+        return EXIT_ERROR(
+                 svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                                   _("--accept=%s incompatible with"
+                                     " --non-interactive"),
+                                   SVN_CL__ACCEPT_LAUNCH));
+
+      /* The default action when we're non-interactive is to postpone
+       * conflict resolution. */
+      if (opt_state.accept_which == svn_cl__accept_unspecified)
+        opt_state.accept_which = svn_cl__accept_postpone;
+    }
+
+  /* Check whether interactive conflict resolution is disabled by
+   * the configuration file. If no --accept option was specified
+   * we postpone all conflicts in this case. */
+  SVN_INT_ERR(svn_config_get_bool(cfg_config, &interactive_conflicts,
+                                  SVN_CONFIG_SECTION_MISCELLANY,
+                                  SVN_CONFIG_OPTION_INTERACTIVE_CONFLICTS,
+                                  TRUE));
+  if (!interactive_conflicts)
+    {
+      /* Make 'svn resolve' non-interactive. */
+      if (subcommand->cmd_func == svn_cl__resolve)
+        opt_state.non_interactive = TRUE;
 
-      opt_state.conflict_func = svn_cl__conflict_handler;
-      SVN_INT_ERR(svn_cl__conflict_baton_make(&conflict_baton2,
-                                              opt_state.accept_which,
-                                              ctx->config,
-                                              opt_state.editor_cmd,
-                                              pb,
-                                              pool));
-      opt_state.conflict_baton = conflict_baton2;
+      /* We're not resolving conflicts interactively. If no --accept option
+       * was provided the default behaviour is to postpone all conflicts. */
+      if (opt_state.accept_which == svn_cl__accept_unspecified)
+        opt_state.accept_which = svn_cl__accept_postpone;
     }
 
   /* And now we finally run the subcommand. */

Modified: subversion/branches/auto-props-sdc/subversion/svn/merge-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/svn/merge-cmd.c?rev=1395146&r1=1395145&r2=1395146&view=diff
==============================================================================
--- subversion/branches/auto-props-sdc/subversion/svn/merge-cmd.c (original)
+++ subversion/branches/auto-props-sdc/subversion/svn/merge-cmd.c Sat Oct  6 18:31:28 2012
@@ -521,15 +521,12 @@ svn_cl__merge(apr_getopt_t *os,
   if (! opt_state->quiet)
     err = svn_cl__print_conflict_stats(ctx->notify_baton2, pool);
 
-  if (!err
-      && opt_state->conflict_func
-      && svn_cl__notifier_check_conflicts(ctx->notify_baton2))
-    {
-      err = svn_cl__resolve_conflicts(
-              svn_cl__notifier_get_conflicted_paths(ctx->notify_baton2, pool),
-              opt_state->depth, opt_state, ctx, pool);
-    }
-
+  if (!err)
+    err = svn_cl__resolve_postponed_conflicts(ctx->conflict_baton2,
+                                              opt_state->depth,
+                                              opt_state->accept_which,
+                                              opt_state->editor_cmd,
+                                              ctx, pool);
   if (merge_err)
     {
       if (merge_err->apr_err ==

Modified: subversion/branches/auto-props-sdc/subversion/svn/mergeinfo-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/svn/mergeinfo-cmd.c?rev=1395146&r1=1395145&r2=1395146&view=diff
==============================================================================
--- subversion/branches/auto-props-sdc/subversion/svn/mergeinfo-cmd.c (original)
+++ subversion/branches/auto-props-sdc/subversion/svn/mergeinfo-cmd.c Sat Oct  6 18:31:28 2012
@@ -80,37 +80,30 @@ mergeinfo_diagram(svn_client__pathrev_t 
   int col_width[COLS];
   int row, col;
 
-  /* The YCA (that is, the branching point) */
-  g[0][0] = apr_psprintf(pool, "  %-8ld", yca->rev);
-  g[1][0] =     "  |       ";
+  /* The YCA (that is, the branching point).  And an ellipsis, because we
+   * don't show information about earlier merges */
+  g[0][0] = apr_psprintf(pool, "  %-8ld  ", yca->rev);
+  g[1][0] =     "  |         ";
   if (strcmp(yca->url, right->url) == 0)
     {
-      g[2][0] = "----------";
-      g[3][0] = "   \\      ";
-      g[4][0] = "    \\     ";
-      g[5][0] = "     -----";
+      g[2][0] = "-------| |--";
+      g[3][0] = "   \\        ";
+      g[4][0] = "    \\       ";
+      g[5][0] = "     --| |--";
     }
   else if (strcmp(yca->url, target->url) == 0)
     {
-      g[2][0] = "     -----";
-      g[3][0] = "    /     ";
-      g[4][0] = "   /      ";
-      g[5][0] = "----------";
+      g[2][0] = "     --| |--";
+      g[3][0] = "    /       ";
+      g[4][0] = "   /        ";
+      g[5][0] = "-------| |--";
     }
   else
     {
-      g[2][0] = "     -----";
-      g[3][0] = "... /     ";
-      g[4][0] = "    \\     ";
-      g[5][0] = "     -----";
-    }
-
-  /* An ellipsis, because we don't show information about earlier merges */
-    {
-      g[2][1] = "| ... |---";
-      g[3][1] = "          ";
-      g[4][1] = "          ";
-      g[5][1] = "| ... |---";
+      g[2][0] = "     --| |--";
+      g[3][0] = "... /       ";
+      g[4][0] = "    \\       ";
+      g[5][0] = "     --| |--";
     }
 
   /* The last full merge */
@@ -149,8 +142,8 @@ mergeinfo_diagram(svn_client__pathrev_t 
       g[4][3] = "        ";
       g[5][3] = "-       ";
       g[6][3] = "|       ";
-      g[7][3] = target_is_wc ? apr_psprintf(pool, "%-8ld", target->rev)
-                             : "WC      ";
+      g[7][3] = target_is_wc ? "WC      "
+                             : apr_psprintf(pool, "%-8ld", target->rev);
     }
 
   /* Find the width of each column, so we know how to print blank cells */
@@ -166,9 +159,9 @@ mergeinfo_diagram(svn_client__pathrev_t 
 
   /* Column headings */
   SVN_ERR(svn_cmdline_fputs(
-            _("    youngest          last               repos.\n"
-              "    common            full     tip of    path of\n"
-              "    ancestor          merge    branch    branch\n"
+            _("    youngest  last               repos.\n"
+              "    common    full     tip of    path of\n"
+              "    ancestor  merge    branch    branch\n"
               "\n"),
             stdout, pool));
 
@@ -216,7 +209,7 @@ mergeinfo_summary(
   svn_client__pathrev_t *yca, *base, *right, *target;
   svn_boolean_t target_is_wc, reintegrate_like;
 
-  target_is_wc = svn_path_is_url(target_path_or_url)
+  target_is_wc = (! svn_path_is_url(target_path_or_url))
                  && (target_revision->kind == svn_opt_revision_unspecified
                      || target_revision->kind == svn_opt_revision_working);
   if (target_is_wc)
@@ -263,20 +256,15 @@ svn_cl__mergeinfo(apr_getopt_t *os,
                                                       opt_state->targets,
                                                       ctx, FALSE, pool));
 
-  /* We expect a single source URL followed by a single target --
-     nothing more, nothing less. */
+  /* Parse the arguments: SOURCE[@REV] optionally followed by TARGET[@REV]. */
   if (targets->nelts < 1)
     return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
                             _("Not enough arguments given"));
   if (targets->nelts > 2)
     return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
                             _("Too many arguments given"));
-
-  /* Parse the SOURCE-URL[@REV] argument. */
   SVN_ERR(svn_opt_parse_path(&src_peg_revision, &source,
                              APR_ARRAY_IDX(targets, 0, const char *), pool));
-
-  /* Parse the TARGET[@REV] argument (if provided). */
   if (targets->nelts == 2)
     {
       SVN_ERR(svn_opt_parse_path(&tgt_peg_revision, &target,
@@ -290,11 +278,15 @@ svn_cl__mergeinfo(apr_getopt_t *os,
     }
 
   /* If no peg-rev was attached to the source URL, assume HEAD. */
+  /* ### But what if SOURCE is a WC path not a URL -- shouldn't we then use
+   *     BASE (but not WORKING: that would be inconsistent with 'svn merge')? */
   if (src_peg_revision.kind == svn_opt_revision_unspecified)
     src_peg_revision.kind = svn_opt_revision_head;
 
   /* If no peg-rev was attached to a URL target, then assume HEAD; if
      no peg-rev was attached to a non-URL target, then assume BASE. */
+  /* ### But we would like to be able to examine a working copy with an
+         uncommitted merge in it, so change this to use WORKING not BASE? */
   if (tgt_peg_revision.kind == svn_opt_revision_unspecified)
     {
       if (svn_path_is_url(target))

Modified: subversion/branches/auto-props-sdc/subversion/svn/move-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/svn/move-cmd.c?rev=1395146&r1=1395145&r2=1395146&view=diff
==============================================================================
--- subversion/branches/auto-props-sdc/subversion/svn/move-cmd.c (original)
+++ subversion/branches/auto-props-sdc/subversion/svn/move-cmd.c Sat Oct  6 18:31:28 2012
@@ -84,8 +84,10 @@ svn_cl__move(apr_getopt_t *os,
 
   SVN_ERR(svn_cl__eat_peg_revisions(&targets, targets, pool));
 
-  err = svn_client_move6(targets, dst_path,
-                         TRUE, opt_state->parents, opt_state->revprop_table,
+  err = svn_client_move7(targets, dst_path,
+                         TRUE, opt_state->parents,
+                         opt_state->allow_mixed_rev,
+                         opt_state->revprop_table,
                          (opt_state->quiet ? NULL : svn_cl__print_commit_info),
                          NULL, ctx, pool);
 

Modified: subversion/branches/auto-props-sdc/subversion/svn/notify.c
URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/svn/notify.c?rev=1395146&r1=1395145&r2=1395146&view=diff
==============================================================================
--- subversion/branches/auto-props-sdc/subversion/svn/notify.c (original)
+++ subversion/branches/auto-props-sdc/subversion/svn/notify.c Sat Oct  6 18:31:28 2012
@@ -58,7 +58,6 @@ struct notify_baton
   unsigned int prop_conflicts;
   unsigned int tree_conflicts;
   unsigned int skipped_paths;
-  apr_hash_t *conflicted_paths;
 
   /* The cwd, for use in decomposing absolute paths. */
   const char *path_prefix;
@@ -102,16 +101,6 @@ svn_cl__print_conflict_stats(void *notif
   return SVN_NO_ERROR;
 }
 
-/* Add a conflicted path to the list of conflicted paths stored
- * in the notify baton. */
-static void
-add_conflicted_path(struct notify_baton *nb, const char *path)
-{
-  apr_hash_set(nb->conflicted_paths,
-               apr_pstrdup(apr_hash_pool_get(nb->conflicted_paths), path),
-               APR_HASH_KEY_STRING, "");
-}
-
 /* This implements `svn_wc_notify_func2_t'.
  * NOTE: This function can't fail, so we just ignore any print errors. */
 static void
@@ -231,7 +220,6 @@ notify(void *baton, const svn_wc_notify_
       if (n->content_state == svn_wc_notify_state_conflicted)
         {
           nb->text_conflicts++;
-          add_conflicted_path(nb, n->path);
           if ((err = svn_cmdline_printf(pool, "C    %s\n", path_local)))
             goto print_error;
         }
@@ -247,7 +235,6 @@ notify(void *baton, const svn_wc_notify_
       if (n->content_state == svn_wc_notify_state_conflicted)
         {
           nb->text_conflicts++;
-          add_conflicted_path(nb, n->path);
           statchar_buf[0] = 'C';
         }
       else
@@ -256,7 +243,6 @@ notify(void *baton, const svn_wc_notify_
       if (n->prop_state == svn_wc_notify_state_conflicted)
         {
           nb->prop_conflicts++;
-          add_conflicted_path(nb, n->path);
           statchar_buf[1] = 'C';
         }
       else if (n->prop_state == svn_wc_notify_state_merged)
@@ -323,7 +309,6 @@ notify(void *baton, const svn_wc_notify_
         if (n->content_state == svn_wc_notify_state_conflicted)
           {
             nb->text_conflicts++;
-            add_conflicted_path(nb, n->path);
             statchar_buf[0] = 'C';
           }
         else if (n->kind == svn_node_file)
@@ -337,7 +322,6 @@ notify(void *baton, const svn_wc_notify_
         if (n->prop_state == svn_wc_notify_state_conflicted)
           {
             nb->prop_conflicts++;
-            add_conflicted_path(nb, n->path);
             statchar_buf[1] = 'C';
           }
         else if (n->prop_state == svn_wc_notify_state_changed)
@@ -531,7 +515,6 @@ notify(void *baton, const svn_wc_notify_
         if (n->content_state == svn_wc_notify_state_conflicted)
           {
             nb->text_conflicts++;
-            add_conflicted_path(nb, n->path);
             statchar_buf[0] = 'C';
           }
         else if (n->kind == svn_node_file)
@@ -545,7 +528,6 @@ notify(void *baton, const svn_wc_notify_
         if (n->prop_state == svn_wc_notify_state_conflicted)
           {
             nb->prop_conflicts++;
-            add_conflicted_path(nb, n->path);
             statchar_buf[1] = 'C';
           }
         else if (n->prop_state == svn_wc_notify_state_merged)
@@ -923,7 +905,6 @@ notify(void *baton, const svn_wc_notify_
 
     case svn_wc_notify_tree_conflict:
       nb->tree_conflicts++;
-      add_conflicted_path(nb, n->path);
       if ((err = svn_cmdline_printf(pool, "   C %s\n", path_local)))
         goto print_error;
       break;
@@ -1064,7 +1045,6 @@ svn_cl__get_notifier(svn_wc_notify_func2
   nb->prop_conflicts = 0;
   nb->tree_conflicts = 0;
   nb->skipped_paths = 0;
-  nb->conflicted_paths = apr_hash_make(pool);
   SVN_ERR(svn_dirent_get_absolute(&nb->path_prefix, "", pool));
 
   *notify_func_p = notify;
@@ -1112,36 +1092,3 @@ svn_cl__check_externals_failed_notify_wr
   if (nwb->wrapped_func)
     nwb->wrapped_func(nwb->wrapped_baton, n, pool);
 }
-
-svn_boolean_t
-svn_cl__notifier_check_conflicts(void *baton)
-{
-  struct notify_baton *nb = baton;
-
-  return (nb->text_conflicts || nb->prop_conflicts || nb->tree_conflicts);
-}
-
-apr_array_header_t *
-svn_cl__notifier_get_conflicted_paths(void *baton, apr_pool_t *result_pool)
-{
-  struct notify_baton *nb = baton;
-  apr_array_header_t *sorted_array;
-  apr_array_header_t *result_array;
-  int i;
-
-  sorted_array = svn_sort__hash(nb->conflicted_paths,
-                                svn_sort_compare_items_as_paths,
-                                apr_hash_pool_get(nb->conflicted_paths));
-  result_array = apr_array_make(result_pool, sorted_array->nelts,
-                                sizeof(const char *));
-  for (i = 0; i < sorted_array->nelts; i++)
-    {
-      svn_sort__item_t item;
-      
-      item = APR_ARRAY_IDX(sorted_array, i, svn_sort__item_t);
-      APR_ARRAY_PUSH(result_array, const char *) = apr_pstrdup(result_pool,
-                                                               item.key);
-    }
-
-  return result_array;
-}

Modified: subversion/branches/auto-props-sdc/subversion/svn/resolve-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/svn/resolve-cmd.c?rev=1395146&r1=1395145&r2=1395146&view=diff
==============================================================================
--- subversion/branches/auto-props-sdc/subversion/svn/resolve-cmd.c (original)
+++ subversion/branches/auto-props-sdc/subversion/svn/resolve-cmd.c Sat Oct  6 18:31:28 2012
@@ -57,6 +57,7 @@ svn_cl__resolve(apr_getopt_t *os,
   svn_boolean_t had_error = FALSE;
   svn_wc_conflict_resolver_func2_t conflict_func2;
   void *conflict_baton2;
+  svn_cl__interactive_conflict_baton_t *b;
 
   switch (opt_state->accept_which)
     {
@@ -79,7 +80,7 @@ svn_cl__resolve(apr_getopt_t *os,
       conflict_choice = svn_wc_conflict_choose_mine_full;
       break;
     case svn_cl__accept_unspecified:
-      if (opt_state->conflict_func == NULL)
+      if (opt_state->non_interactive)
         return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
                                 _("missing --accept option"));
       conflict_choice = svn_wc_conflict_choose_unspecified;
@@ -112,9 +113,16 @@ svn_cl__resolve(apr_getopt_t *os,
   conflict_func2 = ctx->conflict_func2;
   conflict_baton2 = ctx->conflict_baton2;
 
-  /* Store interactive resolver */
-  ctx->conflict_func2 = opt_state->conflict_func;
-  ctx->conflict_baton2 = opt_state->conflict_baton;
+  /* This subcommand always uses the interactive resolver function. */
+  ctx->conflict_func2 = svn_cl__conflict_func_interactive;
+  SVN_ERR(svn_cl__get_conflict_func_interactive_baton(&b,
+                                                      opt_state->accept_which,
+                                                      ctx->config,
+                                                      opt_state->editor_cmd,
+                                                      ctx->cancel_func,
+                                                      ctx->cancel_baton,
+                                                      scratch_pool));
+  ctx->conflict_baton2 = b;
 
   iterpool = svn_pool_create(scratch_pool);
   for (i = 0; i < targets->nelts; i++)

Modified: subversion/branches/auto-props-sdc/subversion/svn/switch-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/svn/switch-cmd.c?rev=1395146&r1=1395145&r2=1395146&view=diff
==============================================================================
--- subversion/branches/auto-props-sdc/subversion/svn/switch-cmd.c (original)
+++ subversion/branches/auto-props-sdc/subversion/svn/switch-cmd.c Sat Oct  6 18:31:28 2012
@@ -192,16 +192,11 @@ svn_cl__switch(apr_getopt_t *os,
         return svn_error_compose_create(externals_err, err);
     }
 
-  if (opt_state->conflict_func
-      && svn_cl__notifier_check_conflicts(nwb.wrapped_baton))
-    {
-      err = svn_cl__resolve_conflicts(
-              svn_cl__notifier_get_conflicted_paths(nwb.wrapped_baton,
-                                                    scratch_pool),
-              depth, opt_state, ctx, scratch_pool);
-      if (err)
-        return svn_error_compose_create(externals_err, err);
-    }
+  err = svn_cl__resolve_postponed_conflicts(ctx->conflict_baton2,
+                                            opt_state->depth,
+                                            opt_state->accept_which,
+                                            opt_state->editor_cmd,
+                                            ctx, scratch_pool);
 
   return svn_error_compose_create(externals_err, err);
 }

Modified: subversion/branches/auto-props-sdc/subversion/svn/update-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/svn/update-cmd.c?rev=1395146&r1=1395145&r2=1395146&view=diff
==============================================================================
--- subversion/branches/auto-props-sdc/subversion/svn/update-cmd.c (original)
+++ subversion/branches/auto-props-sdc/subversion/svn/update-cmd.c Sat Oct  6 18:31:28 2012
@@ -110,8 +110,6 @@ svn_cl__update(apr_getopt_t *os,
   svn_boolean_t depth_is_sticky;
   struct svn_cl__check_externals_failed_notify_baton nwb;
   apr_array_header_t *result_revs;
-  svn_wc_conflict_resolver_func2_t conflict_func2 = ctx->conflict_func2;
-  void *conflict_baton2 = ctx->conflict_baton2;
   svn_error_t *err = SVN_NO_ERROR;
   svn_error_t *externals_err = SVN_NO_ERROR;
 
@@ -189,18 +187,11 @@ svn_cl__update(apr_getopt_t *os,
         return svn_error_compose_create(externals_err, err);
     }
 
-  if (opt_state->conflict_func
-      && svn_cl__notifier_check_conflicts(nwb.wrapped_baton))
-    {
-      ctx->conflict_func2 = conflict_func2;
-      ctx->conflict_baton2 = conflict_baton2;
-      err = svn_cl__resolve_conflicts(
-              svn_cl__notifier_get_conflicted_paths(nwb.wrapped_baton,
-                                                    scratch_pool),
-              depth, opt_state, ctx, scratch_pool);
-      if (err)
-        return svn_error_compose_create(externals_err, err);
-    }
+  err = svn_cl__resolve_postponed_conflicts(ctx->conflict_baton2,
+                                            opt_state->depth,
+                                            opt_state->accept_which,
+                                            opt_state->editor_cmd,
+                                            ctx, scratch_pool);
 
   return svn_error_compose_create(externals_err, err);
 }

Modified: subversion/branches/auto-props-sdc/subversion/svndumpfilter/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/svndumpfilter/main.c?rev=1395146&r1=1395145&r2=1395146&view=diff
==============================================================================
--- subversion/branches/auto-props-sdc/subversion/svndumpfilter/main.c (original)
+++ subversion/branches/auto-props-sdc/subversion/svndumpfilter/main.c Sat Oct  6 18:31:28 2012
@@ -1526,6 +1526,8 @@ main(int argc, const char *argv[])
         {
           svn_stringbuf_t *buffer, *buffer_utf8;
           const char *utf8_targets_file;
+          apr_array_header_t *targets = apr_array_make(pool, 0,
+                                                       sizeof(const char *));
 
           /* We need to convert to UTF-8 now, even before we divide
              the targets into an array, because otherwise we wouldn't
@@ -1538,10 +1540,18 @@ main(int argc, const char *argv[])
                                                pool));
           SVN_INT_ERR(svn_utf_stringbuf_to_utf8(&buffer_utf8, buffer, pool));
 
-          opt_state.prefixes = apr_array_append(pool,
-                                    svn_cstring_split(buffer_utf8->data, "\n\r",
-                                                      TRUE, pool),
-                                    opt_state.prefixes);
+          targets = apr_array_append(pool,
+                         svn_cstring_split(buffer_utf8->data, "\n\r",
+                                           TRUE, pool),
+                         targets);
+
+          for (i = 0; i < targets->nelts; i++)
+            {
+              const char *prefix = APR_ARRAY_IDX(targets, i, const char *);
+              if (prefix[0] != '/')
+                prefix = apr_pstrcat(pool, "/", prefix, (char *)NULL);
+              APR_ARRAY_PUSH(opt_state.prefixes, const char *) = prefix;
+            }
         }
 
       if (apr_is_empty_array(opt_state.prefixes))



Mime
View raw message