subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1811552 [5/5] - in /subversion/branches/shelve: ./ subversion/include/ subversion/include/private/ subversion/libsvn_client/ subversion/libsvn_ra_serf/ subversion/libsvn_repos/ subversion/libsvn_subr/ subversion/libsvn_subr/lz4/ subversion...
Date Mon, 09 Oct 2017 11:26:08 GMT
Modified: subversion/branches/shelve/subversion/svn/svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve/subversion/svn/svn.c?rev=1811552&r1=1811551&r2=1811552&view=diff
==============================================================================
--- subversion/branches/shelve/subversion/svn/svn.c (original)
+++ subversion/branches/shelve/subversion/svn/svn.c Mon Oct  9 11:26:07 2017
@@ -405,7 +405,9 @@ const apr_getopt_option_t svn_cl__option
   {"show-inherited-props", opt_show_inherited_props, 0,
                        N_("retrieve properties set on parents of the target")},
   {"search", opt_search, 1,
-                       N_("use ARG as search pattern (glob syntax)")},
+                       N_("use ARG as search pattern (glob syntax, case-\n"
+                       "                             "
+                       "and accent-insensitive)")},
   {"search-and", opt_search_and, 1,
                        N_("combine ARG with the previous search pattern")},
   {"log", opt_mergeinfo_log, 0,
@@ -809,6 +811,10 @@ const svn_opt_subcommand_desc2_t svn_cl_
      "  The default TARGET is '.', meaning the repository URL of the current\n"
      "  working directory.\n"
      "\n"
+     "  Multiple --search patterns may be specified and the output will be\n"
+     "  reduced to those paths whose last segment - i.e. the file or directory\n"
+     "  name - matches at least one of these patterns.\n"
+     "\n"
      "  With --verbose, the following fields will be shown for each item:\n"
      "\n"
      "    Revision number of the last commit\n"

Modified: subversion/branches/shelve/subversion/svnadmin/svnadmin.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve/subversion/svnadmin/svnadmin.c?rev=1811552&r1=1811551&r2=1811552&view=diff
==============================================================================
--- subversion/branches/shelve/subversion/svnadmin/svnadmin.c (original)
+++ subversion/branches/shelve/subversion/svnadmin/svnadmin.c Mon Oct  9 11:26:07 2017
@@ -151,7 +151,8 @@ enum svnadmin__cmdline_options_t
     svnadmin__compatible_version,
     svnadmin__check_normalization,
     svnadmin__metadata_only,
-    svnadmin__no_flush_to_disk
+    svnadmin__no_flush_to_disk,
+    svnadmin__normalize_props
   };
 
 /* Option codes and descriptions.
@@ -274,6 +275,10 @@ static const apr_getopt_option_t options
      N_("disable flushing to disk during the operation\n"
         "                             (faster, but unsafe on power off)")},
 
+    {"normalize-props", svnadmin__normalize_props, 0,
+     N_("normalize property values found in the dumpstream\n"
+        "                             (currently, only translates non-LF line endings)")},
+
     {NULL}
   };
 
@@ -396,7 +401,8 @@ static const svn_opt_subcommand_desc2_t
    {'q', 'r', svnadmin__ignore_uuid, svnadmin__force_uuid,
     svnadmin__ignore_dates,
     svnadmin__use_pre_commit_hook, svnadmin__use_post_commit_hook,
-    svnadmin__parent_dir, svnadmin__bypass_prop_validation, 'M',
+    svnadmin__parent_dir, svnadmin__normalize_props,
+    svnadmin__bypass_prop_validation, 'M',
     svnadmin__no_flush_to_disk, 'F'},
    {{'F', N_("read from file ARG instead of stdin")}} },
 
@@ -407,8 +413,8 @@ static const svn_opt_subcommand_desc2_t
     "repository will cause an error.  Progress feedback is sent to stdout.\n"
     "If --revision is specified, limit the loaded revisions to only those\n"
     "in the dump stream whose revision numbers match the specified range.\n"),
-   {'q', 'r', svnadmin__force_uuid, svnadmin__bypass_prop_validation,
-    svnadmin__no_flush_to_disk, 'F'},
+   {'q', 'r', svnadmin__force_uuid, svnadmin__normalize_props,
+    svnadmin__bypass_prop_validation, svnadmin__no_flush_to_disk, 'F'},
    {{'F', N_("read from file ARG instead of stdin")}} },
 
   {"lock", subcommand_lock, {0}, N_
@@ -547,6 +553,7 @@ struct svnadmin_opt_state
   svn_boolean_t bypass_prop_validation;             /* --bypass-prop-validation */
   svn_boolean_t ignore_dates;                       /* --ignore-dates */
   svn_boolean_t no_flush_to_disk;                   /* --no-flush-to-disk */
+  svn_boolean_t normalize_props;                    /* --normalize_props */
   enum svn_repos_load_uuid uuid_action;             /* --ignore-uuid,
                                                        --force-uuid */
   apr_uint64_t memory_cache_size;                   /* --memory-cache-size M */
@@ -1534,20 +1541,32 @@ subcommand_load(apr_getopt_t *os, void *
   if (! opt_state->quiet)
     feedback_stream = recode_stream_create(stdout, pool);
 
-  err = svn_repos_load_fs5(repos, in_stream, lower, upper,
+  err = svn_repos_load_fs6(repos, in_stream, lower, upper,
                            opt_state->uuid_action, opt_state->parent_dir,
                            opt_state->use_pre_commit_hook,
                            opt_state->use_post_commit_hook,
                            !opt_state->bypass_prop_validation,
+                           opt_state->normalize_props,
                            opt_state->ignore_dates,
                            opt_state->quiet ? NULL : repos_notify_handler,
                            feedback_stream, check_cancel, NULL, pool);
-  if (err && err->apr_err == SVN_ERR_BAD_PROPERTY_VALUE)
-    return svn_error_quick_wrap(err,
-                                _("Invalid property value found in "
-                                  "dumpstream; consider repairing the source "
-                                  "or using --bypass-prop-validation while "
-                                  "loading."));
+
+  if (svn_error_find_cause(err, SVN_ERR_BAD_PROPERTY_VALUE_EOL))
+    {
+      return svn_error_quick_wrap(err,
+                                  _("A property with invalid line ending "
+                                    "found in dumpstream; consider using "
+                                    "--normalize-props while loading."));
+    }
+  else if (err && err->apr_err == SVN_ERR_BAD_PROPERTY_VALUE)
+    {
+      return svn_error_quick_wrap(err,
+                                  _("Invalid property value found in "
+                                    "dumpstream; consider repairing the "
+                                    "source or using --bypass-prop-validation "
+                                    "while loading."));
+    }
+
   return err;
 }
 
@@ -1584,16 +1603,28 @@ subcommand_load_revprops(apr_getopt_t *o
 
   err = svn_repos_load_fs_revprops(repos, in_stream, lower, upper,
                                    !opt_state->bypass_prop_validation,
+                                   opt_state->normalize_props,
                                    opt_state->ignore_dates,
                                    opt_state->quiet ? NULL
                                                     : repos_notify_handler,
                                    feedback_stream, check_cancel, NULL, pool);
-  if (err && err->apr_err == SVN_ERR_BAD_PROPERTY_VALUE)
-    return svn_error_quick_wrap(err,
-                                _("Invalid property value found in "
-                                  "dumpstream; consider repairing the source "
-                                  "or using --bypass-prop-validation while "
-                                  "loading."));
+
+  if (svn_error_find_cause(err, SVN_ERR_BAD_PROPERTY_VALUE_EOL))
+    {
+      return svn_error_quick_wrap(err,
+                                  _("A property with invalid line ending "
+                                    "found in dumpstream; consider using "
+                                    "--normalize-props while loading."));
+    }
+  else if (err && err->apr_err == SVN_ERR_BAD_PROPERTY_VALUE)
+    {
+      return svn_error_quick_wrap(err,
+                                  _("Invalid property value found in "
+                                    "dumpstream; consider repairing the "
+                                    "source or using --bypass-prop-validation "
+                                    "while loading."));
+    }
+
   return err;
 }
 
@@ -2884,6 +2915,9 @@ sub_main(int *exit_code, int argc, const
       case svnadmin__no_flush_to_disk:
         opt_state.no_flush_to_disk = TRUE;
         break;
+      case svnadmin__normalize_props:
+        opt_state.normalize_props = TRUE;
+        break;
       default:
         {
           SVN_ERR(subcommand_help(NULL, NULL, pool));

Modified: subversion/branches/shelve/subversion/svnrdump/load_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve/subversion/svnrdump/load_editor.c?rev=1811552&r1=1811551&r2=1811552&view=diff
==============================================================================
--- subversion/branches/shelve/subversion/svnrdump/load_editor.c (original)
+++ subversion/branches/shelve/subversion/svnrdump/load_editor.c Mon Oct  9 11:26:07 2017
@@ -713,16 +713,15 @@ set_revision_property(void *baton,
 {
   struct revision_baton *rb = baton;
 
-  SVN_ERR(svn_rdump__normalize_prop(name, &value, rb->pool));
-
+  SVN_ERR(svn_repos__normalize_prop(&value, NULL, name, value,
+                                    rb->pool, rb->pool));
   SVN_ERR(svn_repos__validate_prop(name, value, rb->pool));
 
   if (rb->rev > 0)
     {
       if (! svn_hash_gets(rb->pb->skip_revprops, name))
         svn_hash_sets(rb->revprop_table,
-                      apr_pstrdup(rb->pool, name),
-                      svn_string_dup(value, rb->pool));
+                      apr_pstrdup(rb->pool, name), value);
     }
   else if (rb->rev_offset == -1
            && ! svn_hash_gets(rb->pb->skip_revprops, name))
@@ -737,9 +736,9 @@ set_revision_property(void *baton,
   /* Remember any datestamp/ author that passes through (see comment
      in close_revision). */
   if (!strcmp(name, SVN_PROP_REVISION_DATE))
-    rb->datestamp = svn_string_dup(value, rb->pool);
+    rb->datestamp = value;
   if (!strcmp(name, SVN_PROP_REVISION_AUTHOR))
-    rb->author = svn_string_dup(value, rb->pool);
+    rb->author = value;
 
   return SVN_NO_ERROR;
 }
@@ -776,13 +775,13 @@ set_node_property(void *baton,
       value = new_value;
     }
 
-  SVN_ERR(svn_rdump__normalize_prop(name, &value, pool));
+  SVN_ERR(svn_repos__normalize_prop(&value, NULL, name, value, pool, pool));
 
   SVN_ERR(svn_repos__validate_prop(name, value, pool));
 
   prop = apr_palloc(nb->rb->pool, sizeof (*prop));
   prop->name = apr_pstrdup(pool, name);
-  prop->value = svn_string_dup(value, pool);
+  prop->value = value;
   svn_hash_sets(nb->prop_changes, prop->name, prop);
 
   return SVN_NO_ERROR;

Modified: subversion/branches/shelve/subversion/svnrdump/svnrdump.h
URL: http://svn.apache.org/viewvc/subversion/branches/shelve/subversion/svnrdump/svnrdump.h?rev=1811552&r1=1811551&r2=1811552&view=diff
==============================================================================
--- subversion/branches/shelve/subversion/svnrdump/svnrdump.h (original)
+++ subversion/branches/shelve/subversion/svnrdump/svnrdump.h Mon Oct  9 11:26:07 2017
@@ -100,29 +100,12 @@ svn_rdump__load_dumpstream(svn_stream_t
  * currently all svn:* props) so that they contain only LF (\n) line endings.
  *
  * Put the normalized props into NORMAL_PROPS, allocated in RESULT_POOL.
- *
- * Note: this function does not do a deep copy; it is expected that PROPS has
- * a longer lifetime than NORMAL_PROPS.
  */
 svn_error_t *
 svn_rdump__normalize_props(apr_hash_t **normal_props,
                            apr_hash_t *props,
                            apr_pool_t *result_pool);
 
-/* Normalize the line ending style of a single property that "needs
- * translation" (according to svn_prop_needs_translation(),
- * currently all svn:* props) so that they contain only LF (\n) line endings.
- * "\r" characters found mid-line are replaced with "\n".
- * "\r\n" sequences are replaced with "\n"
- *
- * NAME is used to check that VALUE should be normalized, and if this is the
- * case, VALUE is then normalized, allocated from RESULT_POOL
- */
-svn_error_t *
-svn_rdump__normalize_prop(const char *name,
-                          const svn_string_t **value,
-                          apr_pool_t *result_pool);
-
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */

Modified: subversion/branches/shelve/subversion/svnrdump/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve/subversion/svnrdump/util.c?rev=1811552&r1=1811551&r2=1811552&view=diff
==============================================================================
--- subversion/branches/shelve/subversion/svnrdump/util.c (original)
+++ subversion/branches/shelve/subversion/svnrdump/util.c Mon Oct  9 11:26:07 2017
@@ -21,53 +21,35 @@
  * ====================================================================
  */
 
-#include "svn_error.h"
-#include "svn_pools.h"
-#include "svn_string.h"
-#include "svn_props.h"
-#include "svn_subst.h"
+#include "private/svn_repos_private.h"
 
 #include "svnrdump.h"
 
 
 svn_error_t *
-svn_rdump__normalize_prop(const char *name,
-                          const svn_string_t **value,
-                          apr_pool_t *result_pool)
-{
-  if (svn_prop_needs_translation(name) && *value)
-    {
-      const char *cstring;
-
-      SVN_ERR(svn_subst_translate_cstring2((*value)->data, &cstring,
-                                           "\n", TRUE,
-                                           NULL, FALSE,
-                                           result_pool));
-
-      *value = svn_string_create(cstring, result_pool);
-    }
-  return SVN_NO_ERROR;
-}
-
-svn_error_t *
 svn_rdump__normalize_props(apr_hash_t **normal_props,
                            apr_hash_t *props,
                            apr_pool_t *result_pool)
 {
   apr_hash_index_t *hi;
+  apr_pool_t *iterpool;
 
   *normal_props = apr_hash_make(result_pool);
 
+  iterpool = svn_pool_create(result_pool);
   for (hi = apr_hash_first(result_pool, props); hi;
         hi = apr_hash_next(hi))
     {
       const char *key = apr_hash_this_key(hi);
       const svn_string_t *value = apr_hash_this_val(hi);
 
-      SVN_ERR(svn_rdump__normalize_prop(key, &value,
-                                        result_pool));
+      svn_pool_clear(iterpool);
 
+      SVN_ERR(svn_repos__normalize_prop(&value, NULL, key, value,
+                                        result_pool, iterpool));
       svn_hash_sets(*normal_props, key, value);
     }
+  svn_pool_destroy(iterpool);
+
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/shelve/subversion/tests/cmdline/basic_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/shelve/subversion/tests/cmdline/basic_tests.py?rev=1811552&r1=1811551&r2=1811552&view=diff
==============================================================================
--- subversion/branches/shelve/subversion/tests/cmdline/basic_tests.py (original)
+++ subversion/branches/shelve/subversion/tests/cmdline/basic_tests.py Mon Oct  9 11:26:07 2017
@@ -3126,7 +3126,19 @@ def filtered_ls(sbox):
                "gamma\n" ]
 
   exit_code, output, error = svntest.actions.run_and_verify_svn(
-    None, [], 'ls', path, '--depth=infinity', '--search=*a')
+    expected, [], 'ls', path, '--depth=infinity', '--search=*a')
+
+  # check case-insensitivity
+  exit_code, output, error = svntest.actions.run_and_verify_svn(
+    expected, [], 'ls', path, '--depth=infinity', '--search=*A')
+
+  expected = [ "H/\n" ]
+  exit_code, output, error = svntest.actions.run_and_verify_svn(
+    expected, [], 'ls', path, '--depth=infinity', '--search=h')
+
+  # we don't match full paths
+  exit_code, output, error = svntest.actions.run_and_verify_svn(
+    [], [], 'ls', path, '--depth=infinity', '--search=*/*')
 
 ########################################################################
 # Run the tests

Modified: subversion/branches/shelve/subversion/tests/cmdline/davautocheck.sh
URL: http://svn.apache.org/viewvc/subversion/branches/shelve/subversion/tests/cmdline/davautocheck.sh?rev=1811552&r1=1811551&r2=1811552&view=diff
==============================================================================
--- subversion/branches/shelve/subversion/tests/cmdline/davautocheck.sh (original)
+++ subversion/branches/shelve/subversion/tests/cmdline/davautocheck.sh Mon Oct  9 11:26:07 2017
@@ -699,6 +699,15 @@ RedirectMatch permanent ^/svn-test-work/
 RedirectMatch           ^/svn-test-work/repositories/REDIRECT-TEMP-(.*)\$ /svn-test-work/repositories/\$1
 __EOF__
 
+
+# Our configure script extracts the HTTPD version from
+# headers. However, that may not be the same as the runtime version;
+# an example of this discrepancy occurs on OSX 1.9.5, where the
+# headers report 2.2.26 but the server reports 2.2.29. Since our tests
+# use the version to interpret test case results, use the actual
+# runtime version here to avoid spurious test failures.
+HTTPD_VERSION=$("$HTTPD" -V -f $HTTPD_CFG | grep '^Server version:' | sed 's|^.*/\([0-9]*\.[0-9]*\.[0-9]*\).*$|\1|')
+
 START="$HTTPD -f $HTTPD_CFG"
 printf \
 '#!/bin/sh
@@ -715,14 +724,14 @@ fi
 ' >$STOPSCRIPT "$HTTPD_ROOT" "$START" "$HTTPD_PID" "$HTTPD_PID"
 chmod +x $STOPSCRIPT
 
-$START -t \
+$START -t > /dev/null \
   || fail "Configuration file didn't pass the check, most likely modules couldn't be loaded"
 
 # need to pause for some time to let HTTPD start
 $START &
 sleep 2
 
-say "HTTPD started and listening on '$BASE_URL'..."
+say "HTTPD $HTTPD_VERSION started and listening on '$BASE_URL'..."
 #query "Ready" "y"
 
 # Perform a trivial validation of our httpd configuration by
@@ -779,13 +788,13 @@ else
 fi
 
 if [ $# = 0 ]; then
-  TIME_CMD "$MAKE" check "BASE_URL=$BASE_URL" $SSL_MAKE_VAR
+  TIME_CMD "$MAKE" check "BASE_URL=$BASE_URL" "HTTPD_VERSION=$HTTPD_VERSION" $SSL_MAKE_VAR
   r=$?
 else
   (cd "$ABS_BUILDDIR/subversion/tests/cmdline/"
   TEST="$1"
   shift
-  TIME_CMD "$ABS_SRCDIR/subversion/tests/cmdline/${TEST}_tests.py" "--url=$BASE_URL" $SSL_TEST_ARG "$@")
+  TIME_CMD "$ABS_SRCDIR/subversion/tests/cmdline/${TEST}_tests.py" "--url=$BASE_URL" "--httpd-version=$HTTPD_VERSION" $SSL_TEST_ARG "$@")
   r=$?
 fi
 

Modified: subversion/branches/shelve/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout
URL: http://svn.apache.org/viewvc/subversion/branches/shelve/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout?rev=1811552&r1=1811551&r2=1811552&view=diff
==============================================================================
--- subversion/branches/shelve/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout (original)
+++ subversion/branches/shelve/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout Mon Oct  9 11:26:07 2017
@@ -126,7 +126,8 @@ Valid options:
                                --ignore-eol-style: Ignore changes in EOL style
                                -U ARG, --context ARG: Show ARG lines of context
                                -p, --show-c-function: Show C function name
-  --search ARG             : use ARG as search pattern (glob syntax)
+  --search ARG             : use ARG as search pattern (glob syntax, case-
+                             and accent-insensitive)
   --search-and ARG         : combine ARG with the previous search pattern
 
 Global options:

Modified: subversion/branches/shelve/subversion/tests/cmdline/svnadmin_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/shelve/subversion/tests/cmdline/svnadmin_tests.py?rev=1811552&r1=1811551&r2=1811552&view=diff
==============================================================================
--- subversion/branches/shelve/subversion/tests/cmdline/svnadmin_tests.py (original)
+++ subversion/branches/shelve/subversion/tests/cmdline/svnadmin_tests.py Mon Oct  9 11:26:07 2017
@@ -276,7 +276,7 @@ def load_and_verify_dumpstream(sbox, exp
     'load', '--quiet', sbox.repo_dir, *varargs)
 
   if expected_stdout:
-    if expected_stdout == svntest.verify.AnyOutput:
+    if expected_stdout is svntest.verify.AnyOutput:
       if len(output) == 0:
         raise SVNExpectedStdout
     else:
@@ -284,7 +284,7 @@ def load_and_verify_dumpstream(sbox, exp
         "Standard output", "STDOUT:", expected_stdout, output)
 
   if expected_stderr:
-    if expected_stderr == svntest.verify.AnyOutput:
+    if expected_stderr is svntest.verify.AnyOutput:
       if len(errput) == 0:
         raise SVNExpectedStderr
     else:
@@ -1616,14 +1616,34 @@ text
   sbox.build(empty=True)
 
   # Try to load the dumpstream, expecting a failure (because of mixed EOLs).
-  load_and_verify_dumpstream(sbox, [], svntest.verify.AnyOutput,
-                             dumpfile_revisions, False, dump_str,
-                             '--ignore-uuid')
+  exp_err = svntest.verify.RegexListOutput(['svnadmin: E125005',
+                                            'svnadmin: E125005',
+                                            'svnadmin: E125017'],
+                                           match_all=False)
+  load_and_verify_dumpstream(sbox, [], exp_err, dumpfile_revisions,
+                             False, dump_str, '--ignore-uuid')
 
   # Now try it again bypassing prop validation.  (This interface takes
   # care of the removal and recreation of the original repository.)
   svntest.actions.load_repo(sbox, dump_str=dump_str,
                             bypass_prop_validation=True)
+  # Getting the property should fail.
+  svntest.actions.run_and_verify_svn(None, 'svn: E135000: ',
+                                     'pg', 'svn:log', '--revprop', '-r1',
+                                     sbox.repo_url)
+
+  # Now try it again with prop normalization.
+  svntest.actions.load_repo(sbox, dump_str=dump_str,
+                            bypass_prop_validation=False,
+                            normalize_props=True)
+  # We should get the expected property value.
+  exit_code, output, _ = svntest.main.run_svn(None, 'pg', 'svn:log',
+                                              '--revprop', '-r1',
+                                              '--no-newline',
+                                              sbox.repo_url)
+  svntest.verify.verify_exit_code(None, exit_code, 0)
+  if output != ['\n', '\n']:
+    raise svntest.Failure("Unexpected property value %s" % output)
 
 # This test intentionally corrupts a revision and assumes an FSFS
 # repository. If you can make it work with BDB please do so.

Modified: subversion/branches/shelve/subversion/tests/cmdline/svntest/actions.py
URL: http://svn.apache.org/viewvc/subversion/branches/shelve/subversion/tests/cmdline/svntest/actions.py?rev=1811552&r1=1811551&r2=1811552&view=diff
==============================================================================
--- subversion/branches/shelve/subversion/tests/cmdline/svntest/actions.py (original)
+++ subversion/branches/shelve/subversion/tests/cmdline/svntest/actions.py Mon Oct  9 11:26:07 2017
@@ -355,7 +355,8 @@ def run_and_verify_svn2(expected_stdout,
   return exit_code, out, err
 
 def run_and_verify_load(repo_dir, dump_file_content,
-                        bypass_prop_validation = False):
+                        bypass_prop_validation = False,
+                        normalize_props = False):
   "Runs 'svnadmin load' and reports any errors."
   if not isinstance(dump_file_content, list):
     raise TypeError("dump_file_content argument should have list type")
@@ -363,6 +364,8 @@ def run_and_verify_load(repo_dir, dump_f
   args = ()
   if bypass_prop_validation:
     args += ('--bypass-prop-validation',)
+  if normalize_props:
+    args += ('--normalize-props',)
   main.run_command_stdin(
     main.svnadmin_binary, expected_stderr, 0, True, dump_file_content,
     'load', '--force-uuid', '--quiet', repo_dir, *args)
@@ -473,7 +476,8 @@ def run_and_verify_svnsync2(expected_std
 
 
 def load_repo(sbox, dumpfile_path = None, dump_str = None,
-              bypass_prop_validation = False,create_wc=True):
+              bypass_prop_validation = False, create_wc=True,
+              normalize_props = False):
   "Loads the dumpfile into sbox"
   if not dump_str:
     dump_str = open(dumpfile_path, "rb").read()
@@ -485,7 +489,7 @@ def load_repo(sbox, dumpfile_path = None
 
   # Load the mergetracking dumpfile into the repos, and check it out the repo
   run_and_verify_load(sbox.repo_dir, dump_str.splitlines(True),
-                      bypass_prop_validation)
+                      bypass_prop_validation, normalize_props)
   if create_wc:
     run_and_verify_svn(None, [], "co", sbox.repo_url, sbox.wc_dir)
 

Modified: subversion/branches/shelve/subversion/tests/cmdline/upgrade_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/shelve/subversion/tests/cmdline/upgrade_tests.py?rev=1811552&r1=1811551&r2=1811552&view=diff
==============================================================================
--- subversion/branches/shelve/subversion/tests/cmdline/upgrade_tests.py (original)
+++ subversion/branches/shelve/subversion/tests/cmdline/upgrade_tests.py Mon Oct  9 11:26:07 2017
@@ -761,61 +761,6 @@ def dirs_only_upgrade(sbox):
       })
   run_and_verify_status_no_server(sbox.wc_dir, expected_status)
 
-def read_tree_conflict_data(sbox, path):
-  dot_svn = svntest.main.get_admin_name()
-  db = svntest.sqlite3.connect(os.path.join(sbox.wc_dir, dot_svn, 'wc.db'))
-  for row in db.execute("select tree_conflict_data from actual_node "
-                        "where tree_conflict_data is not null "
-                        "and local_relpath = '%s'" % path):
-    return
-  raise svntest.Failure("conflict expected for '%s'" % path)
-
-def no_actual_node(sbox, path):
-  dot_svn = svntest.main.get_admin_name()
-  db = svntest.sqlite3.connect(os.path.join(sbox.wc_dir, dot_svn, 'wc.db'))
-  for row in db.execute("select 1 from actual_node "
-                        "where local_relpath = '%s'" % path):
-    raise svntest.Failure("no actual node expected for '%s'" % path)
-
-def upgrade_tree_conflict_data(sbox):
-  "upgrade tree conflict data (f20->f21)"
-
-  wc_dir = sbox.wc_dir
-  replace_sbox_with_tarfile(sbox, 'upgrade_tc.tar.bz2')
-
-  # Check and see if we can still read our tree conflicts
-  expected_status = svntest.actions.get_virginal_state(wc_dir, 2)
-  expected_status.tweak('A/D/G/pi', status='D ', treeconflict='C')
-  expected_status.tweak('A/D/G/tau', status='! ', treeconflict='C',
-                        wc_rev=None)
-  expected_status.tweak('A/D/G/rho', status='A ', copied='+',
-                        treeconflict='C', wc_rev='-')
-
-  # Look inside pre-upgrade database
-  read_tree_conflict_data(sbox, 'A/D/G')
-  no_actual_node(sbox, 'A/D/G/pi')
-  no_actual_node(sbox, 'A/D/G/rho')
-  no_actual_node(sbox, 'A/D/G/tau')
-
-  # While the upgrade from f20 to f21 will work the upgrade from f22
-  # to f23 will not, since working nodes are present.
-  exit_code, output, errput = svntest.main.run_svn('format 22', 'upgrade',
-                                                    wc_dir)
-
-  if not exit_code:
-    run_and_verify_status_no_server(wc_dir, expected_status)
-  else:
-    if not svntest.verify.RegexOutput('.*format 22 with WORKING nodes.*',
-                                      match_all=False).matches(errput):
-      raise svntest.Failure()
-
-  # Look insde post-upgrade database
-  read_tree_conflict_data(sbox, 'A/D/G/pi')
-  read_tree_conflict_data(sbox, 'A/D/G/rho')
-  read_tree_conflict_data(sbox, 'A/D/G/tau')
-  # no_actual_node(sbox, 'A/D/G')  ### not removed but should be?
-
-
 @Issue(3898)
 def delete_in_copy_upgrade(sbox):
   "upgrade a delete within a copy"
@@ -972,27 +917,6 @@ def tree_replace2(sbox):
     })
   run_and_verify_status_no_server(sbox.wc_dir, expected_status)
 
-def upgrade_from_format_28(sbox):
-  """upgrade from format 28: rename pristines"""
-
-  # Start with a format-28 WC that is a clean checkout of the Greek tree.
-  replace_sbox_with_tarfile(sbox, 'format_28.tar.bz2')
-
-  # Get the old and new pristine file paths for file 'iota'.
-  checksum = '2c0aa9014a0cd07f01795a333d82485ef6d083e2'
-  old_pristine_path = os.path.join(sbox.wc_dir, svntest.main.get_admin_name(),
-                                   'pristine', checksum[0:2], checksum)
-  new_pristine_path = old_pristine_path + '.svn-base'
-
-  assert os.path.exists(old_pristine_path)
-  assert not os.path.exists(new_pristine_path)
-
-  # Upgrade the WC
-  svntest.actions.run_and_verify_svn(None, [], 'upgrade', sbox.wc_dir)
-
-  assert not os.path.exists(old_pristine_path)
-  assert os.path.exists(new_pristine_path)
-
 @Issue(3901)
 def depth_exclude(sbox):
   "upgrade 1.6.x wc that has depth=exclude"
@@ -1606,13 +1530,11 @@ test_list = [ None,
               missing_dirs2,
               delete_and_keep_local,
               dirs_only_upgrade,
-              upgrade_tree_conflict_data,
               delete_in_copy_upgrade,
               replaced_files,
               upgrade_with_scheduled_change,
               tree_replace1,
               tree_replace2,
-              upgrade_from_format_28,
               depth_exclude,
               depth_exclude_2,
               add_add_del_del_tc,

Modified: subversion/branches/shelve/subversion/tests/libsvn_client/conflicts-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve/subversion/tests/libsvn_client/conflicts-test.c?rev=1811552&r1=1811551&r2=1811552&view=diff
==============================================================================
--- subversion/branches/shelve/subversion/tests/libsvn_client/conflicts-test.c (original)
+++ subversion/branches/shelve/subversion/tests/libsvn_client/conflicts-test.c Mon Oct  9 11:26:07 2017
@@ -162,6 +162,7 @@ assert_text_conflict_options(svn_client_
 /* Some paths we'll care about. */
 static const char *trunk_path = "A";
 static const char *branch_path = "A_branch";
+static const char *branch2_path = "A_branch2";
 static const char *new_file_name = "newfile.txt";
 static const char *new_file_name_branch = "newfile-on-branch.txt";
 static const char *deleted_file_name = "mu";
@@ -4578,89 +4579,6 @@ test_update_incoming_added_dir_merge2(co
   return SVN_NO_ERROR;
 }
 
-static svn_error_t *
-test_cherry_pick_post_move_edit(const svn_test_opts_t *opts,
-                                apr_pool_t *pool)
-{
-  svn_test__sandbox_t *b = apr_palloc(pool, sizeof(*b));
-  const char *trunk_url;
-  svn_opt_revision_t peg_rev;
-  apr_array_header_t *ranges_to_merge;
-  svn_opt_revision_range_t merge_range;
-  svn_client_ctx_t *ctx;
-  svn_client_conflict_t *conflict;
-  svn_boolean_t tree_conflicted;
-
-  SVN_ERR(svn_test__sandbox_create(b,
-                                   "test_cherry_pick_post_move_edit",
-                                   opts, pool));
-
-  SVN_ERR(sbox_add_and_commit_greek_tree(b)); /* r1 */
-  /* Create a copy of node "A". */
-  SVN_ERR(sbox_wc_copy(b, "A", "A1"));
-  SVN_ERR(sbox_wc_commit(b, "")); /* r2 */
-  /* On "trunk", move the file mu. */
-  SVN_ERR(sbox_wc_move(b, "A/mu", "A/mu-moved"));
-  SVN_ERR(sbox_wc_commit(b, "")); /* r3 */
-  /* On "trunk", edit mu-moved. This will be r4, which we'll cherry-pick. */
-  SVN_ERR(sbox_file_write(b, "A/mu-moved", "Modified content.\n"));
-  SVN_ERR(sbox_wc_commit(b, "")); /* r4 */
-  SVN_ERR(sbox_wc_update(b, "", SVN_INVALID_REVNUM));
-
-  /* Perform a cherry-pick merge of r4 from A to A1. */
-  SVN_ERR(svn_test__create_client_ctx(&ctx, b, b->pool));
-  trunk_url = apr_pstrcat(b->pool, b->repos_url, "/A", SVN_VA_NULL);
-  peg_rev.kind = svn_opt_revision_number;
-  peg_rev.value.number = 4;
-  merge_range.start.kind = svn_opt_revision_number;
-  merge_range.start.value.number = 3;
-  merge_range.end.kind = svn_opt_revision_number;
-  merge_range.end.value.number = 4;
-  ranges_to_merge = apr_array_make(b->pool, 1,
-                                   sizeof(svn_opt_revision_range_t *));
-  APR_ARRAY_PUSH(ranges_to_merge, svn_opt_revision_range_t *) = &merge_range;
-  /* This should raise a "local delete or move vs incoming edit" conflict. */
-  SVN_ERR(svn_client_merge_peg5(trunk_url, ranges_to_merge, &peg_rev,
-                                sbox_wc_path(b, "A1"), svn_depth_infinity,
-                                FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
-                                NULL, ctx, b->pool));
-
-  SVN_ERR(svn_client_conflict_get(&conflict, sbox_wc_path(b, "A1/mu-moved"),
-                                  ctx, b->pool, b->pool));
-  SVN_ERR(svn_client_conflict_get_conflicted(NULL, NULL, &tree_conflicted,
-                                             conflict, b->pool, b->pool));
-  SVN_TEST_ASSERT(tree_conflicted);
-  {
-    svn_client_conflict_option_id_t expected_opts[] = {
-      svn_client_conflict_option_postpone,
-      svn_client_conflict_option_accept_current_wc_state,
-      -1 /* end of list */
-    };
-    SVN_ERR(assert_tree_conflict_options(conflict, ctx, expected_opts,
-                                         b->pool));
-  }
-
-  SVN_ERR(svn_client_conflict_tree_get_details(conflict, ctx, b->pool));
-  {
-    svn_client_conflict_option_id_t expected_opts[] = {
-      svn_client_conflict_option_postpone,
-      svn_client_conflict_option_accept_current_wc_state,
-      svn_client_conflict_option_local_move_file_text_merge,
-      -1 /* end of list */
-    };
-    SVN_ERR(assert_tree_conflict_options(conflict, ctx, expected_opts,
-                                         b->pool));
-  }
-
-  /* Try to resolve the conflict. */
-  SVN_ERR(svn_client_conflict_tree_resolve_by_id(
-            conflict,
-            svn_client_conflict_option_local_move_file_text_merge,
-            ctx, b->pool));
-
-  return SVN_NO_ERROR;
-}
-
 /* Regression test for chrash fixed in r1780259. */
 static svn_error_t *
 test_cherry_pick_moved_file_with_propdel(const svn_test_opts_t *opts,
@@ -4976,6 +4894,288 @@ test_merge_incoming_move_file_text_merge
   return SVN_NO_ERROR;
 }
 
+static svn_error_t *
+test_cherry_pick_post_move_edit(const svn_test_opts_t *opts,
+                                apr_pool_t *pool)
+{
+  svn_test__sandbox_t *b = apr_palloc(pool, sizeof(*b));
+  const char *trunk_url;
+  svn_opt_revision_t peg_rev;
+  apr_array_header_t *ranges_to_merge;
+  svn_opt_revision_range_t merge_range;
+  svn_client_ctx_t *ctx;
+  svn_client_conflict_t *conflict;
+  svn_boolean_t tree_conflicted;
+  svn_stringbuf_t *buf;
+
+  SVN_ERR(svn_test__sandbox_create(b,
+                                   "test_cherry_pick_post_move_edit",
+                                   opts, pool));
+
+  SVN_ERR(sbox_add_and_commit_greek_tree(b)); /* r1 */
+  /* Create a copy of node "A". */
+  SVN_ERR(sbox_wc_copy(b, "A", "A1"));
+  SVN_ERR(sbox_wc_commit(b, "")); /* r2 */
+  /* On "trunk", move the file mu. */
+  SVN_ERR(sbox_wc_move(b, "A/mu", "A/mu-moved"));
+  SVN_ERR(sbox_wc_commit(b, "")); /* r3 */
+  /* On "trunk", edit mu-moved. This will be r4. */
+  SVN_ERR(sbox_file_write(b, "A/mu-moved", "Modified content." APR_EOL_STR));
+  SVN_ERR(sbox_wc_commit(b, "")); /* r4 */
+  /* On "trunk", edit mu-moved. This will be r5, which we'll cherry-pick. */
+  SVN_ERR(sbox_file_write(b, "A/mu-moved",
+                          "More modified content." APR_EOL_STR));
+  SVN_ERR(sbox_wc_commit(b, "")); /* r5 */
+  SVN_ERR(sbox_wc_update(b, "", SVN_INVALID_REVNUM));
+
+  /* Perform a cherry-pick merge of r5 from A to A1. */
+  SVN_ERR(svn_test__create_client_ctx(&ctx, b, b->pool));
+  trunk_url = apr_pstrcat(b->pool, b->repos_url, "/A", SVN_VA_NULL);
+  peg_rev.kind = svn_opt_revision_number;
+  peg_rev.value.number = 5;
+  merge_range.start.kind = svn_opt_revision_number;
+  merge_range.start.value.number = 4;
+  merge_range.end.kind = svn_opt_revision_number;
+  merge_range.end.value.number = 5;
+  ranges_to_merge = apr_array_make(b->pool, 1,
+                                   sizeof(svn_opt_revision_range_t *));
+  APR_ARRAY_PUSH(ranges_to_merge, svn_opt_revision_range_t *) = &merge_range;
+  /* This should raise a "local delete or move vs incoming edit" conflict. */
+  SVN_ERR(svn_client_merge_peg5(trunk_url, ranges_to_merge, &peg_rev,
+                                sbox_wc_path(b, "A1"), svn_depth_infinity,
+                                FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
+                                NULL, ctx, b->pool));
+
+  SVN_ERR(svn_client_conflict_get(&conflict, sbox_wc_path(b, "A1/mu-moved"),
+                                  ctx, b->pool, b->pool));
+  SVN_ERR(svn_client_conflict_get_conflicted(NULL, NULL, &tree_conflicted,
+                                             conflict, b->pool, b->pool));
+  SVN_TEST_ASSERT(tree_conflicted);
+  {
+    svn_client_conflict_option_id_t expected_opts[] = {
+      svn_client_conflict_option_postpone,
+      svn_client_conflict_option_accept_current_wc_state,
+      -1 /* end of list */
+    };
+    SVN_ERR(assert_tree_conflict_options(conflict, ctx, expected_opts,
+                                         b->pool));
+  }
+
+  SVN_ERR(svn_client_conflict_tree_get_details(conflict, ctx, b->pool));
+  {
+    svn_client_conflict_option_id_t expected_opts[] = {
+      svn_client_conflict_option_postpone,
+      svn_client_conflict_option_accept_current_wc_state,
+      svn_client_conflict_option_local_move_file_text_merge,
+      -1 /* end of list */
+    };
+    SVN_ERR(assert_tree_conflict_options(conflict, ctx, expected_opts,
+                                         b->pool));
+  }
+
+  /* Try to resolve the conflict. */
+  SVN_ERR(svn_client_conflict_tree_resolve_by_id(
+            conflict,
+            svn_client_conflict_option_local_move_file_text_merge,
+            ctx, b->pool));
+
+  /* The node "A1/mu-moved" should no longer exist. */
+  SVN_TEST_ASSERT_ERROR(svn_client_conflict_get(&conflict,
+                                                sbox_wc_path(b, "A1/mu-moved"),
+                                                ctx, pool, pool),
+                        SVN_ERR_WC_PATH_NOT_FOUND);
+
+  /* And "A1/mu" should have expected contents. */
+  SVN_ERR(svn_stringbuf_from_file2(&buf, sbox_wc_path(b, "A1/mu"), pool));
+  SVN_TEST_STRING_ASSERT(buf->data, "More modified content." APR_EOL_STR);
+
+  return SVN_NO_ERROR;
+}
+
+/* A helper function which prepares a working copy for the tests below. */
+static svn_error_t *
+create_wc_with_incoming_delete_dir_conflict_across_branches(
+  svn_test__sandbox_t *b)
+{
+  svn_client_ctx_t *ctx;
+  const char *trunk_url;
+  const char *branch_url;
+  svn_opt_revision_t opt_rev;
+  const char *deleted_path;
+  const char *deleted_child_path;
+  const char *move_target_path;
+
+  SVN_ERR(sbox_add_and_commit_greek_tree(b));
+
+  /* Create a branch of node "A". */
+  SVN_ERR(sbox_wc_copy(b, trunk_path, branch_path));
+  SVN_ERR(sbox_wc_commit(b, ""));
+
+  /* Create a second branch ("branch2") of the first branch. */
+  SVN_ERR(sbox_wc_copy(b, branch_path, branch2_path));
+  SVN_ERR(sbox_wc_commit(b, ""));
+
+  /* Move a directory on the trunk. */
+  deleted_path = svn_relpath_join(trunk_path, deleted_dir_name, b->pool);
+  move_target_path = svn_relpath_join(trunk_path, new_dir_name, b->pool);
+  SVN_ERR(sbox_wc_move(b, deleted_path, move_target_path));
+  SVN_ERR(sbox_wc_commit(b, ""));
+
+  /* Modify a file in that directory on branch2. */
+  deleted_child_path = svn_relpath_join(branch2_path,
+                                        svn_relpath_join(deleted_dir_name,
+                                                         deleted_dir_child,
+                                                         b->pool),
+                                        b->pool);
+  SVN_ERR(sbox_file_write(b, deleted_child_path,
+                          modified_file_on_branch_content));
+
+  SVN_ERR(svn_test__create_client_ctx(&ctx, b, b->pool));
+  opt_rev.kind = svn_opt_revision_head;
+  opt_rev.value.number = SVN_INVALID_REVNUM;
+  trunk_url = apr_pstrcat(b->pool, b->repos_url, "/", trunk_path,
+                          SVN_VA_NULL);
+  branch_url = apr_pstrcat(b->pool, b->repos_url, "/", branch_path,
+                          SVN_VA_NULL);
+
+  /* Commit modification and run a merge from the trunk to the branch.
+   * This merge should not raise a conflict. */
+  SVN_ERR(sbox_wc_commit(b, ""));
+  SVN_ERR(sbox_wc_update(b, "", SVN_INVALID_REVNUM));
+  SVN_ERR(svn_client_merge_peg5(trunk_url, NULL, &opt_rev,
+                                sbox_wc_path(b, branch_path),
+                                svn_depth_infinity,
+                                FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
+                                NULL, ctx, b->pool));
+
+  /* Commit merge result end run a merge from branch to branch2. */
+  SVN_ERR(sbox_wc_commit(b, ""));
+  SVN_ERR(sbox_wc_update(b, "", SVN_INVALID_REVNUM));
+
+  /* This should raise an "incoming delete vs local edit" tree conflict. */
+  SVN_ERR(svn_client_merge_peg5(branch_url, NULL, &opt_rev,
+                                sbox_wc_path(b, branch2_path),
+                                svn_depth_infinity,
+                                FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
+                                NULL, ctx, b->pool));
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+test_merge_incoming_move_dir_across_branches(const svn_test_opts_t *opts,
+                                             apr_pool_t *pool)
+{
+  svn_test__sandbox_t *b = apr_palloc(pool, sizeof(*b));
+  svn_client_ctx_t *ctx;
+  const char *deleted_path;
+  const char *moved_to_path;
+  const char *child_path;
+  svn_client_conflict_t *conflict;
+  struct status_baton sb;
+  struct svn_client_status_t *status;
+  svn_stringbuf_t *buf;
+  svn_opt_revision_t opt_rev;
+  apr_array_header_t *options;
+  svn_client_conflict_option_t *option;
+  apr_array_header_t *possible_moved_to_abspaths;
+
+  SVN_ERR(svn_test__sandbox_create(b,
+                                   "merge_incoming_move_dir accross branches",
+                                   opts, pool));
+
+  SVN_ERR(create_wc_with_incoming_delete_dir_conflict_across_branches(b));
+
+  deleted_path = svn_relpath_join(branch2_path, deleted_dir_name, b->pool);
+  moved_to_path = svn_relpath_join(branch2_path, new_dir_name, b->pool);
+
+  SVN_ERR(svn_test__create_client_ctx(&ctx, b, b->pool));
+  SVN_ERR(svn_client_conflict_get(&conflict, sbox_wc_path(b, deleted_path),
+                                  ctx, b->pool, b->pool));
+  SVN_ERR(svn_client_conflict_tree_get_details(conflict, ctx, b->pool));
+
+  /* Check possible move destinations for the directory. */
+  SVN_ERR(svn_client_conflict_tree_get_resolution_options(&options, conflict,
+                                                          ctx, b->pool,
+                                                          b->pool));
+  option = svn_client_conflict_option_find_by_id(
+             options, svn_client_conflict_option_incoming_move_dir_merge);
+  SVN_TEST_ASSERT(option != NULL);
+
+  SVN_ERR(svn_client_conflict_option_get_moved_to_abspath_candidates(
+            &possible_moved_to_abspaths, option, b->pool, b->pool));
+
+  /* The resolver finds two possible destinations for the moved folder:
+   *
+   *   Possible working copy destinations for moved-away 'A_branch/B' are:
+   *    (1): 'A_branch2/newdir'
+   *    (2): 'A_branch/newdir'
+   *   Only one destination can be a move; the others are copies.
+   */
+  SVN_TEST_INT_ASSERT(possible_moved_to_abspaths->nelts, 2);
+  SVN_TEST_STRING_ASSERT(
+    APR_ARRAY_IDX(possible_moved_to_abspaths, 0, const char *),
+    sbox_wc_path(b, moved_to_path));
+  SVN_TEST_STRING_ASSERT(
+    APR_ARRAY_IDX(possible_moved_to_abspaths, 1, const char *),
+    sbox_wc_path(b, svn_relpath_join(branch_path, new_dir_name, b->pool)));
+
+  /* Resolve the tree conflict. */
+  SVN_ERR(svn_client_conflict_option_set_moved_to_abspath(option, 0,
+                                                          ctx, b->pool));
+  SVN_ERR(svn_client_conflict_tree_resolve(conflict, option, ctx, b->pool));
+
+  /* Ensure that the moved-away directory has the expected status. */
+  sb.result_pool = b->pool;
+  opt_rev.kind = svn_opt_revision_working;
+  SVN_ERR(svn_client_status6(NULL, ctx, sbox_wc_path(b, deleted_path),
+                             &opt_rev, svn_depth_empty, TRUE, TRUE,
+                             TRUE, TRUE, FALSE, TRUE, NULL,
+                             status_func, &sb, b->pool));
+  status = sb.status;
+  SVN_TEST_ASSERT(status->kind == svn_node_dir);
+  SVN_TEST_ASSERT(status->versioned);
+  SVN_TEST_ASSERT(!status->conflicted);
+  SVN_TEST_ASSERT(status->node_status == svn_wc_status_deleted);
+  SVN_TEST_ASSERT(status->text_status == svn_wc_status_normal);
+  SVN_TEST_ASSERT(status->prop_status == svn_wc_status_none);
+  SVN_TEST_ASSERT(!status->copied);
+  SVN_TEST_ASSERT(!status->switched);
+  SVN_TEST_ASSERT(!status->file_external);
+  SVN_TEST_ASSERT(status->moved_from_abspath == NULL);
+  SVN_TEST_STRING_ASSERT(status->moved_to_abspath,
+                         sbox_wc_path(b, moved_to_path));
+
+  /* Ensure that the moved-here directory has the expected status. */
+  sb.result_pool = b->pool;
+  opt_rev.kind = svn_opt_revision_working;
+  SVN_ERR(svn_client_status6(NULL, ctx, sbox_wc_path(b, moved_to_path),
+                             &opt_rev, svn_depth_empty, TRUE, TRUE,
+                             TRUE, TRUE, FALSE, TRUE, NULL,
+                             status_func, &sb, b->pool));
+  status = sb.status;
+  SVN_TEST_ASSERT(status->kind == svn_node_dir);
+  SVN_TEST_ASSERT(status->versioned);
+  SVN_TEST_ASSERT(!status->conflicted);
+  SVN_TEST_ASSERT(status->node_status == svn_wc_status_added);
+  SVN_TEST_ASSERT(status->text_status == svn_wc_status_normal);
+  SVN_TEST_ASSERT(status->prop_status == svn_wc_status_none);
+  SVN_TEST_ASSERT(status->copied);
+  SVN_TEST_ASSERT(!status->switched);
+  SVN_TEST_ASSERT(!status->file_external);
+  SVN_TEST_STRING_ASSERT(status->moved_from_abspath,
+                         sbox_wc_path(b, deleted_path));
+  SVN_TEST_ASSERT(status->moved_to_abspath == NULL);
+
+  /* Ensure that the edited file has the expected content. */
+  child_path = svn_relpath_join(moved_to_path, deleted_dir_child,
+                                b->pool);
+  SVN_ERR(svn_stringbuf_from_file2(&buf, sbox_wc_path(b, child_path),
+                                   b->pool));
+  SVN_TEST_STRING_ASSERT(buf->data, modified_file_on_branch_content);
+
+  return SVN_NO_ERROR;
+}
+
 /* ========================================================================== */
 
 
@@ -5064,6 +5264,8 @@ static struct svn_test_descriptor_t test
                        "merge incoming move file merge with native eols"),
     SVN_TEST_OPTS_XFAIL(test_cherry_pick_post_move_edit,
                         "cherry-pick edit from moved file"),
+    SVN_TEST_OPTS_PASS(test_merge_incoming_move_dir_across_branches,
+                        "merge incoming dir move across branches"),
     SVN_TEST_NULL
   };
 

Modified: subversion/branches/shelve/subversion/tests/libsvn_repos/dump-load-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve/subversion/tests/libsvn_repos/dump-load-test.c?rev=1811552&r1=1811551&r2=1811552&view=diff
==============================================================================
--- subversion/branches/shelve/subversion/tests/libsvn_repos/dump-load-test.c (original)
+++ subversion/branches/shelve/subversion/tests/libsvn_repos/dump-load-test.c Mon Oct  9 11:26:07 2017
@@ -120,13 +120,14 @@ test_load_bad_props(svn_stringbuf_t *dum
   svn_revnum_t youngest_rev;
   svn_string_t *loaded_prop_val;
 
-  SVN_ERR(svn_repos_load_fs5(repos, stream,
+  SVN_ERR(svn_repos_load_fs6(repos, stream,
                              SVN_INVALID_REVNUM, SVN_INVALID_REVNUM,
                              svn_repos_load_uuid_default,
                              parent_fspath,
                              FALSE, FALSE, /*use_*_commit_hook*/
                              validate_props,
                              FALSE /*ignore_dates*/,
+                             FALSE /*normalize_props*/,
                              notify_func, notify_baton,
                              NULL, NULL, /*cancellation*/
                              pool));

Modified: subversion/branches/shelve/subversion/tests/libsvn_subr/string-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve/subversion/tests/libsvn_subr/string-test.c?rev=1811552&r1=1811551&r2=1811552&view=diff
==============================================================================
--- subversion/branches/shelve/subversion/tests/libsvn_subr/string-test.c (original)
+++ subversion/branches/shelve/subversion/tests/libsvn_subr/string-test.c Mon Oct  9 11:26:07 2017
@@ -1013,6 +1013,60 @@ test_stringbuf_set(apr_pool_t *pool)
   return SVN_NO_ERROR;
 }
 
+static svn_error_t *
+test_cstring_join(apr_pool_t *pool)
+{
+  apr_array_header_t *arr;
+
+  {
+    arr = apr_array_make(pool, 0, sizeof(const char *));
+
+    SVN_TEST_STRING_ASSERT(svn_cstring_join2(arr, "", FALSE, pool), "");
+    SVN_TEST_STRING_ASSERT(svn_cstring_join2(arr, "", TRUE, pool), "");
+    SVN_TEST_STRING_ASSERT(svn_cstring_join2(arr, ";", FALSE, pool), "");
+    SVN_TEST_STRING_ASSERT(svn_cstring_join2(arr, ";", TRUE, pool), "");
+  }
+
+  {
+    arr = apr_array_make(pool, 0, sizeof(const char *));
+    APR_ARRAY_PUSH(arr, const char *) = "";
+
+    SVN_TEST_STRING_ASSERT(svn_cstring_join2(arr, "", FALSE, pool), "");
+    SVN_TEST_STRING_ASSERT(svn_cstring_join2(arr, "", TRUE, pool), "");
+    SVN_TEST_STRING_ASSERT(svn_cstring_join2(arr, ";", FALSE, pool), "");
+    SVN_TEST_STRING_ASSERT(svn_cstring_join2(arr, ";", TRUE, pool), ";");
+  }
+
+  {
+    arr = apr_array_make(pool, 0, sizeof(const char *));
+    APR_ARRAY_PUSH(arr, const char *) = "ab";
+    APR_ARRAY_PUSH(arr, const char *) = "cd";
+
+    SVN_TEST_STRING_ASSERT(svn_cstring_join2(arr, "", FALSE, pool), "abcd");
+    SVN_TEST_STRING_ASSERT(svn_cstring_join2(arr, "", TRUE, pool), "abcd");
+    SVN_TEST_STRING_ASSERT(svn_cstring_join2(arr, ";", FALSE, pool), "ab;cd");
+    SVN_TEST_STRING_ASSERT(svn_cstring_join2(arr, ";", TRUE, pool), "ab;cd;");
+    SVN_TEST_STRING_ASSERT(svn_cstring_join2(arr, "//", FALSE, pool), "ab//cd");
+    SVN_TEST_STRING_ASSERT(svn_cstring_join2(arr, "//", TRUE, pool), "ab//cd//");
+  }
+
+  {
+    arr = apr_array_make(pool, 0, sizeof(const char *));
+    APR_ARRAY_PUSH(arr, const char *) = "";
+    APR_ARRAY_PUSH(arr, const char *) = "ab";
+    APR_ARRAY_PUSH(arr, const char *) = "";
+
+    SVN_TEST_STRING_ASSERT(svn_cstring_join2(arr, "", FALSE, pool), "ab");
+    SVN_TEST_STRING_ASSERT(svn_cstring_join2(arr, "", TRUE, pool), "ab");
+    SVN_TEST_STRING_ASSERT(svn_cstring_join2(arr, ";", FALSE, pool), ";ab;");
+    SVN_TEST_STRING_ASSERT(svn_cstring_join2(arr, ";", TRUE, pool), ";ab;;");
+    SVN_TEST_STRING_ASSERT(svn_cstring_join2(arr, "//", FALSE, pool), "//ab//");
+    SVN_TEST_STRING_ASSERT(svn_cstring_join2(arr, "//", TRUE, pool), "//ab////");
+  }
+
+  return SVN_NO_ERROR;
+}
+
 /*
    ====================================================================
    If you add a new test to this file, update this array.
@@ -1095,6 +1149,8 @@ static struct svn_test_descriptor_t test
                    "test svn_stringbuf_leftchop"),
     SVN_TEST_PASS2(test_stringbuf_set,
                    "test svn_stringbuf_set()"),
+    SVN_TEST_PASS2(test_cstring_join,
+                   "test svn_cstring_join2()"),
     SVN_TEST_NULL
   };
 

Modified: subversion/branches/shelve/subversion/tests/libsvn_wc/utils.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve/subversion/tests/libsvn_wc/utils.c?rev=1811552&r1=1811551&r2=1811552&view=diff
==============================================================================
--- subversion/branches/shelve/subversion/tests/libsvn_wc/utils.c (original)
+++ subversion/branches/shelve/subversion/tests/libsvn_wc/utils.c Mon Oct  9 11:26:07 2017
@@ -139,12 +139,9 @@ svn_test__create_fake_wc(const char *wc_
    * refer to it over its lifetime. */
   my_statements = apr_palloc(scratch_pool, 7 * sizeof(const char *));
   my_statements[0] = statements[STMT_CREATE_SCHEMA];
-  my_statements[1] = statements[STMT_CREATE_NODES];
-  my_statements[2] = statements[STMT_CREATE_NODES_TRIGGERS];
-  my_statements[3] = statements[STMT_CREATE_EXTERNALS];
-  my_statements[4] = statements[STMT_INSTALL_SCHEMA_STATISTICS];
-  my_statements[5] = extra_statements;
-  my_statements[6] = NULL;
+  my_statements[1] = statements[STMT_INSTALL_SCHEMA_STATISTICS];
+  my_statements[2] = extra_statements;
+  my_statements[3] = NULL;
 
   /* Create fake-wc/SUBDIR/.svn/ for placing the metadata. */
   SVN_ERR(svn_io_make_dir_recursively(dotsvn_abspath, scratch_pool));

Modified: subversion/branches/shelve/subversion/tests/libsvn_wc/wc-queries-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve/subversion/tests/libsvn_wc/wc-queries-test.c?rev=1811552&r1=1811551&r2=1811552&view=diff
==============================================================================
--- subversion/branches/shelve/subversion/tests/libsvn_wc/wc-queries-test.c (original)
+++ subversion/branches/shelve/subversion/tests/libsvn_wc/wc-queries-test.c Mon Oct  9 11:26:07 2017
@@ -70,9 +70,6 @@ static const int schema_statements[] =
 {
   /* Usual tables */
   STMT_CREATE_SCHEMA,
-  STMT_CREATE_NODES,
-  STMT_CREATE_NODES_TRIGGERS,
-  STMT_CREATE_EXTERNALS,
   STMT_INSTALL_SCHEMA_STATISTICS,
   /* Memory tables */
   STMT_CREATE_TARGETS_LIST,

Modified: subversion/branches/shelve/tools/buildbot/slaves/svn-x64-macosx/mkramdisk.sh
URL: http://svn.apache.org/viewvc/subversion/branches/shelve/tools/buildbot/slaves/svn-x64-macosx/mkramdisk.sh?rev=1811552&r1=1811551&r2=1811552&view=diff
==============================================================================
--- subversion/branches/shelve/tools/buildbot/slaves/svn-x64-macosx/mkramdisk.sh (original)
+++ subversion/branches/shelve/tools/buildbot/slaves/svn-x64-macosx/mkramdisk.sh Mon Oct  9 11:26:07 2017
@@ -53,7 +53,7 @@ mount | grep "^/dev/disk[0-9][0-9]* on $
 
     # Make sure we strip trailing spaces from the result of older
     # versions of hduitil.
-    device=$(echo $(hdiutil attach -nomount ram://1000000))
+    device=$(echo $(hdiutil attach -nomount ram://2000000))
     newfs_hfs -M 0700 -v "$1" "${device}"
     hdiutil mountvol "${device}"
 

Modified: subversion/branches/shelve/tools/buildbot/slaves/svn-x64-macosx/setenv.sh
URL: http://svn.apache.org/viewvc/subversion/branches/shelve/tools/buildbot/slaves/svn-x64-macosx/setenv.sh?rev=1811552&r1=1811551&r2=1811552&view=diff
==============================================================================
--- subversion/branches/shelve/tools/buildbot/slaves/svn-x64-macosx/setenv.sh (original)
+++ subversion/branches/shelve/tools/buildbot/slaves/svn-x64-macosx/setenv.sh Mon Oct  9 11:26:07 2017
@@ -29,6 +29,7 @@
 ##     SVNBB_APR_20_DEV         Path of APR-2.0
 ##     SVNBB_JUNIT              The path of the junit.jar
 ##     SVNBB_PARALLEL           Optional: parallelization; defaults to 2
+##     SVNBB_PYTHON3ENV         Optional: Python 3 virtual environment
 ##
 ## The invoking script will set local variable named ${scripts} that
 ## is the absolute path the parent of this file.
@@ -48,6 +49,7 @@ export SVNBB_APR_15
 export SVNBB_APR_20_DEV
 export SVNBB_JUNIT
 export SVNBB_PARALLEL
+export SVNBB_PYTHON3ENV
 
 
 # Set the absolute source path

Modified: subversion/branches/shelve/tools/buildbot/slaves/svn-x64-macosx/svncheck.sh
URL: http://svn.apache.org/viewvc/subversion/branches/shelve/tools/buildbot/slaves/svn-x64-macosx/svncheck.sh?rev=1811552&r1=1811551&r2=1811552&view=diff
==============================================================================
--- subversion/branches/shelve/tools/buildbot/slaves/svn-x64-macosx/svncheck.sh (original)
+++ subversion/branches/shelve/tools/buildbot/slaves/svn-x64-macosx/svncheck.sh Mon Oct  9 11:26:07 2017
@@ -63,6 +63,7 @@ scripts=$(cd $(dirname "$0") && pwd)
 . ${scripts}/setenv.sh
 
 # Parse arguments to find out which tests we should run
+use_python3=false
 check_local=false
 check_svn=false
 check_dav=false
@@ -74,6 +75,7 @@ check_bdb=false
 
 while [ ! -z "$1" ]; do
     case "$1" in
+        python3) use_python3=true;;
         local)   check_local=true;;
         svn)     check_svn=true;;
         dav)     check_dav=true;;
@@ -87,6 +89,8 @@ while [ ! -z "$1" ]; do
     shift
 done
 
+${use_python3} && test -n "${SVNBB_PYTHON3ENV}" && . ${SVNBB_PYTHON3ENV}/bin/activate
+
 ${check_local} && check_tests local
 ${check_svn} && check_tests svn
 ${check_dav} && check_tests dav

Modified: subversion/branches/shelve/tools/client-side/bash_completion
URL: http://svn.apache.org/viewvc/subversion/branches/shelve/tools/client-side/bash_completion?rev=1811552&r1=1811551&r2=1811552&view=diff
==============================================================================
--- subversion/branches/shelve/tools/client-side/bash_completion (original)
+++ subversion/branches/shelve/tools/client-side/bash_completion Mon Oct  9 11:26:07 2017
@@ -1164,7 +1164,7 @@ _svnadmin ()
 		cmdOpts="--ignore-uuid --force-uuid --parent-dir -q --quiet \
 		         --use-pre-commit-hook --use-post-commit-hook \
 		         --bypass-prop-validation -M --memory-cache-size \
-		         --no-flush-to-disk -F --file"
+		         --no-flush-to-disk --normalize-props -F --file"
 		;;
 	lstxns)
         	cmdOpts="-r --revision"

Modified: subversion/branches/shelve/tools/dev/svnmover/svnmover.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve/tools/dev/svnmover/svnmover.c?rev=1811552&r1=1811551&r2=1811552&view=diff
==============================================================================
--- subversion/branches/shelve/tools/dev/svnmover/svnmover.c (original)
+++ subversion/branches/shelve/tools/dev/svnmover/svnmover.c Mon Oct  9 11:26:07 2017
@@ -3921,7 +3921,8 @@ execute(svnmover_wc_t *wc,
           wc->list_of_commands
             = apr_psprintf(pool, "%s%s\n",
                            wc->list_of_commands ? wc->list_of_commands : "",
-                           svn_cstring_join(action->action_args, " ", pool));
+                           svn_cstring_join2(action->action_args, " ",
+                                             TRUE, pool));
         }
     }
   svn_pool_destroy(iterpool);

Modified: subversion/branches/shelve/tools/dist/templates/rc-release-ann.ezt
URL: http://svn.apache.org/viewvc/subversion/branches/shelve/tools/dist/templates/rc-release-ann.ezt?rev=1811552&r1=1811551&r2=1811552&view=diff
==============================================================================
--- subversion/branches/shelve/tools/dist/templates/rc-release-ann.ezt (original)
+++ subversion/branches/shelve/tools/dist/templates/rc-release-ann.ezt Mon Oct  9 11:26:07 2017
@@ -37,7 +37,7 @@ A pre-release means the Subversion devel
 is ready for widespread testing by the community.  There are known issues
 (and unknown ones!), so please use it at your own risk, though we do
 encourage people to test this release thoroughly.  Of particular note, please
-remember than persistent data, such as the working copy or repository
+remember that persistent data, such as the working copy or repository
 formats may change before the final release, and there may not be an
 upgrade path from the pre-releases to the final.
 



Mime
View raw message