subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1425612 [1/2] - in /subversion/branches/tweak-build-take-two: ./ build/ subversion/include/private/ subversion/libsvn_client/ subversion/libsvn_fs/ subversion/libsvn_subr/ subversion/libsvn_wc/ subversion/mod_authz_svn/ subversion/mod_dav_...
Date Mon, 24 Dec 2012 09:49:04 GMT
Author: brane
Date: Mon Dec 24 09:49:03 2012
New Revision: 1425612

URL: http://svn.apache.org/viewvc?rev=1425612&view=rev
Log:
Sync tweak-build-take-two branch with trunk at r1425608.

Modified:
    subversion/branches/tweak-build-take-two/   (props changed)
    subversion/branches/tweak-build-take-two/build/run_tests.py
    subversion/branches/tweak-build-take-two/get-deps.sh
    subversion/branches/tweak-build-take-two/subversion/include/private/svn_cmdline_private.h
    subversion/branches/tweak-build-take-two/subversion/libsvn_client/merge.c
    subversion/branches/tweak-build-take-two/subversion/libsvn_client/repos_diff.c
    subversion/branches/tweak-build-take-two/subversion/libsvn_fs/editor.c
    subversion/branches/tweak-build-take-two/subversion/libsvn_subr/cmdline.c
    subversion/branches/tweak-build-take-two/subversion/libsvn_wc/wc-metadata.sql
    subversion/branches/tweak-build-take-two/subversion/libsvn_wc/wc_db.c
    subversion/branches/tweak-build-take-two/subversion/libsvn_wc/wc_db_update_move.c
    subversion/branches/tweak-build-take-two/subversion/libsvn_wc/workqueue.c
    subversion/branches/tweak-build-take-two/subversion/libsvn_wc/workqueue.h
    subversion/branches/tweak-build-take-two/subversion/mod_authz_svn/mod_authz_svn.c
    subversion/branches/tweak-build-take-two/subversion/mod_dav_svn/mod_dav_svn.c
    subversion/branches/tweak-build-take-two/subversion/svn/cl.h
    subversion/branches/tweak-build-take-two/subversion/svn/conflict-callbacks.c
    subversion/branches/tweak-build-take-two/subversion/svn/file-merge.c
    subversion/branches/tweak-build-take-two/subversion/svn/propedit-cmd.c
    subversion/branches/tweak-build-take-two/subversion/svn/util.c
    subversion/branches/tweak-build-take-two/subversion/svnmucc/svnmucc.c
    subversion/branches/tweak-build-take-two/subversion/svnrdump/dump_editor.c
    subversion/branches/tweak-build-take-two/subversion/tests/cmdline/merge_authz_tests.py
    subversion/branches/tweak-build-take-two/subversion/tests/cmdline/merge_reintegrate_tests.py
    subversion/branches/tweak-build-take-two/subversion/tests/cmdline/merge_tests.py
    subversion/branches/tweak-build-take-two/subversion/tests/cmdline/merge_tree_conflict_tests.py
    subversion/branches/tweak-build-take-two/subversion/tests/cmdline/svnmucc_tests.py
    subversion/branches/tweak-build-take-two/subversion/tests/cmdline/svntest/main.py
    subversion/branches/tweak-build-take-two/subversion/tests/cmdline/update_tests.py
    subversion/branches/tweak-build-take-two/subversion/tests/cmdline/upgrade_tests.py
    subversion/branches/tweak-build-take-two/subversion/tests/libsvn_repos/repos-test.c

Propchange: subversion/branches/tweak-build-take-two/
------------------------------------------------------------------------------
  Merged /subversion/branches/issue-4116-dev:r1424719-1425040
  Merged /subversion/trunk:r1424861-1425608

Modified: subversion/branches/tweak-build-take-two/build/run_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/tweak-build-take-two/build/run_tests.py?rev=1425612&r1=1425611&r2=1425612&view=diff
==============================================================================
--- subversion/branches/tweak-build-take-two/build/run_tests.py (original)
+++ subversion/branches/tweak-build-take-two/build/run_tests.py Mon Dec 24 09:49:03 2012
@@ -565,7 +565,8 @@ class TestHarness:
     progdir, progbase = os.path.split(prog)
     if self.log:
       # Using write here because we don't want even a trailing space
-      test_info = '[%02d/%d] %s' % (test_nr + 1, total_tests, progbase)
+      test_info = '[%s/%d] %s' % (str(test_nr + 1).zfill(len(str(total_tests))),
+                                  total_tests, progbase)
       if self.list_tests:
         sys.stdout.write('Listing tests in %s' % (test_info, ))
       else:

Modified: subversion/branches/tweak-build-take-two/get-deps.sh
URL: http://svn.apache.org/viewvc/subversion/branches/tweak-build-take-two/get-deps.sh?rev=1425612&r1=1425611&r2=1425612&view=diff
==============================================================================
--- subversion/branches/tweak-build-take-two/get-deps.sh (original)
+++ subversion/branches/tweak-build-take-two/get-deps.sh Mon Dec 24 09:49:03 2012
@@ -115,7 +115,7 @@ get_deps() {
 
     if [ $# -gt 0 ]; then
       for target; do
-        if [ "$target" -ne "deps" ]; then
+        if [ "$target" != "deps" ]; then
           get_$target || usage
         else
           usage

Modified: subversion/branches/tweak-build-take-two/subversion/include/private/svn_cmdline_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/tweak-build-take-two/subversion/include/private/svn_cmdline_private.h?rev=1425612&r1=1425611&r2=1425612&view=diff
==============================================================================
--- subversion/branches/tweak-build-take-two/subversion/include/private/svn_cmdline_private.h (original)
+++ subversion/branches/tweak-build-take-two/subversion/include/private/svn_cmdline_private.h Mon Dec 24 09:49:03 2012
@@ -28,6 +28,7 @@
 #define SVN_CMDLINE_PRIVATE_H
 
 #include <apr_pools.h>
+#include <apr_hash.h>
 
 #include "svn_string.h"
 #include "svn_error.h"
@@ -143,6 +144,61 @@ svn_cmdline__print_xml_prop_hash(svn_str
                                  svn_boolean_t inherited_props,
                                  apr_pool_t *pool);
 
+
+/* Search for a text editor command in standard environment variables,
+   and invoke it to edit PATH.  Use POOL for all allocations.
+
+   If EDITOR_CMD is not NULL, it is the name of the external editor
+   command to use, overriding anything else that might determine the
+   editor.
+
+   CONFIG is a hash of svn_config_t * items keyed on a configuration
+   category (SVN_CONFIG_CATEGORY_CONFIG et al), and may be NULL.  */
+svn_error_t *
+svn_cmdline__edit_file_externally(const char *path,
+                                  const char *editor_cmd,
+                                  apr_hash_t *config,
+                                  apr_pool_t *pool);
+
+/* Search for a text editor command in standard environment variables,
+   and invoke it to edit CONTENTS (using a temporary file created in
+   directory BASE_DIR).  Return the new contents in *EDITED_CONTENTS,
+   or set *EDITED_CONTENTS to NULL if no edit was performed.
+
+   If EDITOR_CMD is not NULL, it is the name of the external editor
+   command to use, overriding anything else that might determine the
+   editor.
+
+   If TMPFILE_LEFT is NULL, the temporary file will be destroyed.
+   Else, the file will be left on disk, and its path returned in
+   *TMPFILE_LEFT.
+
+   CONFIG is a hash of svn_config_t * items keyed on a configuration
+   category (SVN_CONFIG_CATEGORY_CONFIG et al), and may be NULL.
+
+   If AS_TEXT is TRUE, recode CONTENTS and convert to native eol-style before
+   editing and back again afterwards.  In this case, ENCODING determines the
+   encoding used during editing.  If non-NULL, use the named encoding, else
+   use the system encoding.  If AS_TEXT is FALSE, don't do any translation.
+   In that case, ENCODING is ignored.
+
+   Use POOL for all allocations.  Use PREFIX as the prefix for the
+   temporary file used by the editor.
+
+   If return error, *EDITED_CONTENTS is not touched. */
+svn_error_t *
+svn_cmdline__edit_string_externally(svn_string_t **edited_contents,
+                                    const char **tmpfile_left,
+                                    const char *editor_cmd,
+                                    const char *base_dir,
+                                    const svn_string_t *contents,
+                                    const char *prefix,
+                                    apr_hash_t *config,
+                                    svn_boolean_t as_text,
+                                    const char *encoding,
+                                    apr_pool_t *pool);
+
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */

Modified: subversion/branches/tweak-build-take-two/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/tweak-build-take-two/subversion/libsvn_client/merge.c?rev=1425612&r1=1425611&r2=1425612&view=diff
==============================================================================
--- subversion/branches/tweak-build-take-two/subversion/libsvn_client/merge.c (original)
+++ subversion/branches/tweak-build-take-two/subversion/libsvn_client/merge.c Mon Dec 24 09:49:03 2012
@@ -313,6 +313,23 @@ typedef struct merge_cmd_baton_t {
      meet the criteria or DRY_RUN is true. */
   apr_hash_t *paths_with_deleted_mergeinfo;
 
+  /* The list of absolute skipped paths, which should be examined and
+     cleared after each invocation of the callback.  The paths
+     are absolute.  Is NULL if MERGE_B->SOURCES_ANCESTRAL and
+     MERGE_B->REINTEGRATE_MERGE are both false. */
+  apr_hash_t *skipped_abspaths;
+
+  /* The list of absolute merged paths.  Unused if MERGE_B->SOURCES_ANCESTRAL
+     and MERGE_B->REINTEGRATE_MERGE are both false. */
+  apr_hash_t *merged_abspaths;
+
+  /* A hash of (const char *) absolute WC paths mapped to the same which
+     represent the roots of subtrees added by the merge. */
+  apr_hash_t *added_abspaths;
+
+  /* A list of tree conflict victim absolute paths which may be NULL. */
+  apr_hash_t *tree_conflicted_abspaths;
+
   /* The diff3_cmd in ctx->config, if any, else null.  We could just
      extract this as needed, but since more than one caller uses it,
      we just set it up when this baton is created. */
@@ -504,7 +521,7 @@ dry_run_added_parent_p(const merge_cmd_b
                        apr_pool_t *scratch_pool)
 {
   const char *abspath = local_abspath;
-  int i;
+  apr_size_t i;
 
   if (!merge_b->dry_run)
     return FALSE;
@@ -1920,6 +1937,21 @@ merge_file_added(svn_wc_notify_state_t *
     {
     case svn_node_none:
       {
+        svn_node_kind_t parent_kind;
+
+        /* Does the parent exist on disk (vs missing). If no we should
+           report an obstruction. Or svn_wc_add_repos_file4() will just
+           do its work and the workqueue will create the missing dirs */
+        SVN_ERR(svn_io_check_path(
+                        svn_dirent_dirname(mine_abspath, scratch_pool), 
+                        &parent_kind, scratch_pool));
+
+        if (parent_kind != svn_node_dir)
+          {
+            *content_state = svn_wc_notify_state_obstructed;
+            return SVN_NO_ERROR;
+          }
+
         if (! merge_b->dry_run)
           {
             const char *copyfrom_url;
@@ -2013,8 +2045,6 @@ merge_file_added(svn_wc_notify_state_t *
                                                merge_b->ctx->cancel_func,
                                                merge_b->ctx->cancel_baton,
                                                scratch_pool));
-
-                /* ### delete 'yours' ? */
               }
           }
         if (content_state)
@@ -2723,9 +2753,45 @@ merge_dir_opened(svn_boolean_t *tree_con
 
   if (obstr_state != svn_wc_notify_state_inapplicable)
     {
-      if (skip_children)
-        *skip_children = TRUE;
-      /* But don't skip THIS, to allow a skip notification */
+      /* In Subversion <= 1.7 we always skipped descendants here */
+      if (obstr_state == svn_wc_notify_state_obstructed)
+        {
+          svn_boolean_t is_wcroot;
+
+          SVN_ERR(svn_wc_check_root(&is_wcroot, NULL, NULL,
+                                  merge_b->ctx->wc_ctx,
+                                  local_abspath, scratch_pool));
+
+          if (is_wcroot)
+            {
+              const char *skipped_path;
+
+              skipped_path = apr_pstrdup(apr_hash_pool_get(
+                                                  merge_b->skipped_abspaths),
+                                         local_abspath);
+
+              apr_hash_set(merge_b->skipped_abspaths, skipped_path,
+                           APR_HASH_KEY_STRING, skipped_path);
+
+              *skip = TRUE;
+              *skip_children = TRUE;
+
+              if (merge_b->ctx->notify_func2)
+                {
+                  svn_wc_notify_t *notify;
+
+                  notify = svn_wc_create_notify(
+                                        skipped_path,
+                                        svn_wc_notify_update_skip_obstruction,
+                                        scratch_pool);
+                  notify->kind = svn_node_dir;
+                  notify->content_state = obstr_state;
+                  merge_b->ctx->notify_func2(merge_b->ctx->notify_baton2,
+                                             notify, scratch_pool);
+                }
+            }
+        }
+
       return SVN_NO_ERROR;
     }
 
@@ -2747,8 +2813,7 @@ merge_dir_opened(svn_boolean_t *tree_con
           if (parent_depth != svn_depth_unknown &&
               parent_depth < svn_depth_immediates)
             {
-              if (skip_children)
-                *skip_children = TRUE;
+              /* In Subversion <= 1.7 we skipped descendants here */
               return SVN_NO_ERROR;
             }
         }
@@ -2845,25 +2910,6 @@ typedef struct notification_receiver_bat
   /* The number of operative notifications received. */
   apr_uint32_t nbr_operative_notifications;
 
-  /* The list of absolute merged paths.  Is NULL if MERGE_B->SOURCES_ANCESTRAL
-     and MERGE_B->REINTEGRATE_MERGE are both false. */
-  apr_hash_t *merged_abspaths;
-
-  /* The list of absolute skipped paths, which should be examined and
-     cleared after each invocation of the callback.  The paths
-     are absolute.  Is NULL if MERGE_B->SOURCES_ANCESTRAL and
-     MERGE_B->REINTEGRATE_MERGE are both false. */
-  apr_hash_t *skipped_abspaths;
-
-  /* A hash of (const char *) absolute WC paths mapped to the same which
-     represent the roots of subtrees added by the merge.  May be NULL. */
-  apr_hash_t *added_abspaths;
-
-  /* A list of tree conflict victim absolute paths which may be NULL.  Is NULL
-     if MERGE_B->SOURCES_ANCESTRAL and MERGE_B->REINTEGRATE_MERGE are both
-     false. */
-  apr_hash_t *tree_conflicted_abspaths;
-
   /* Flag indicating whether it is a single file merge or not. */
   svn_boolean_t is_single_file_merge;
 
@@ -3084,6 +3130,7 @@ notification_receiver(void *baton, const
                       apr_pool_t *pool)
 {
   notification_receiver_baton_t *notify_b = baton;
+  merge_cmd_baton_t *merge_b = notify_b->merge_b;
   svn_boolean_t is_operative_notification = IS_OPERATIVE_NOTIFICATION(notify);
   const char *notify_abspath;
 
@@ -3105,7 +3152,7 @@ notification_receiver(void *baton, const
    * not yet implemented.
    * ### We should stash the info about which moves have been followed and
    * retrieve that info here, instead of querying the WC again here. */
-  notify_abspath = svn_dirent_join(notify_b->merge_b->target->abspath,
+  notify_abspath = svn_dirent_join(merge_b->target->abspath,
                                    notify->path, pool);
   if (notify->action == svn_wc_notify_update_update
       && notify->kind == svn_node_file)
@@ -3114,7 +3161,7 @@ notification_receiver(void *baton, const
       const char *moved_to_abspath;
 
       err = svn_wc__node_was_moved_away(&moved_to_abspath, NULL,
-                                        notify_b->merge_b->ctx->wc_ctx,
+                                        merge_b->ctx->wc_ctx,
                                         notify_abspath, pool, pool);
       if (err)
         {
@@ -3135,8 +3182,8 @@ notification_receiver(void *baton, const
     }
 
   /* Update the lists of merged, skipped, tree-conflicted and added paths. */
-  if (notify_b->merge_b->merge_source.ancestral
-      || notify_b->merge_b->reintegrate_merge)
+  if (merge_b->merge_source.ancestral
+      || merge_b->reintegrate_merge)
     {
       if (notify->content_state == svn_wc_notify_state_merged
           || notify->content_state == svn_wc_notify_state_changed
@@ -3147,10 +3194,7 @@ notification_receiver(void *baton, const
           const char *merged_path = apr_pstrdup(notify_b->pool,
                                                 notify_abspath);
 
-          if (notify_b->merged_abspaths == NULL)
-            notify_b->merged_abspaths = apr_hash_make(notify_b->pool);
-
-          apr_hash_set(notify_b->merged_abspaths, merged_path,
+          apr_hash_set(merge_b->merged_abspaths, merged_path,
                        APR_HASH_KEY_STRING, merged_path);
         }
 
@@ -3159,10 +3203,7 @@ notification_receiver(void *baton, const
           const char *skipped_path = apr_pstrdup(notify_b->pool,
                                                  notify_abspath);
 
-          if (notify_b->skipped_abspaths == NULL)
-            notify_b->skipped_abspaths = apr_hash_make(notify_b->pool);
-
-          apr_hash_set(notify_b->skipped_abspaths, skipped_path,
+          apr_hash_set(merge_b->skipped_abspaths, skipped_path,
                        APR_HASH_KEY_STRING, skipped_path);
         }
 
@@ -3171,30 +3212,26 @@ notification_receiver(void *baton, const
           const char *tree_conflicted_path = apr_pstrdup(notify_b->pool,
                                                          notify_abspath);
 
-          if (notify_b->tree_conflicted_abspaths == NULL)
-            notify_b->tree_conflicted_abspaths =
-              apr_hash_make(notify_b->pool);
-
-          apr_hash_set(notify_b->tree_conflicted_abspaths,
+          apr_hash_set(merge_b->tree_conflicted_abspaths,
                        tree_conflicted_path, APR_HASH_KEY_STRING,
                        tree_conflicted_path);
         }
 
       if (notify->action == svn_wc_notify_update_add)
         {
-          update_the_list_of_added_subtrees(notify_b->merge_b->target->abspath,
+          update_the_list_of_added_subtrees(merge_b->target->abspath,
                                             notify_abspath,
-                                            &(notify_b->added_abspaths),
+                                            &(merge_b->added_abspaths),
                                             notify_b->pool, pool);
         }
 
       if (notify->action == svn_wc_notify_update_delete
-          && notify_b->added_abspaths)
+          && merge_b->added_abspaths)
         {
           /* Issue #4166: If a previous merge added NOTIFY_ABSPATH, but we
              are now deleting it, then remove it from the list of added
              paths. */
-          apr_hash_set(notify_b->added_abspaths, notify_abspath,
+          apr_hash_set(merge_b->added_abspaths, notify_abspath,
                        APR_HASH_KEY_STRING, NULL);
         }
     }
@@ -3202,7 +3239,7 @@ notification_receiver(void *baton, const
   /* Notify that a merge is beginning, if we haven't already done so.
    * (A single-file merge is notified separately: see single_file_merge_notify().) */
   /* If our merge sources are ancestors of one another... */
-  if (notify_b->merge_b->merge_source.ancestral)
+  if (merge_b->merge_source.ancestral)
     {
       /* See if this is an operative directory merge. */
       if (!(notify_b->is_single_file_merge) && is_operative_notification)
@@ -3237,8 +3274,8 @@ notification_receiver(void *baton, const
                   notify_merge_begin(child->abspath,
                                      APR_ARRAY_IDX(child->remaining_ranges, 0,
                                                    svn_merge_range_t *),
-                                     notify_b->merge_b->same_repos,
-                                     notify_b->merge_b->ctx, pool);
+                                     merge_b->same_repos,
+                                     merge_b->ctx, pool);
                 }
             }
         }
@@ -3248,9 +3285,9 @@ notification_receiver(void *baton, const
            && notify_b->nbr_operative_notifications == 1
            && is_operative_notification)
     {
-      notify_merge_begin(notify_b->merge_b->target->abspath, NULL,
-                         notify_b->merge_b->same_repos,
-                         notify_b->merge_b->ctx, pool);
+      notify_merge_begin(merge_b->target->abspath, NULL,
+                         merge_b->same_repos,
+                         merge_b->ctx, pool);
     }
 
   if (notify_b->wrapped_func)
@@ -4907,7 +4944,7 @@ update_wc_mergeinfo(svn_mergeinfo_catalo
 
    Record override mergeinfo on any paths skipped during a merge.
 
-   Set empty mergeinfo on each path in SKIPPED_ABSPATHS so the path
+   Set empty mergeinfo on each path in MERGE_B->SKIPPED_ABSPATHS so the path
    does not incorrectly inherit mergeinfo that will later be describing
    the merge.
 
@@ -4921,14 +4958,12 @@ static svn_error_t *
 record_skips(const char *mergeinfo_path,
              const svn_rangelist_t *rangelist,
              svn_boolean_t is_rollback,
-             apr_hash_t *skipped_abspaths,
              merge_cmd_baton_t *merge_b,
              apr_pool_t *scratch_pool)
 {
   apr_hash_index_t *hi;
   apr_hash_t *merges;
-  apr_size_t nbr_skips = (skipped_abspaths != NULL ?
-                          apr_hash_count(skipped_abspaths) : 0);
+  apr_size_t nbr_skips = apr_hash_count(merge_b->skipped_abspaths);
   apr_pool_t *iterpool = svn_pool_create(scratch_pool);
 
   if (nbr_skips == 0)
@@ -4937,7 +4972,7 @@ record_skips(const char *mergeinfo_path,
   merges = apr_hash_make(scratch_pool);
 
   /* Override the mergeinfo for child paths which weren't actually merged. */
-  for (hi = apr_hash_first(scratch_pool, skipped_abspaths); hi;
+  for (hi = apr_hash_first(scratch_pool, merge_b->skipped_abspaths); hi;
        hi = apr_hash_next(hi))
     {
       const char *skipped_abspath = svn__apr_hash_index_key(hi);
@@ -7220,8 +7255,7 @@ do_file_merge(svn_mergeinfo_catalog_t re
          self-referential mergeinfo, but don't record mergeinfo if
          TARGET_WCPATH was skipped. */
       if (filtered_rangelist->nelts
-          && (!notify_b->skipped_abspaths
-              || (apr_hash_count(notify_b->skipped_abspaths) == 0)))
+          && (apr_hash_count(notify_b->merge_b->skipped_abspaths) == 0))
         {
           apr_hash_t *merges = apr_hash_make(iterpool);
 
@@ -7421,11 +7455,11 @@ subtree_touched_by_merge(const char *loc
                          notification_receiver_baton_t *notify_b,
                          apr_pool_t *pool)
 {
-  return (path_is_subtree(local_abspath, notify_b->merged_abspaths, pool)
-          || path_is_subtree(local_abspath, notify_b->skipped_abspaths, pool)
-          || path_is_subtree(local_abspath, notify_b->added_abspaths, pool)
-          || path_is_subtree(local_abspath,
-                             notify_b->tree_conflicted_abspaths,
+  merge_cmd_baton_t *merge_b = notify_b->merge_b;
+  return (path_is_subtree(local_abspath, merge_b->merged_abspaths, pool)
+          || path_is_subtree(local_abspath, merge_b->skipped_abspaths, pool)
+          || path_is_subtree(local_abspath, merge_b->added_abspaths, pool)
+          || path_is_subtree(local_abspath, merge_b->tree_conflicted_abspaths,
                              pool));
 }
 
@@ -7709,9 +7743,8 @@ flag_subtrees_needing_mergeinfo(svn_bool
         continue;
 
       /* Don't record mergeinfo on skipped paths. */
-      if (notify_b->skipped_abspaths
-          && apr_hash_get(notify_b->skipped_abspaths, child->abspath,
-                          APR_HASH_KEY_STRING))
+      if (apr_hash_get(notify_b->merge_b->skipped_abspaths, child->abspath,
+                       APR_HASH_KEY_STRING))
         continue;
 
       /* ### ptb: Yes, we could combine the following into a single
@@ -7762,7 +7795,7 @@ flag_subtrees_needing_mergeinfo(svn_bool
               if (!merge_b->reintegrate_merge
                   && child->missing_child
                   && !path_is_subtree(child->abspath,
-                                      notify_b->skipped_abspaths,
+                                      notify_b->merge_b->skipped_abspaths,
                                       iterpool))
                 {
                   child->missing_child = FALSE;
@@ -7991,8 +8024,7 @@ record_mergeinfo_for_dir_merge(svn_merge
              don't incorrectly inherit the mergeinfo we are about to set. */
           if (i == 0)
             SVN_ERR(record_skips(mergeinfo_fspath, child_merge_rangelist,
-                                 is_rollback, notify_b->skipped_abspaths,
-                                 merge_b, iterpool));
+                                 is_rollback, merge_b, iterpool));
 
           /* We may need to record non-inheritable mergeinfo that applies
              only to CHILD->ABSPATH. */
@@ -9017,7 +9049,7 @@ do_mergeinfo_aware_dir_merge(svn_mergein
           err = record_mergeinfo_for_added_subtrees(
                   &range, mergeinfo_path, depth,
                   squelch_mergeinfo_notifications,
-                  notify_b->added_abspaths, merge_b, scratch_pool);
+                  merge_b->added_abspaths, merge_b, scratch_pool);
         }
     }
 
@@ -9259,13 +9291,14 @@ do_merge(apr_hash_t **modified_subtrees,
   /* Do we already know the specific subtrees with mergeinfo we want
      to record-only mergeinfo on? */
   if (record_only && record_only_paths)
-    notify_baton.merged_abspaths = record_only_paths;
+    merge_cmd_baton.merged_abspaths = record_only_paths;
   else
-    notify_baton.merged_abspaths = NULL;
+    merge_cmd_baton.merged_abspaths = apr_hash_make(result_pool);
+
+  merge_cmd_baton.skipped_abspaths = apr_hash_make(result_pool);
+  merge_cmd_baton.added_abspaths = apr_hash_make(result_pool);
+  merge_cmd_baton.tree_conflicted_abspaths = apr_hash_make(result_pool);
 
-  notify_baton.skipped_abspaths = NULL;
-  notify_baton.added_abspaths = NULL;
-  notify_baton.tree_conflicted_abspaths = NULL;
   notify_baton.children_with_mergeinfo = NULL;
   notify_baton.cur_ancestor_abspath = NULL;
   notify_baton.merge_b = &merge_cmd_baton;
@@ -9353,22 +9386,18 @@ do_merge(apr_hash_t **modified_subtrees,
           /* ### Why only if the target is a dir and not a file? */
           if (modified_subtrees)
             {
-              if (notify_baton.merged_abspaths)
-                *modified_subtrees =
+              *modified_subtrees =
                   apr_hash_overlay(result_pool, *modified_subtrees,
-                                   notify_baton.merged_abspaths);
-              if (notify_baton.added_abspaths)
-                *modified_subtrees =
+                                   merge_cmd_baton.merged_abspaths);
+              *modified_subtrees =
                   apr_hash_overlay(result_pool, *modified_subtrees,
-                                   notify_baton.added_abspaths);
-              if (notify_baton.skipped_abspaths)
-                *modified_subtrees =
+                                   merge_cmd_baton.added_abspaths);
+              *modified_subtrees =
                   apr_hash_overlay(result_pool, *modified_subtrees,
-                                   notify_baton.skipped_abspaths);
-              if (notify_baton.tree_conflicted_abspaths)
-                *modified_subtrees =
+                                   merge_cmd_baton.skipped_abspaths);
+              *modified_subtrees =
                   apr_hash_overlay(result_pool, *modified_subtrees,
-                                   notify_baton.tree_conflicted_abspaths);
+                                   merge_cmd_baton.tree_conflicted_abspaths);
             }
         }
 

Modified: subversion/branches/tweak-build-take-two/subversion/libsvn_client/repos_diff.c
URL: http://svn.apache.org/viewvc/subversion/branches/tweak-build-take-two/subversion/libsvn_client/repos_diff.c?rev=1425612&r1=1425611&r2=1425612&view=diff
==============================================================================
--- subversion/branches/tweak-build-take-two/subversion/libsvn_client/repos_diff.c (original)
+++ subversion/branches/tweak-build-take-two/subversion/libsvn_client/repos_diff.c Mon Dec 24 09:49:03 2012
@@ -1221,12 +1221,16 @@ change_file_prop(void *file_baton,
 {
   struct file_baton *fb = file_baton;
   svn_prop_t *propchange;
+  svn_prop_kind_t propkind;
 
   /* Skip *everything* within a newly tree-conflicted directory. */
   if (fb->skip)
     return SVN_NO_ERROR;
 
-  if (!fb->has_propchange && svn_property_kind2(name) == svn_prop_regular_kind)
+  propkind = svn_property_kind2(name);
+  if (propkind == svn_prop_wc_kind)
+    return SVN_NO_ERROR;
+  else if (propkind == svn_prop_regular_kind)
     fb->has_propchange = TRUE;
 
   propchange = apr_array_push(fb->propchanges);
@@ -1247,12 +1251,16 @@ change_dir_prop(void *dir_baton,
 {
   struct dir_baton *db = dir_baton;
   svn_prop_t *propchange;
+  svn_prop_kind_t propkind;
 
   /* Skip *everything* within a newly tree-conflicted directory. */
   if (db->skip)
     return SVN_NO_ERROR;
 
-  if (!db->has_propchange && svn_property_kind2(name) == svn_prop_regular_kind)
+  propkind = svn_property_kind2(name);
+  if (propkind == svn_prop_wc_kind)
+    return SVN_NO_ERROR;
+  else if (propkind == svn_prop_regular_kind)
     db->has_propchange = TRUE;
 
   propchange = apr_array_push(db->propchanges);

Modified: subversion/branches/tweak-build-take-two/subversion/libsvn_fs/editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/tweak-build-take-two/subversion/libsvn_fs/editor.c?rev=1425612&r1=1425611&r2=1425612&view=diff
==============================================================================
--- subversion/branches/tweak-build-take-two/subversion/libsvn_fs/editor.c (original)
+++ subversion/branches/tweak-build-take-two/subversion/libsvn_fs/editor.c Mon Dec 24 09:49:03 2012
@@ -474,7 +474,8 @@ alter_directory_cb(void *baton,
   SVN_ERR(get_root(&root, eb));
   SVN_ERR(can_modify(root, fspath, revision, scratch_pool));
 
-  SVN_ERR(alter_props(root, fspath, props, scratch_pool));
+  if (props)
+    SVN_ERR(alter_props(root, fspath, props, scratch_pool));
 
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/tweak-build-take-two/subversion/libsvn_subr/cmdline.c
URL: http://svn.apache.org/viewvc/subversion/branches/tweak-build-take-two/subversion/libsvn_subr/cmdline.c?rev=1425612&r1=1425611&r2=1425612&view=diff
==============================================================================
--- subversion/branches/tweak-build-take-two/subversion/libsvn_subr/cmdline.c (original)
+++ subversion/branches/tweak-build-take-two/subversion/libsvn_subr/cmdline.c Mon Dec 24 09:49:03 2012
@@ -43,6 +43,7 @@
 #include <apr_pools.h>
 
 #include "svn_cmdline.h"
+#include "svn_ctype.h"
 #include "svn_dso.h"
 #include "svn_dirent_uri.h"
 #include "svn_path.h"
@@ -60,6 +61,7 @@
 
 #include "private/svn_cmdline_private.h"
 #include "private/svn_utf_private.h"
+#include "private/svn_string_private.h"
 
 #include "svn_private_config.h"
 
@@ -946,3 +948,363 @@ svn_cmdline__be_interactive(svn_boolean_
 
   return !non_interactive;
 }
+
+
+/* Helper for the next two functions.  Set *EDITOR to some path to an
+   editor binary.  Sources to search include: the EDITOR_CMD argument
+   (if not NULL), $SVN_EDITOR, the runtime CONFIG variable (if CONFIG
+   is not NULL), $VISUAL, $EDITOR.  Return
+   SVN_ERR_CL_NO_EXTERNAL_EDITOR if no binary can be found. */
+static svn_error_t *
+find_editor_binary(const char **editor,
+                   const char *editor_cmd,
+                   apr_hash_t *config)
+{
+  const char *e;
+  struct svn_config_t *cfg;
+
+  /* Use the editor specified on the command line via --editor-cmd, if any. */
+  e = editor_cmd;
+
+  /* Otherwise look for the Subversion-specific environment variable. */
+  if (! e)
+    e = getenv("SVN_EDITOR");
+
+  /* If not found then fall back on the config file. */
+  if (! e)
+    {
+      cfg = config ? apr_hash_get(config, SVN_CONFIG_CATEGORY_CONFIG,
+                                  APR_HASH_KEY_STRING) : NULL;
+      svn_config_get(cfg, &e, SVN_CONFIG_SECTION_HELPERS,
+                     SVN_CONFIG_OPTION_EDITOR_CMD, NULL);
+    }
+
+  /* If not found yet then try general purpose environment variables. */
+  if (! e)
+    e = getenv("VISUAL");
+  if (! e)
+    e = getenv("EDITOR");
+
+#ifdef SVN_CLIENT_EDITOR
+  /* If still not found then fall back on the hard-coded default. */
+  if (! e)
+    e = SVN_CLIENT_EDITOR;
+#endif
+
+  /* Error if there is no editor specified */
+  if (e)
+    {
+      const char *c;
+
+      for (c = e; *c; c++)
+        if (!svn_ctype_isspace(*c))
+          break;
+
+      if (! *c)
+        return svn_error_create
+          (SVN_ERR_CL_NO_EXTERNAL_EDITOR, NULL,
+           _("The EDITOR, SVN_EDITOR or VISUAL environment variable or "
+             "'editor-cmd' run-time configuration option is empty or "
+             "consists solely of whitespace. Expected a shell command."));
+    }
+  else
+    return svn_error_create
+      (SVN_ERR_CL_NO_EXTERNAL_EDITOR, NULL,
+       _("None of the environment variables SVN_EDITOR, VISUAL or EDITOR are "
+         "set, and no 'editor-cmd' run-time configuration option was found"));
+
+  *editor = e;
+  return SVN_NO_ERROR;
+}
+
+
+svn_error_t *
+svn_cmdline__edit_file_externally(const char *path,
+                                  const char *editor_cmd,
+                                  apr_hash_t *config,
+                                  apr_pool_t *pool)
+{
+  const char *editor, *cmd, *base_dir, *file_name, *base_dir_apr;
+  char *old_cwd;
+  int sys_err;
+  apr_status_t apr_err;
+
+  svn_dirent_split(&base_dir, &file_name, path, pool);
+
+  SVN_ERR(find_editor_binary(&editor, editor_cmd, config));
+
+  apr_err = apr_filepath_get(&old_cwd, APR_FILEPATH_NATIVE, pool);
+  if (apr_err)
+    return svn_error_wrap_apr(apr_err, _("Can't get working directory"));
+
+  /* APR doesn't like "" directories */
+  if (base_dir[0] == '\0')
+    base_dir_apr = ".";
+  else
+    SVN_ERR(svn_path_cstring_from_utf8(&base_dir_apr, base_dir, pool));
+
+  apr_err = apr_filepath_set(base_dir_apr, pool);
+  if (apr_err)
+    return svn_error_wrap_apr
+      (apr_err, _("Can't change working directory to '%s'"), base_dir);
+
+  cmd = apr_psprintf(pool, "%s %s", editor, file_name);
+  sys_err = system(cmd);
+
+  apr_err = apr_filepath_set(old_cwd, pool);
+  if (apr_err)
+    svn_handle_error2(svn_error_wrap_apr
+                      (apr_err, _("Can't restore working directory")),
+                      stderr, TRUE /* fatal */, "svn: ");
+
+  if (sys_err)
+    /* Extracting any meaning from sys_err is platform specific, so just
+       use the raw value. */
+    return svn_error_createf(SVN_ERR_EXTERNAL_PROGRAM, NULL,
+                             _("system('%s') returned %d"), cmd, sys_err);
+
+  return SVN_NO_ERROR;
+}
+
+
+svn_error_t *
+svn_cmdline__edit_string_externally(svn_string_t **edited_contents /* UTF-8! */,
+                                    const char **tmpfile_left /* UTF-8! */,
+                                    const char *editor_cmd,
+                                    const char *base_dir /* UTF-8! */,
+                                    const svn_string_t *contents /* UTF-8! */,
+                                    const char *filename,
+                                    apr_hash_t *config,
+                                    svn_boolean_t as_text,
+                                    const char *encoding,
+                                    apr_pool_t *pool)
+{
+  const char *editor;
+  const char *cmd;
+  apr_file_t *tmp_file;
+  const char *tmpfile_name;
+  const char *tmpfile_native;
+  const char *tmpfile_apr, *base_dir_apr;
+  svn_string_t *translated_contents;
+  apr_status_t apr_err, apr_err2;
+  apr_size_t written;
+  apr_finfo_t finfo_before, finfo_after;
+  svn_error_t *err = SVN_NO_ERROR, *err2;
+  char *old_cwd;
+  int sys_err;
+  svn_boolean_t remove_file = TRUE;
+
+  SVN_ERR(find_editor_binary(&editor, editor_cmd, config));
+
+  /* Convert file contents from UTF-8/LF if desired. */
+  if (as_text)
+    {
+      const char *translated;
+      SVN_ERR(svn_subst_translate_cstring2(contents->data, &translated,
+                                           APR_EOL_STR, FALSE,
+                                           NULL, FALSE, pool));
+      translated_contents = svn_string_create_empty(pool);
+      if (encoding)
+        SVN_ERR(svn_utf_cstring_from_utf8_ex2(&translated_contents->data,
+                                              translated, encoding, pool));
+      else
+        SVN_ERR(svn_utf_cstring_from_utf8(&translated_contents->data,
+                                          translated, pool));
+      translated_contents->len = strlen(translated_contents->data);
+    }
+  else
+    translated_contents = svn_string_dup(contents, pool);
+
+  /* Move to BASE_DIR to avoid getting characters that need quoting
+     into tmpfile_name */
+  apr_err = apr_filepath_get(&old_cwd, APR_FILEPATH_NATIVE, pool);
+  if (apr_err)
+    return svn_error_wrap_apr(apr_err, _("Can't get working directory"));
+
+  /* APR doesn't like "" directories */
+  if (base_dir[0] == '\0')
+    base_dir_apr = ".";
+  else
+    SVN_ERR(svn_path_cstring_from_utf8(&base_dir_apr, base_dir, pool));
+  apr_err = apr_filepath_set(base_dir_apr, pool);
+  if (apr_err)
+    {
+      return svn_error_wrap_apr
+        (apr_err, _("Can't change working directory to '%s'"), base_dir);
+    }
+
+  /*** From here on, any problems that occur require us to cd back!! ***/
+
+  /* Ask the working copy for a temporary file named FILENAME-something. */
+  err = svn_io_open_uniquely_named(&tmp_file, &tmpfile_name,
+                                   "" /* dirpath */,
+                                   filename,
+                                   ".tmp",
+                                   svn_io_file_del_none, pool, pool);
+
+  if (err && (APR_STATUS_IS_EACCES(err->apr_err) || err->apr_err == EROFS))
+    {
+      const char *temp_dir_apr;
+
+      svn_error_clear(err);
+
+      SVN_ERR(svn_io_temp_dir(&base_dir, pool));
+
+      SVN_ERR(svn_path_cstring_from_utf8(&temp_dir_apr, base_dir, pool));
+      apr_err = apr_filepath_set(temp_dir_apr, pool);
+      if (apr_err)
+        {
+          return svn_error_wrap_apr
+            (apr_err, _("Can't change working directory to '%s'"), base_dir);
+        }
+
+      err = svn_io_open_uniquely_named(&tmp_file, &tmpfile_name,
+                                       "" /* dirpath */,
+                                       filename,
+                                       ".tmp",
+                                       svn_io_file_del_none, pool, pool);
+    }
+
+  if (err)
+    goto cleanup2;
+
+  /*** From here on, any problems that occur require us to cleanup
+       the file we just created!! ***/
+
+  /* Dump initial CONTENTS to TMP_FILE. */
+  apr_err = apr_file_write_full(tmp_file, translated_contents->data,
+                                translated_contents->len, &written);
+
+  apr_err2 = apr_file_close(tmp_file);
+  if (! apr_err)
+    apr_err = apr_err2;
+
+  /* Make sure the whole CONTENTS were written, else return an error. */
+  if (apr_err)
+    {
+      err = svn_error_wrap_apr(apr_err, _("Can't write to '%s'"),
+                               tmpfile_name);
+      goto cleanup;
+    }
+
+  err = svn_path_cstring_from_utf8(&tmpfile_apr, tmpfile_name, pool);
+  if (err)
+    goto cleanup;
+
+  /* Get information about the temporary file before the user has
+     been allowed to edit its contents. */
+  apr_err = apr_stat(&finfo_before, tmpfile_apr,
+                     APR_FINFO_MTIME, pool);
+  if (apr_err)
+    {
+      err = svn_error_wrap_apr(apr_err, _("Can't stat '%s'"), tmpfile_name);
+      goto cleanup;
+    }
+
+  /* Backdate the file a little bit in case the editor is very fast
+     and doesn't change the size.  (Use two seconds, since some
+     filesystems have coarse granularity.)  It's OK if this call
+     fails, so we don't check its return value.*/
+  apr_file_mtime_set(tmpfile_apr, finfo_before.mtime - 2000, pool);
+
+  /* Stat it again to get the mtime we actually set. */
+  apr_err = apr_stat(&finfo_before, tmpfile_apr,
+                     APR_FINFO_MTIME | APR_FINFO_SIZE, pool);
+  if (apr_err)
+    {
+      err = svn_error_wrap_apr(apr_err, _("Can't stat '%s'"), tmpfile_name);
+      goto cleanup;
+    }
+
+  /* Prepare the editor command line.  */
+  err = svn_utf_cstring_from_utf8(&tmpfile_native, tmpfile_name, pool);
+  if (err)
+    goto cleanup;
+  cmd = apr_psprintf(pool, "%s %s", editor, tmpfile_native);
+
+  /* If the caller wants us to leave the file around, return the path
+     of the file we'll use, and make a note not to destroy it.  */
+  if (tmpfile_left)
+    {
+      *tmpfile_left = svn_dirent_join(base_dir, tmpfile_name, pool);
+      remove_file = FALSE;
+    }
+
+  /* Now, run the editor command line.  */
+  sys_err = system(cmd);
+  if (sys_err != 0)
+    {
+      /* Extracting any meaning from sys_err is platform specific, so just
+         use the raw value. */
+      err =  svn_error_createf(SVN_ERR_EXTERNAL_PROGRAM, NULL,
+                               _("system('%s') returned %d"), cmd, sys_err);
+      goto cleanup;
+    }
+
+  /* Get information about the temporary file after the assumed editing. */
+  apr_err = apr_stat(&finfo_after, tmpfile_apr,
+                     APR_FINFO_MTIME | APR_FINFO_SIZE, pool);
+  if (apr_err)
+    {
+      err = svn_error_wrap_apr(apr_err, _("Can't stat '%s'"), tmpfile_name);
+      goto cleanup;
+    }
+
+  /* If the file looks changed... */
+  if ((finfo_before.mtime != finfo_after.mtime) ||
+      (finfo_before.size != finfo_after.size))
+    {
+      svn_stringbuf_t *edited_contents_s;
+      err = svn_stringbuf_from_file2(&edited_contents_s, tmpfile_name, pool);
+      if (err)
+        goto cleanup;
+
+      *edited_contents = svn_stringbuf__morph_into_string(edited_contents_s);
+
+      /* Translate back to UTF8/LF if desired. */
+      if (as_text)
+        {
+          err = svn_subst_translate_string2(edited_contents, FALSE, FALSE,
+                                            *edited_contents, encoding, FALSE,
+                                            pool, pool);
+          if (err)
+            {
+              err = svn_error_quick_wrap
+                (err,
+                 _("Error normalizing edited contents to internal format"));
+              goto cleanup;
+            }
+        }
+    }
+  else
+    {
+      /* No edits seem to have been made */
+      *edited_contents = NULL;
+    }
+
+ cleanup:
+  if (remove_file)
+    {
+      /* Remove the file from disk.  */
+      err2 = svn_io_remove_file2(tmpfile_name, FALSE, pool);
+
+      /* Only report remove error if there was no previous error. */
+      if (! err && err2)
+        err = err2;
+      else
+        svn_error_clear(err2);
+    }
+
+ cleanup2:
+  /* If we against all probability can't cd back, all further relative
+     file references would be screwed up, so we have to abort. */
+  apr_err = apr_filepath_set(old_cwd, pool);
+  if (apr_err)
+    {
+      svn_handle_error2(svn_error_wrap_apr
+                        (apr_err, _("Can't restore working directory")),
+                        stderr, TRUE /* fatal */, "svn: ");
+    }
+
+  return svn_error_trace(err);
+}

Modified: subversion/branches/tweak-build-take-two/subversion/libsvn_wc/wc-metadata.sql
URL: http://svn.apache.org/viewvc/subversion/branches/tweak-build-take-two/subversion/libsvn_wc/wc-metadata.sql?rev=1425612&r1=1425611&r2=1425612&view=diff
==============================================================================
--- subversion/branches/tweak-build-take-two/subversion/libsvn_wc/wc-metadata.sql (original)
+++ subversion/branches/tweak-build-take-two/subversion/libsvn_wc/wc-metadata.sql Mon Dec 24 09:49:03 2012
@@ -253,19 +253,10 @@ PRAGMA user_version =
    op_depth values are not normally visible to the user but may become
    visible after reverting local changes.
 
-   ### The following text needs revision
-
-   Each row in BASE_NODE has an associated row NODE_DATA. Additionally, each
-   row in WORKING_NODE has one or more associated rows in NODE_DATA.
-
    This table contains full node descriptions for nodes in either the BASE
    or WORKING trees as described in notes/wc-ng/design. Fields relate
    both to BASE and WORKING trees, unless documented otherwise.
 
-   ### This table is to be integrated into the SCHEMA statement as soon
-       the experimental status of NODES is lifted.
-   ### This table superseeds NODE_DATA
-
    For illustration, with a scenario like this:
 
      # (0)
@@ -275,12 +266,11 @@ PRAGMA user_version =
      touch foo/bar
      svn add foo/bar    # (2)
 
-   , these are the NODES for the path foo/bar (before single-db, the
-   numbering of op_depth is still a bit different):
+   , these are the NODES table rows for the path foo/bar:
 
-   (0)  BASE_NODE ----->  NODES (op_depth == 0)
-   (1)                    NODES (op_depth == 1) ( <----_ )
-   (2)                    NODES (op_depth == 2)   <----- WORKING_NODE
+   (0)  "BASE" --->  NODES (op_depth == 0)
+   (1)               NODES (op_depth == 1)
+   (2)               NODES (op_depth == 2)
 
    0 is the original data for foo/bar before 'svn rm foo' (if it existed).
    1 is the data for foo/bar copied in from ^/moo/bar.

Modified: subversion/branches/tweak-build-take-two/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/branches/tweak-build-take-two/subversion/libsvn_wc/wc_db.c?rev=1425612&r1=1425611&r2=1425612&view=diff
==============================================================================
--- subversion/branches/tweak-build-take-two/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/branches/tweak-build-take-two/subversion/libsvn_wc/wc_db.c Mon Dec 24 09:49:03 2012
@@ -588,6 +588,12 @@ blank_ibb(insert_base_baton_t *pibb)
 
 /* Extend any delete of the parent of LOCAL_RELPATH to LOCAL_RELPATH.
 
+   ### What about KIND and OP_DEPTH?  KIND ought to be redundant; I'm
+       discussing on dev@ whether we can let that be null for presence
+       == base-deleted.  OP_DEPTH is the op-depth of what, and why?
+       It is used to select the lowest working node higher than OP_DEPTH,
+       so, in terms of the API, OP_DEPTH means ...?
+
    Given a wc:
 
               0         1         2         3         4
@@ -12938,6 +12944,9 @@ svn_wc__db_is_switched(svn_boolean_t *is
   isb.is_switched = is_switched;
   isb.kind = kind;
 
+  if (! is_switched && ! kind)
+    return SVN_NO_ERROR;
+
   return svn_error_trace(svn_wc__db_with_txn(wcroot, local_relpath,
                                              db_is_switched, &isb,
                                              scratch_pool));

Modified: subversion/branches/tweak-build-take-two/subversion/libsvn_wc/wc_db_update_move.c
URL: http://svn.apache.org/viewvc/subversion/branches/tweak-build-take-two/subversion/libsvn_wc/wc_db_update_move.c?rev=1425612&r1=1425611&r2=1425612&view=diff
==============================================================================
--- subversion/branches/tweak-build-take-two/subversion/libsvn_wc/wc_db_update_move.c (original)
+++ subversion/branches/tweak-build-take-two/subversion/libsvn_wc/wc_db_update_move.c Mon Dec 24 09:49:03 2012
@@ -23,13 +23,50 @@
 
 /* This editor is used during resolution of tree conflicts.
  *
- * An operation such as update can produce incoming changes for a
- * locally moved-away subtree, causing a tree-conflict to be flagged.
+ * When an update (or switch) produces incoming changes for a locally
+ * moved-away subtree, it updates the base nodes of the moved-away tree
+ * and flags a tree-conflict on the moved-away root node.
  * This editor transfers these changes from the moved-away part of the
  * working copy to the corresponding moved-here part of the working copy.
  *
  * Both the driver and receiver components of the editor are implemented
  * in this file.
+ *
+ * The driver sees two NODES trees: the move source tree and the move
+ * destination tree.  When the move is initially made these trees are
+ * equivalent, the destination is a copy of the source.  The source is
+ * a single-op-depth, single-revision, deleted layer [1] and the
+ * destination has an equivalent single-op-depth, single-revision
+ * layer. The destination may have additional higher op-depths
+ * representing adds, deletes, moves within the move destination. [2]
+ *
+ * After the intial move an update, or this editor for trees that have
+ * been moved more than once, has modified the NODES in the move
+ * source, and introduced a tree-conflict since the source and
+ * destination trees are no longer equivalent.  The source is a
+ * different revision and may have text, property and tree changes
+ * compared to the destination.  The driver will compare the two NODES
+ * trees and drive an editor to change the destination tree so that it
+ * once again matches the source tree.  Changes made to the
+ * destination NODES tree to achieve this match will be merged into
+ * the working files/directories.
+ *
+ * The whole drive occurs as one single wc.db transaction.  At the end
+ * of the transaction the destination NODES table should have a layer
+ * that is equivalent to the source NODES layer, there should be
+ * workqueue items to make any required changes to working
+ * files/directories in the move destination, and there should be
+ * tree-conflicts in the move destination where it was not possible to
+ * update the working files/directories.
+ *
+ * [1] The move source tree is single-revision because we currently do
+ *     not allow a mixed-rev move, and therefore it is single op-depth
+ *     regardless whether it is a base layer or a nested move.
+ *
+ * [2] The source tree also may have additional higher op-depths,
+ *     representing a replacement, but this editor only reads from the
+ *     single-op-depth layer of it, and makes no changes of any kind
+ *     within the source tree.
  */
 
 #define SVN_WC__I_AM_WC_DB
@@ -75,6 +112,119 @@ struct tc_editor_baton {
   apr_pool_t *result_pool;
 };
 
+/* If LOCAL_RELPATH is shadowed then raise a tree-conflict on the root
+   of the obstruction if such a tree-conflict does not already exist. */
+static svn_error_t *
+check_tree_conflict(svn_boolean_t *is_conflicted,
+                    struct tc_editor_baton *b,
+                    const char *local_relpath,
+                    svn_node_kind_t kind,
+                    apr_pool_t *scratch_pool)
+{
+  svn_sqlite__stmt_t *stmt;
+  svn_boolean_t have_row;
+  int dst_op_depth = relpath_depth(b->move_root_dst_relpath);
+  int op_depth;
+  const char *conflict_root_relpath = local_relpath;
+  const char *moved_to_relpath;
+  svn_skel_t *conflict;
+  svn_wc_conflict_version_t *version;
+
+  SVN_ERR(svn_sqlite__get_statement(&stmt, b->wcroot->sdb,
+                                    STMT_SELECT_LOWEST_WORKING_NODE));
+  SVN_ERR(svn_sqlite__bindf(stmt, "isd", b->wcroot->wc_id, local_relpath,
+                            dst_op_depth));
+  SVN_ERR(svn_sqlite__step(&have_row, stmt));
+  if (have_row)
+    op_depth = svn_sqlite__column_int(stmt, 0);
+  SVN_ERR(svn_sqlite__reset(stmt));
+
+  if (!have_row)
+    {
+      *is_conflicted = FALSE;
+      return SVN_NO_ERROR;
+    }
+
+  *is_conflicted = TRUE;
+
+  while (relpath_depth(conflict_root_relpath) > op_depth)
+    conflict_root_relpath = svn_relpath_dirname(conflict_root_relpath,
+                                                scratch_pool);
+
+  SVN_ERR(svn_wc__db_read_conflict_internal(&conflict, b->wcroot,
+                                            conflict_root_relpath,
+                                            scratch_pool, scratch_pool));
+
+  if (conflict)
+    /* ### TODO: check this is the right sort of tree-conflict? */
+    return SVN_NO_ERROR;
+
+  SVN_ERR(svn_wc__db_scan_deletion_internal(NULL, &moved_to_relpath,
+                                            NULL, NULL,
+                                            b->wcroot, conflict_root_relpath,
+                                            scratch_pool, scratch_pool));
+
+  conflict = svn_wc__conflict_skel_create(scratch_pool);
+  SVN_ERR(svn_wc__conflict_skel_add_tree_conflict(
+                     conflict, NULL,
+                     svn_dirent_join(b->wcroot->abspath, conflict_root_relpath,
+                                     scratch_pool),
+                     (moved_to_relpath
+                      ? svn_wc_conflict_reason_moved_away
+                      : svn_wc_conflict_reason_deleted),
+                     svn_wc_conflict_action_edit,
+                     scratch_pool,
+                     scratch_pool));
+
+  version = svn_wc_conflict_version_create2(b->old_version->repos_url,
+                                            b->old_version->repos_uuid,
+                                            local_relpath,
+                                            b->old_version->peg_rev,
+                                            kind,
+                                            scratch_pool);
+
+  SVN_ERR(svn_wc__conflict_skel_set_op_update(conflict, version,
+                                              scratch_pool, scratch_pool));
+  SVN_ERR(svn_wc__db_mark_conflict_internal(b->wcroot, conflict_root_relpath,
+                                            conflict, scratch_pool));
+
+  return SVN_NO_ERROR;
+}
+
+/* Mark a unversioned-add tree-conflict on RELPATH. */
+static svn_error_t *
+mark_unversioned_add_conflict(struct tc_editor_baton *b,
+                              const char *relpath,
+                              svn_node_kind_t kind,
+                              apr_pool_t *scratch_pool)
+{
+  svn_skel_t *conflict = svn_wc__conflict_skel_create(scratch_pool);
+  svn_wc_conflict_version_t *version;
+
+  SVN_ERR(svn_wc__conflict_skel_add_tree_conflict(
+                     conflict, NULL,
+                     svn_dirent_join(b->wcroot->abspath, relpath,
+                                     scratch_pool),
+                     svn_wc_conflict_reason_unversioned,
+                     svn_wc_conflict_action_add,
+                     scratch_pool,
+                     scratch_pool));
+
+  version = svn_wc_conflict_version_create2(b->old_version->repos_url,
+                                            b->old_version->repos_uuid,
+                                            relpath,
+                                            b->old_version->peg_rev,
+                                            kind,
+                                            scratch_pool);
+
+  SVN_ERR(svn_wc__conflict_skel_set_op_update(conflict, version,
+                                              scratch_pool, scratch_pool));
+  SVN_ERR(svn_wc__db_mark_conflict_internal(b->wcroot, relpath,
+                                            conflict, scratch_pool));
+
+  return SVN_NO_ERROR;
+}
+
 static svn_error_t *
 tc_editor_add_directory(void *baton,
                         const char *relpath,
@@ -85,11 +235,44 @@ tc_editor_add_directory(void *baton,
 {
   struct tc_editor_baton *b = baton;
   int op_depth = relpath_depth(b->move_root_dst_relpath);
+  svn_boolean_t is_conflicted;
+  const char *abspath;
+  svn_node_kind_t kind;
+  svn_skel_t *work_item;
 
+  /* Update NODES, only the bits not covered by the later call to
+     replace_moved_layer. */
   SVN_ERR(svn_wc__db_extend_parent_delete(b->wcroot, relpath, svn_kind_dir,
                                           op_depth, scratch_pool));
 
-  /* ### TODO check for, and flag, tree conflict */
+  /* Check for NODES tree-conflict. */
+  SVN_ERR(check_tree_conflict(&is_conflicted, b, relpath, svn_node_dir,
+                              scratch_pool));
+  if (is_conflicted)
+    return SVN_NO_ERROR;
+
+  /* Check for unversioned tree-conflict */
+  abspath = svn_dirent_join(b->wcroot->abspath, relpath, scratch_pool);
+  SVN_ERR(svn_io_check_path(abspath, &kind, scratch_pool));
+
+  switch (kind)
+    {
+    case svn_node_file:
+    default:
+      SVN_ERR(mark_unversioned_add_conflict(b, relpath, svn_node_dir,
+                                            scratch_pool));
+      break;
+
+    case svn_node_none:
+      SVN_ERR(svn_wc__wq_build_dir_install(&work_item, b->db, abspath,
+                                           scratch_pool, b->result_pool));
+
+      SVN_ERR(svn_wc__db_wq_add(b->db, b->wcroot->abspath, work_item,
+                                scratch_pool));
+      /* Fall through */
+    case svn_node_dir:
+      break;
+    }
 
   return SVN_NO_ERROR;
 }
@@ -105,11 +288,45 @@ tc_editor_add_file(void *baton,
 {
   struct tc_editor_baton *b = baton;
   int op_depth = relpath_depth(b->move_root_dst_relpath);
+  svn_boolean_t is_conflicted;
+  const char *abspath;
+  svn_node_kind_t kind;
+  svn_skel_t *work_item;
 
+  /* Update NODES, only the bits not covered by the later call to
+     replace_moved_layer. */
   SVN_ERR(svn_wc__db_extend_parent_delete(b->wcroot, relpath, svn_kind_file,
                                           op_depth, scratch_pool));
 
-  /* ### TODO check for, and flag, tree conflict */
+  /* Check for NODES tree-conflict. */
+  SVN_ERR(check_tree_conflict(&is_conflicted, b, relpath, svn_node_file,
+                              scratch_pool));
+  if (is_conflicted)
+    return SVN_NO_ERROR;
+
+  /* Check for unversioned tree-conflict */
+  abspath = svn_dirent_join(b->wcroot->abspath, relpath, scratch_pool);
+  SVN_ERR(svn_io_check_path(abspath, &kind, scratch_pool));
+
+  if (kind != svn_node_none)
+    {
+      SVN_ERR(mark_unversioned_add_conflict(b, relpath, svn_node_file,
+                                            scratch_pool));
+      return SVN_NO_ERROR;
+    }
+
+  /* Update working file. */
+  SVN_ERR(svn_wc__wq_build_file_install(&work_item, b->db,
+                                        svn_dirent_join(b->wcroot->abspath,
+                                                        relpath,
+                                                        scratch_pool),
+                                        NULL,
+                                        FALSE /* FIXME: use_commit_times? */,
+                                        TRUE  /* record_file_info */,
+                                        scratch_pool, b->result_pool));
+
+  SVN_ERR(svn_wc__db_wq_add(b->db, b->wcroot->abspath, work_item,
+                            scratch_pool));
 
   return SVN_NO_ERROR;
 }
@@ -220,86 +437,6 @@ update_working_props(svn_wc_notify_state
 }
 
 
-/* If LOCAL_ABSPATH is shadowed then raise a tree-conflict on the root
-   of the obstruction if such a tree-conflict does not already exist. */
-static svn_error_t *
-check_tree_conflict(svn_boolean_t *is_conflicted,
-                    struct tc_editor_baton *b,
-                    const char *local_relpath,
-                    svn_node_kind_t kind,
-                    apr_pool_t *scratch_pool)
-{
-  svn_sqlite__stmt_t *stmt;
-  svn_boolean_t have_row;
-  int dst_op_depth = relpath_depth(b->move_root_dst_relpath);
-  int op_depth;
-  const char *conflict_root_relpath = local_relpath;
-  const char *moved_to_relpath;
-  svn_skel_t *conflict;
-  svn_wc_conflict_version_t *version;
-
-  SVN_ERR(svn_sqlite__get_statement(&stmt, b->wcroot->sdb,
-                                    STMT_SELECT_LOWEST_WORKING_NODE));
-  SVN_ERR(svn_sqlite__bindf(stmt, "isd", b->wcroot->wc_id, local_relpath,
-                            dst_op_depth));
-  SVN_ERR(svn_sqlite__step(&have_row, stmt));
-  if (have_row)
-    op_depth = svn_sqlite__column_int(stmt, 0);
-  SVN_ERR(svn_sqlite__reset(stmt));
-
-  if (!have_row)
-    {
-      *is_conflicted = FALSE;
-      return SVN_NO_ERROR;
-    }
-
-  *is_conflicted = TRUE;
-
-  while (relpath_depth(conflict_root_relpath) > op_depth)
-    conflict_root_relpath = svn_relpath_dirname(conflict_root_relpath,
-                                                scratch_pool);
-
-  SVN_ERR(svn_wc__db_read_conflict_internal(&conflict, b->wcroot,
-                                            conflict_root_relpath,
-                                            scratch_pool, scratch_pool));
-
-  if (conflict)
-    /* ### TODO: check this is the right sort of tree-conflict? */
-    return SVN_NO_ERROR;
-
-  SVN_ERR(svn_wc__db_scan_deletion_internal(NULL, &moved_to_relpath,
-                                            NULL, NULL,
-                                            b->wcroot, conflict_root_relpath,
-                                            scratch_pool, scratch_pool));
-
-  conflict = svn_wc__conflict_skel_create(scratch_pool);
-  SVN_ERR(svn_wc__conflict_skel_add_tree_conflict(
-                     conflict, NULL,
-                     svn_dirent_join(b->wcroot->abspath, conflict_root_relpath,
-                                     scratch_pool),
-                     (moved_to_relpath
-                      ? svn_wc_conflict_reason_moved_away
-                      : svn_wc_conflict_reason_deleted),
-                     svn_wc_conflict_action_edit,
-                     scratch_pool,
-                     scratch_pool));
-
-  version = svn_wc_conflict_version_create2(b->old_version->repos_url,
-                                            b->old_version->repos_uuid,
-                                            local_relpath,
-                                            b->old_version->peg_rev,
-                                            kind,
-                                            scratch_pool);
-
-  SVN_ERR(svn_wc__conflict_skel_set_op_update(conflict, version,
-                                              scratch_pool, scratch_pool));
-  SVN_ERR(svn_wc__db_mark_conflict_internal(b->wcroot, conflict_root_relpath,
-                                            conflict, scratch_pool));
-
-  return SVN_NO_ERROR;
-}
-
-
 static svn_error_t *
 tc_editor_alter_directory(void *baton,
                           const char *dst_relpath,
@@ -899,6 +1036,7 @@ update_moved_away_file(svn_editor_t *tc_
 static svn_error_t *
 update_moved_away_dir(svn_editor_t *tc_editor,
                       svn_boolean_t add,
+                      apr_hash_t *children_hash,
                       const char *src_relpath,
                       const char *dst_relpath,
                       int src_op_depth,
@@ -908,35 +1046,25 @@ update_moved_away_dir(svn_editor_t *tc_e
                       svn_wc__db_wcroot_t *wcroot,
                       apr_pool_t *scratch_pool)
 {
-  apr_hash_t *children_hash;
   apr_array_header_t *new_children;
   apr_hash_t *new_props;
   const char *src_abspath = svn_dirent_join(wcroot->abspath,
                                             src_relpath,
                                             scratch_pool);
 
-  if (add)
-    {
-      /* ### TODO children and props */
-      SVN_ERR(svn_editor_add_directory(tc_editor, dst_relpath,
-                                       apr_array_make(scratch_pool, 0,
-                                                      sizeof (const char *)),
-                                       apr_hash_make(scratch_pool),
-                                       move_root_dst_revision));
-      return SVN_NO_ERROR;
-    }
-
-  SVN_ERR(svn_wc__db_get_children_op_depth(&children_hash, wcroot,
-                                           src_relpath, src_op_depth,
-                                           scratch_pool, scratch_pool));
   SVN_ERR(svn_hash_keys(&new_children, children_hash, scratch_pool));
 
   SVN_ERR(svn_wc__db_read_pristine_props(&new_props, db, src_abspath,
                                          scratch_pool, scratch_pool));
 
-  SVN_ERR(svn_editor_alter_directory(tc_editor, dst_relpath,
-                                     move_root_dst_revision,
-                                     new_children, new_props));
+  if (add)
+    SVN_ERR(svn_editor_add_directory(tc_editor, dst_relpath,
+                                     new_children, new_props,
+                                     move_root_dst_revision));
+  else
+    SVN_ERR(svn_editor_alter_directory(tc_editor, dst_relpath,
+                                       move_root_dst_revision,
+                                       new_children, new_props));
 
   return SVN_NO_ERROR;
 }
@@ -959,14 +1087,16 @@ update_moved_away_subtree(svn_editor_t *
   apr_pool_t *iterpool;
   apr_hash_index_t *hi;
 
-  SVN_ERR(update_moved_away_dir(tc_editor, add, src_relpath, dst_relpath,
+  SVN_ERR(svn_wc__db_get_children_op_depth(&src_children, wcroot,
+                                           src_relpath, src_op_depth,
+                                           scratch_pool, scratch_pool));
+
+  SVN_ERR(update_moved_away_dir(tc_editor, add, src_children,
+                                src_relpath, dst_relpath,
                                 src_op_depth, move_root_dst_relpath,
                                 move_root_dst_revision,
                                 db, wcroot, scratch_pool));
 
-  SVN_ERR(svn_wc__db_get_children_op_depth(&src_children, wcroot,
-                                           src_relpath, src_op_depth,
-                                           scratch_pool, scratch_pool));
   SVN_ERR(svn_wc__db_get_children_op_depth(&dst_children, wcroot,
                                            dst_relpath,
                                            relpath_depth(move_root_dst_relpath),

Modified: subversion/branches/tweak-build-take-two/subversion/libsvn_wc/workqueue.c
URL: http://svn.apache.org/viewvc/subversion/branches/tweak-build-take-two/subversion/libsvn_wc/workqueue.c?rev=1425612&r1=1425611&r2=1425612&view=diff
==============================================================================
--- subversion/branches/tweak-build-take-two/subversion/libsvn_wc/workqueue.c (original)
+++ subversion/branches/tweak-build-take-two/subversion/libsvn_wc/workqueue.c Mon Dec 24 09:49:03 2012
@@ -50,6 +50,7 @@
 #define OP_SYNC_FILE_FLAGS "sync-file-flags"
 #define OP_PREJ_INSTALL "prej-install"
 #define OP_DIRECTORY_REMOVE "dir-remove"
+#define OP_DIRECTORY_INSTALL "dir-install"
 
 #define OP_POSTUPGRADE "postupgrade"
 
@@ -1016,6 +1017,51 @@ svn_wc__wq_build_file_copy_translated(sv
   return SVN_NO_ERROR;
 }
 
+/* ------------------------------------------------------------------------ */
+
+/* OP_DIRECTORY_INSTALL  */
+
+static svn_error_t *
+run_dir_install(svn_wc__db_t *db,
+                    const svn_skel_t *work_item,
+                    const char *wri_abspath,
+                    svn_cancel_func_t cancel_func,
+                    void *cancel_baton,
+                    apr_pool_t *scratch_pool)
+{
+  const svn_skel_t *arg1 = work_item->children->next;
+  const char *local_relpath;
+  const char *local_abspath;
+
+  local_relpath = apr_pstrmemdup(scratch_pool, arg1->data, arg1->len);
+  SVN_ERR(svn_wc__db_from_relpath(&local_abspath, db, wri_abspath,
+                                  local_relpath, scratch_pool, scratch_pool));
+
+  SVN_ERR(svn_wc__ensure_directory(local_abspath, scratch_pool));
+
+  return SVN_NO_ERROR;
+}
+
+svn_error_t *
+svn_wc__wq_build_dir_install(svn_skel_t **work_item,
+                             svn_wc__db_t *db,
+                             const char *local_abspath,
+                             apr_pool_t *scratch_pool,
+                             apr_pool_t *result_pool)
+{
+  const char *local_relpath;
+
+  *work_item = svn_skel__make_empty_list(result_pool);
+
+  SVN_ERR(svn_wc__db_to_relpath(&local_relpath, db, local_abspath,
+                                local_abspath, result_pool, scratch_pool));
+  svn_skel__prepend_str(local_relpath, *work_item, result_pool);
+
+  svn_skel__prepend_str(OP_DIRECTORY_INSTALL, *work_item, result_pool);
+
+  return SVN_NO_ERROR;
+}
+
 
 /* ------------------------------------------------------------------------ */
 
@@ -1370,6 +1416,7 @@ static const struct work_item_dispatch d
   { OP_SYNC_FILE_FLAGS, run_sync_file_flags },
   { OP_PREJ_INSTALL, run_prej_install },
   { OP_DIRECTORY_REMOVE, run_dir_remove },
+  { OP_DIRECTORY_INSTALL, run_dir_install },
 
   /* Upgrade steps */
   { OP_POSTUPGRADE, run_postupgrade },

Modified: subversion/branches/tweak-build-take-two/subversion/libsvn_wc/workqueue.h
URL: http://svn.apache.org/viewvc/subversion/branches/tweak-build-take-two/subversion/libsvn_wc/workqueue.h?rev=1425612&r1=1425611&r2=1425612&view=diff
==============================================================================
--- subversion/branches/tweak-build-take-two/subversion/libsvn_wc/workqueue.h (original)
+++ subversion/branches/tweak-build-take-two/subversion/libsvn_wc/workqueue.h Mon Dec 24 09:49:03 2012
@@ -215,6 +215,14 @@ svn_wc__wq_build_file_commit(svn_skel_t 
                              apr_pool_t *result_pool,
                              apr_pool_t *scratch_pool);
 
+/* Set *WORK_ITEM to a new work item that will install the working
+   copy directory at LOCAL_ABSPATH. */
+svn_error_t *
+svn_wc__wq_build_dir_install(svn_skel_t **work_item,
+                             svn_wc__db_t *db,
+                             const char *local_abspath,
+                             apr_pool_t *scratch_pool,
+                             apr_pool_t *result_pool);
 
 svn_error_t *
 svn_wc__wq_build_postupgrade(svn_skel_t **work_item,

Modified: subversion/branches/tweak-build-take-two/subversion/mod_authz_svn/mod_authz_svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/tweak-build-take-two/subversion/mod_authz_svn/mod_authz_svn.c?rev=1425612&r1=1425611&r2=1425612&view=diff
==============================================================================
--- subversion/branches/tweak-build-take-two/subversion/mod_authz_svn/mod_authz_svn.c (original)
+++ subversion/branches/tweak-build-take-two/subversion/mod_authz_svn/mod_authz_svn.c Mon Dec 24 09:49:03 2012
@@ -236,10 +236,10 @@ log_svn_error(LOG_ARGS_SIGNATURE,
   /* Build the error chain into a space separated stringbuf. */
   while (err_pos)
     {
+      svn_stringbuf_appendbyte(buff, ' ');
       if (err_pos->message)
         {
           svn_stringbuf_appendcstr(buff, err_pos->message);
-          svn_stringbuf_appendbyte(buff, ' ');
         }
       else
         {
@@ -316,7 +316,7 @@ get_access_conf(request_rec *r, authz_sv
       if (svn_err)
         {
           log_svn_error(APLOG_MARK, r,
-                        "Failed to load the AuthzSVNAccessFile: ",
+                        "Failed to load the AuthzSVNAccessFile:",
                         svn_err, scratch_pool);
           access_conf = NULL;
         }
@@ -559,7 +559,7 @@ req_check_access(request_rec *r,
       if (svn_err)
         {
           log_svn_error(APLOG_MARK, r,
-                        "Failed to perform access control: ",
+                        "Failed to perform access control:",
                         svn_err, r->pool);
 
           return DECLINED;
@@ -596,7 +596,7 @@ req_check_access(request_rec *r,
       if (svn_err)
         {
           log_svn_error(APLOG_MARK, r,
-                        "Failed to perform access control: ",
+                        "Failed to perform access control:",
                         svn_err, r->pool);
 
           return DECLINED;
@@ -658,7 +658,7 @@ subreq_bypass2(request_rec *r,
       if (svn_err)
         {
           log_svn_error(APLOG_MARK, r,
-                        "Failed to perform access control: ",
+                        "Failed to perform access control:",
                         svn_err, scratch_pool);
           return HTTP_FORBIDDEN;
         }

Modified: subversion/branches/tweak-build-take-two/subversion/mod_dav_svn/mod_dav_svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/tweak-build-take-two/subversion/mod_dav_svn/mod_dav_svn.c?rev=1425612&r1=1425611&r2=1425612&view=diff
==============================================================================
--- subversion/branches/tweak-build-take-two/subversion/mod_dav_svn/mod_dav_svn.c (original)
+++ subversion/branches/tweak-build-take-two/subversion/mod_dav_svn/mod_dav_svn.c Mon Dec 24 09:49:03 2012
@@ -674,7 +674,7 @@ dav_svn_get_repos_path(request_rec *r,
 
   /* Construct the full path from the parent path base directory
      and the repository name. */
-  *repos_path = svn_urlpath__join(fs_parent_path, repos_name, r->pool);
+  *repos_path = svn_dirent_join(fs_parent_path, repos_name, r->pool);
   return NULL;
 }
 

Modified: subversion/branches/tweak-build-take-two/subversion/svn/cl.h
URL: http://svn.apache.org/viewvc/subversion/branches/tweak-build-take-two/subversion/svn/cl.h?rev=1425612&r1=1425611&r2=1425612&view=diff
==============================================================================
--- subversion/branches/tweak-build-take-two/subversion/svn/cl.h (original)
+++ subversion/branches/tweak-build-take-two/subversion/svn/cl.h Mon Dec 24 09:49:03 2012
@@ -493,60 +493,6 @@ svn_cl__revprop_prepare(const svn_opt_re
                         svn_client_ctx_t *ctx,
                         apr_pool_t *pool);
 
-/* Search for a text editor command in standard environment variables,
-   and invoke it to edit CONTENTS (using a temporary file created in
-   directory BASE_DIR).  Return the new contents in *EDITED_CONTENTS,
-   or set *EDITED_CONTENTS to NULL if no edit was performed.
-
-   If EDITOR_CMD is not NULL, it is the name of the external editor
-   command to use, overriding anything else that might determine the
-   editor.
-
-   If TMPFILE_LEFT is NULL, the temporary file will be destroyed.
-   Else, the file will be left on disk, and its path returned in
-   *TMPFILE_LEFT.
-
-   CONFIG is a hash of svn_config_t * items keyed on a configuration
-   category (SVN_CONFIG_CATEGORY_CONFIG et al), and may be NULL.
-
-   If AS_TEXT is TRUE, recode CONTENTS and convert to native eol-style before
-   editing and back again afterwards.  In this case, ENCODING determines the
-   encoding used during editing.  If non-NULL, use the named encoding, else
-   use the system encoding.  If AS_TEXT is FALSE, don't do any translation.
-   In that case, ENCODING is ignored.
-
-   Use POOL for all allocations.  Use PREFIX as the prefix for the
-   temporary file used by the editor.
-
-   If return error, *EDITED_CONTENTS is not touched. */
-svn_error_t *
-svn_cl__edit_string_externally(svn_string_t **edited_contents,
-                               const char **tmpfile_left,
-                               const char *editor_cmd,
-                               const char *base_dir,
-                               const svn_string_t *contents,
-                               const char *prefix,
-                               apr_hash_t *config,
-                               svn_boolean_t as_text,
-                               const char *encoding,
-                               apr_pool_t *pool);
-
-
-/* Search for a text editor command in standard environment variables,
-   and invoke it to edit PATH.  Use POOL for all allocations.
-
-   If EDITOR_CMD is not NULL, it is the name of the external editor
-   command to use, overriding anything else that might determine the
-   editor.
-
-   CONFIG is a hash of svn_config_t * items keyed on a configuration
-   category (SVN_CONFIG_CATEGORY_CONFIG et al), and may be NULL.  */
-svn_error_t *
-svn_cl__edit_file_externally(const char *path,
-                             const char *editor_cmd,
-                             apr_hash_t *config,
-                             apr_pool_t *pool);
-
 /* Search for a merge tool command in environment variables,
    and use it to perform the merge of the four given files.
    WC_PATH is the path of the file that is in conflict, relative

Modified: subversion/branches/tweak-build-take-two/subversion/svn/conflict-callbacks.c
URL: http://svn.apache.org/viewvc/subversion/branches/tweak-build-take-two/subversion/svn/conflict-callbacks.c?rev=1425612&r1=1425611&r2=1425612&view=diff
==============================================================================
--- subversion/branches/tweak-build-take-two/subversion/svn/conflict-callbacks.c (original)
+++ subversion/branches/tweak-build-take-two/subversion/svn/conflict-callbacks.c Mon Dec 24 09:49:03 2012
@@ -38,6 +38,8 @@
 #include "cl.h"
 #include "tree-conflicts.h"
 
+#include "private/svn_cmdline_private.h"
+
 #include "svn_private_config.h"
 
 
@@ -203,8 +205,8 @@ open_editor(svn_boolean_t *performed_edi
 
   if (desc->merged_file)
     {
-      err = svn_cl__edit_file_externally(desc->merged_file, b->editor_cmd,
-                                         b->config, pool);
+      err = svn_cmdline__edit_file_externally(desc->merged_file, b->editor_cmd,
+                                              b->config, pool);
       if (err && (err->apr_err == SVN_ERR_CL_NO_EXTERNAL_EDITOR))
         {
           svn_error_t *root_err = svn_error_root_cause(err);
@@ -804,9 +806,9 @@ svn_cl__conflict_func_interactive(svn_wc
               return SVN_NO_ERROR;
             }
 
-          err = svn_cl__edit_file_externally(desc->merged_file,
-                                             b->editor_cmd, b->config,
-                                             scratch_pool);
+          err = svn_cmdline__edit_file_externally(desc->merged_file,
+                                                  b->editor_cmd, b->config,
+                                                  scratch_pool);
           if (err && (err->apr_err == SVN_ERR_CL_NO_EXTERNAL_EDITOR))
             {
               SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool, "%s\n",

Modified: subversion/branches/tweak-build-take-two/subversion/svn/file-merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/tweak-build-take-two/subversion/svn/file-merge.c?rev=1425612&r1=1425611&r2=1425612&view=diff
==============================================================================
--- subversion/branches/tweak-build-take-two/subversion/svn/file-merge.c (original)
+++ subversion/branches/tweak-build-take-two/subversion/svn/file-merge.c Mon Dec 24 09:49:03 2012
@@ -37,6 +37,7 @@
 
 #include "svn_private_config.h"
 #include "private/svn_utf_private.h"
+#include "private/svn_cmdline_private.h"
 #include "private/svn_dep_compat.h"
 
 #if APR_HAVE_SYS_IOCTL_H
@@ -491,8 +492,8 @@ edit_chunk(apr_array_header_t **merged_c
     }
   SVN_ERR(svn_io_file_flush_to_disk(temp_file, scratch_pool));
 
-  err = svn_cl__edit_file_externally(temp_file_name, editor_cmd,
-                                     config, scratch_pool);
+  err = svn_cmdline__edit_file_externally(temp_file_name, editor_cmd,
+                                          config, scratch_pool);
   if (err && (err->apr_err == SVN_ERR_CL_NO_EXTERNAL_EDITOR))
     {
       svn_error_t *root_err = svn_error_root_cause(err);

Modified: subversion/branches/tweak-build-take-two/subversion/svn/propedit-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/tweak-build-take-two/subversion/svn/propedit-cmd.c?rev=1425612&r1=1425611&r2=1425612&view=diff
==============================================================================
--- subversion/branches/tweak-build-take-two/subversion/svn/propedit-cmd.c (original)
+++ subversion/branches/tweak-build-take-two/subversion/svn/propedit-cmd.c Mon Dec 24 09:49:03 2012
@@ -39,6 +39,7 @@
 #include "svn_props.h"
 #include "cl.h"
 
+#include "private/svn_cmdline_private.h"
 #include "svn_private_config.h"
 
 
@@ -137,8 +138,8 @@ svn_cl__propedit(apr_getopt_t *os,
       /* Run the editor on a temporary file which contains the
          original property value... */
       SVN_ERR(svn_io_temp_dir(&temp_dir, pool));
-      SVN_ERR(svn_cl__edit_string_externally
-              (&propval, NULL,
+      SVN_ERR(svn_cmdline__edit_string_externally(
+               &propval, NULL,
                opt_state->editor_cmd, temp_dir,
                propval, "svn-prop",
                ctx->config,
@@ -272,16 +273,16 @@ svn_cl__propedit(apr_getopt_t *os,
 
           /* Run the editor on a temporary file which contains the
              original property value... */
-          SVN_ERR(svn_cl__edit_string_externally(&edited_propval, NULL,
-                                                 opt_state->editor_cmd,
-                                                 base_dir,
-                                                 propval,
-                                                 "svn-prop",
-                                                 ctx->config,
-                                                 svn_prop_needs_translation
-                                                 (pname_utf8),
-                                                 opt_state->encoding,
-                                                 subpool));
+          SVN_ERR(svn_cmdline__edit_string_externally(&edited_propval, NULL,
+                                                      opt_state->editor_cmd,
+                                                      base_dir,
+                                                      propval,
+                                                      "svn-prop",
+                                                      ctx->config,
+                                                      svn_prop_needs_translation
+                                                      (pname_utf8),
+                                                      opt_state->encoding,
+                                                      subpool));
 
           target_local = svn_path_is_url(target) ? target
             : svn_dirent_local_style(target, subpool);



Mime
View raw message