You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2018/11/13 07:49:08 UTC

svn commit: r1846488 [22/23] - in /subversion/branches/mod-dav-svn-expressions: ./ build/ build/ac-macros/ build/generator/ build/generator/swig/ build/generator/templates/ build/generator/util/ build/win32/ contrib/client-side/ contrib/client-side/svn...

Modified: subversion/branches/mod-dav-svn-expressions/subversion/tests/libsvn_subr/mergeinfo-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/mod-dav-svn-expressions/subversion/tests/libsvn_subr/mergeinfo-test.c?rev=1846488&r1=1846487&r2=1846488&view=diff
==============================================================================
--- subversion/branches/mod-dav-svn-expressions/subversion/tests/libsvn_subr/mergeinfo-test.c (original)
+++ subversion/branches/mod-dav-svn-expressions/subversion/tests/libsvn_subr/mergeinfo-test.c Tue Nov 13 07:49:04 2018
@@ -1673,100 +1673,27 @@ test_remove_prefix_from_catalog(apr_pool
 static svn_error_t *
 test_rangelist_merge_overlap(apr_pool_t *pool)
 {
-  svn_rangelist_t * changes;
-  /* 15014-19472,19473-19612*,19613-19614,19615-19630*,19631-19634,19635-20055* */
-  svn_rangelist_t * rangelist = apr_array_make(pool, 1, sizeof(svn_merge_range_t *));
-  svn_merge_range_t *mrange = apr_pcalloc(pool, sizeof(*mrange));
-
-  /* This range is optional for reproducing issue #4686 */
-  mrange->start = 15013;
-  mrange->end = 19472;
-  mrange->inheritable = TRUE;
-  APR_ARRAY_PUSH(rangelist, svn_merge_range_t *) = mrange;
-
-  mrange = apr_pcalloc(pool, sizeof(*mrange));
-  mrange->start = 19472;
-  mrange->end = 19612;
-  mrange->inheritable = FALSE;
-  APR_ARRAY_PUSH(rangelist, svn_merge_range_t *) = mrange;
-
-  /* This range is optional for reproducing issue #4686 */
-  mrange = apr_pcalloc(pool, sizeof(*mrange));
-  mrange->start = 19612;
-  mrange->end = 19614;
-  mrange->inheritable = TRUE;
-  APR_ARRAY_PUSH(rangelist, svn_merge_range_t *) = mrange;
-
-  mrange = apr_pcalloc(pool, sizeof(*mrange));
-  mrange->start = 19614;
-  mrange->end = 19630;
-  mrange->inheritable = FALSE;
-  APR_ARRAY_PUSH(rangelist, svn_merge_range_t *) = mrange;
-
-  mrange = apr_pcalloc(pool, sizeof(*mrange));
-  mrange->start = 19630;
-  mrange->end = 19634;
-  mrange->inheritable = TRUE;
-  APR_ARRAY_PUSH(rangelist, svn_merge_range_t *) = mrange;
-
-  /* This range is optional for reproducing issue #4686 */
-  mrange = apr_pcalloc(pool, sizeof(*mrange));
-  mrange->start = 19634;
-  mrange->end = 20055;
-  mrange->inheritable = FALSE;
-  APR_ARRAY_PUSH(rangelist, svn_merge_range_t *) = mrange;
-
-  /* 15014-20515* */
-  changes = apr_array_make(pool, 1, sizeof(svn_merge_range_t *));
-  mrange = apr_pcalloc(pool, sizeof(*mrange));
-  mrange->start = 15013;
-  mrange->end = 20515;
-  mrange->inheritable = FALSE;
-  APR_ARRAY_PUSH(changes, svn_merge_range_t *) = mrange;
-#if 0
-  {
-    svn_string_t * tmpString;
-
-    svn_rangelist_to_string(&tmpString, rangelist, pool);
-    printf("rangelist %s\n", tmpString->data);
-  }
-  {
-    svn_string_t * tmpString;
-
-    svn_rangelist_to_string(&tmpString, changes, pool);
-    printf("changes %s\n", tmpString->data);
-  }
-#endif
-
+  const char *rangelist_str = "19473-19612*,19615-19630*,19631-19634";
+  const char *changes_str = "15014-20515*";
+  const char *expected_str = "15014-19630*,19631-19634,19635-20515*";
+  /* wrong result: "15014-19630*,19634-19631*,19631-19634,19635-20515*" */
+  svn_rangelist_t *rangelist, *changes;
+  svn_string_t *result_string;
+
+  /* prepare the inputs */
+  SVN_ERR(svn_rangelist__parse(&rangelist, rangelist_str, pool));
+  SVN_ERR(svn_rangelist__parse(&changes, changes_str, pool));
   SVN_TEST_ASSERT(svn_rangelist__is_canonical(rangelist));
   SVN_TEST_ASSERT(svn_rangelist__is_canonical(changes));
 
+  /* perform the merge */
   SVN_ERR(svn_rangelist_merge2(rangelist, changes, pool, pool));
 
+  /* check the output */
   SVN_TEST_ASSERT(svn_rangelist__is_canonical(rangelist));
+  SVN_ERR(svn_rangelist_to_string(&result_string, rangelist, pool));
+  SVN_TEST_STRING_ASSERT(result_string->data, expected_str);
 
-#if 0
-  {
-    svn_string_t * tmpString;
-
-    svn_rangelist_to_string(&tmpString, rangelist, pool);
-    printf("result %s\n", tmpString->data);
-  }
-#endif
-
-  /* wrong result
-    result 15014-19472,19473-19612*,19613-19614,19615-19630*,19634-19631*,19631-19634,19635-20515*
-  */
-
-  {
-     svn_string_t * tmp_string;
-     svn_rangelist_t *range_list;
-
-     svn_rangelist_to_string(&tmp_string, rangelist, pool);
-
-     SVN_ERR(svn_rangelist__parse(&range_list, tmp_string->data, pool));
-  }
-  
   return SVN_NO_ERROR;
 }
 
@@ -1900,9 +1827,9 @@ static struct svn_test_descriptor_t test
                    "diff of rangelists"),
     SVN_TEST_PASS2(test_remove_prefix_from_catalog,
                    "removal of prefix paths from catalog keys"),
-    SVN_TEST_XFAIL2(test_rangelist_merge_overlap,
+    SVN_TEST_PASS2(test_rangelist_merge_overlap,
                    "merge of rangelists with overlaps (issue 4686)"),
-    SVN_TEST_XFAIL2(test_rangelist_loop,
+    SVN_TEST_PASS2(test_rangelist_loop,
                     "test rangelist edgecases via loop"),
     SVN_TEST_NULL
   };

Modified: subversion/branches/mod-dav-svn-expressions/subversion/tests/libsvn_subr/priority-queue-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/mod-dav-svn-expressions/subversion/tests/libsvn_subr/priority-queue-test.c?rev=1846488&r1=1846487&r2=1846488&view=diff
==============================================================================
--- subversion/branches/mod-dav-svn-expressions/subversion/tests/libsvn_subr/priority-queue-test.c (original)
+++ subversion/branches/mod-dav-svn-expressions/subversion/tests/libsvn_subr/priority-queue-test.c Tue Nov 13 07:49:04 2018
@@ -125,7 +125,7 @@ verify_queue_order(svn_priority_queue__t
     }
 
   /* the queue should now be empty */
-  verify_empty_queue(queue);
+  SVN_ERR(verify_empty_queue(queue));
 
   return SVN_NO_ERROR;
 }
@@ -154,7 +154,7 @@ test_empty_queue(apr_pool_t *pool)
   svn_priority_queue__t *queue
     = svn_priority_queue__create(elements, compare_func);
 
-  verify_empty_queue(queue);
+  SVN_ERR(verify_empty_queue(queue));
 
   return SVN_NO_ERROR;
 }
@@ -214,7 +214,7 @@ test_update(apr_pool_t *pool)
     }
 
   /* the queue should now be empty */
-  verify_empty_queue(queue);
+  SVN_ERR(verify_empty_queue(queue));
 
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/mod-dav-svn-expressions/subversion/tests/libsvn_subr/subst_translate-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/mod-dav-svn-expressions/subversion/tests/libsvn_subr/subst_translate-test.c?rev=1846488&r1=1846487&r2=1846488&view=diff
==============================================================================
--- subversion/branches/mod-dav-svn-expressions/subversion/tests/libsvn_subr/subst_translate-test.c (original)
+++ subversion/branches/mod-dav-svn-expressions/subversion/tests/libsvn_subr/subst_translate-test.c Tue Nov 13 07:49:04 2018
@@ -158,7 +158,7 @@ test_svn_subst_translate_string2_null_en
     };
   const char **other_locale;
 
-  strncpy(orig_lc_all, setlocale(LC_ALL, NULL), sizeof (orig_lc_all));
+  strncpy(orig_lc_all, setlocale(LC_ALL, NULL), sizeof (orig_lc_all) - 1);
 
   for (other_locale = other_locales; *other_locale != NULL; ++other_locale)
   {

Modified: subversion/branches/mod-dav-svn-expressions/subversion/tests/libsvn_subr/utf-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/mod-dav-svn-expressions/subversion/tests/libsvn_subr/utf-test.c?rev=1846488&r1=1846487&r2=1846488&view=diff
==============================================================================
--- subversion/branches/mod-dav-svn-expressions/subversion/tests/libsvn_subr/utf-test.c (original)
+++ subversion/branches/mod-dav-svn-expressions/subversion/tests/libsvn_subr/utf-test.c Tue Nov 13 07:49:04 2018
@@ -752,8 +752,10 @@ test_utf_conversions(apr_pool_t *pool)
   {
     svn_boolean_t sixteenbit;
     svn_boolean_t bigendian;
+    apr_size_t sourcelen;
     const char *source;
     const char *result;
+    svn_boolean_t counted;
   } tests[] = {
 
 #define UTF_32_LE FALSE, FALSE
@@ -762,32 +764,36 @@ test_utf_conversions(apr_pool_t *pool)
 #define UTF_16_BE TRUE, TRUE
 
     /* Normal character conversion */
-    { UTF_32_LE, "t\0\0\0" "e\0\0\0" "s\0\0\0" "t\0\0\0" "\0\0\0\0", "test" },
-    { UTF_32_BE, "\0\0\0t" "\0\0\0e" "\0\0\0s" "\0\0\0t" "\0\0\0\0", "test" },
-    { UTF_16_LE, "t\0" "e\0" "s\0" "t\0" "\0\0", "test" },
-    { UTF_16_BE, "\0t" "\0e" "\0s" "\0t" "\0\0", "test" },
+    { UTF_32_LE, 4, "t\0\0\0" "e\0\0\0" "s\0\0\0" "t\0\0\0" "\0\0\0\0", "test", FALSE },
+    { UTF_32_BE, 4, "\0\0\0t" "\0\0\0e" "\0\0\0s" "\0\0\0t" "\0\0\0\0", "test", FALSE },
+    { UTF_16_LE, 4, "t\0" "e\0" "s\0" "t\0" "\0\0", "test", FALSE },
+    { UTF_16_BE, 4, "\0t" "\0e" "\0s" "\0t" "\0\0", "test", FALSE },
 
     /* Valid surrogate pairs */
-    { UTF_16_LE, "\x00\xD8" "\x00\xDC" "\0\0", "\xf0\x90\x80\x80" }, /* U+010000 */
-    { UTF_16_LE, "\x34\xD8" "\x1E\xDD" "\0\0", "\xf0\x9d\x84\x9e" }, /* U+01D11E */
-    { UTF_16_LE, "\xFF\xDB" "\xFD\xDF" "\0\0", "\xf4\x8f\xbf\xbd" }, /* U+10FFFD */
-
-    { UTF_16_BE, "\xD8\x00" "\xDC\x00" "\0\0", "\xf0\x90\x80\x80" }, /* U+010000 */
-    { UTF_16_BE, "\xD8\x34" "\xDD\x1E" "\0\0", "\xf0\x9d\x84\x9e" }, /* U+01D11E */
-    { UTF_16_BE, "\xDB\xFF" "\xDF\xFD" "\0\0", "\xf4\x8f\xbf\xbd" }, /* U+10FFFD */
+    { UTF_16_LE, 2, "\x00\xD8" "\x00\xDC" "\0\0", "\xf0\x90\x80\x80", FALSE }, /* U+010000 */
+    { UTF_16_LE, 2, "\x34\xD8" "\x1E\xDD" "\0\0", "\xf0\x9d\x84\x9e", FALSE }, /* U+01D11E */
+    { UTF_16_LE, 2, "\xFF\xDB" "\xFD\xDF" "\0\0", "\xf4\x8f\xbf\xbd", FALSE }, /* U+10FFFD */
+
+    { UTF_16_BE, 2, "\xD8\x00" "\xDC\x00" "\0\0", "\xf0\x90\x80\x80", FALSE }, /* U+010000 */
+    { UTF_16_BE, 2, "\xD8\x34" "\xDD\x1E" "\0\0", "\xf0\x9d\x84\x9e", FALSE }, /* U+01D11E */
+    { UTF_16_BE, 2, "\xDB\xFF" "\xDF\xFD" "\0\0", "\xf4\x8f\xbf\xbd", FALSE }, /* U+10FFFD */
 
     /* Swapped, single and trailing surrogate pairs */
-    { UTF_16_LE, "*\0" "\x00\xDC" "\x00\xD8" "*\0\0\0", "*\xed\xb0\x80" "\xed\xa0\x80*" },
-    { UTF_16_LE, "*\0" "\x1E\xDD" "*\0\0\0", "*\xed\xb4\x9e*" },
-    { UTF_16_LE, "*\0" "\xFF\xDB" "*\0\0\0", "*\xed\xaf\xbf*" },
-    { UTF_16_LE, "\x1E\xDD" "\0\0", "\xed\xb4\x9e" },
-    { UTF_16_LE, "\xFF\xDB" "\0\0", "\xed\xaf\xbf" },
-
-    { UTF_16_BE, "\0*" "\xDC\x00" "\xD8\x00" "\0*\0\0", "*\xed\xb0\x80" "\xed\xa0\x80*" },
-    { UTF_16_BE, "\0*" "\xDD\x1E" "\0*\0\0", "*\xed\xb4\x9e*" },
-    { UTF_16_BE, "\0*" "\xDB\xFF" "\0*\0\0", "*\xed\xaf\xbf*" },
-    { UTF_16_BE, "\xDD\x1E" "\0\0", "\xed\xb4\x9e" },
-    { UTF_16_BE, "\xDB\xFF" "\0\0", "\xed\xaf\xbf" },
+    { UTF_16_LE, 4, "*\0" "\x00\xDC" "\x00\xD8" "*\0\0\0", "*\xed\xb0\x80" "\xed\xa0\x80*", FALSE },
+    { UTF_16_LE, 3, "*\0" "\x1E\xDD" "*\0\0\0", "*\xed\xb4\x9e*", FALSE },
+    { UTF_16_LE, 3, "*\0" "\xFF\xDB" "*\0\0\0", "*\xed\xaf\xbf*", FALSE },
+    { UTF_16_LE, 1, "\x1E\xDD" "\0\0", "\xed\xb4\x9e", FALSE },
+    { UTF_16_LE, 1, "\xFF\xDB" "\0\0", "\xed\xaf\xbf", FALSE },
+
+    { UTF_16_BE, 4, "\0*" "\xDC\x00" "\xD8\x00" "\0*\0\0", "*\xed\xb0\x80" "\xed\xa0\x80*", FALSE },
+    { UTF_16_BE, 3, "\0*" "\xDD\x1E" "\0*\0\0", "*\xed\xb4\x9e*", FALSE },
+    { UTF_16_BE, 3, "\0*" "\xDB\xFF" "\0*\0\0", "*\xed\xaf\xbf*", FALSE },
+    { UTF_16_BE, 1, "\xDD\x1E" "\0\0", "\xed\xb4\x9e", FALSE },
+    { UTF_16_BE, 1, "\xDB\xFF" "\0\0", "\xed\xaf\xbf", FALSE },
+
+    /* Counted strings with NUL characters */
+    { UTF_16_LE, 3, "x\0" "\0\0" "y\0" "*\0", "x\0y", TRUE },
+    { UTF_32_BE, 3, "\0\0\0x" "\0\0\0\0" "\0\0\0y" "\0\0\0*", "x\0y", TRUE },
 
 #undef UTF_32_LE
 #undef UTF_32_BE
@@ -799,33 +805,46 @@ test_utf_conversions(apr_pool_t *pool)
 
   const struct cvt_test_t *tc;
   const svn_string_t *result;
-  int i;
+  apr_size_t maxlen = 0;
 
-  for (i = 1, tc = tests; tc->source; ++tc, ++i)
+  /* To assure proper alignment of the source string, it needs to be copied
+     into an array of the appropriate type before calling
+     svn_utf__utf{16,32}_to_utf8. */
+  apr_uint16_t *source16;
+  apr_int32_t *source32;
+
+  for (tc = tests; tc->source; ++tc)
+    if (tc->sourcelen > maxlen)
+      maxlen = tc->sourcelen;
+  maxlen++;
+
+  source16 = apr_pcalloc(pool, maxlen * sizeof(*source16));
+  source32 = apr_pcalloc(pool, maxlen * sizeof(*source32));
+
+  for (tc = tests; tc->source; ++tc)
     {
       if (tc->sixteenbit)
-        SVN_ERR(svn_utf__utf16_to_utf8(&result, (const void*)tc->source,
-                                       SVN_UTF__UNKNOWN_LENGTH,
-                                       tc->bigendian, pool, pool));
+        {
+          memset(source16, 0, maxlen * sizeof(*source16));
+          memcpy(source16, tc->source, (tc->sourcelen + 1) * sizeof(*source16));
+          SVN_ERR(svn_utf__utf16_to_utf8(&result, source16,
+                                         tc->counted ? tc->sourcelen : SVN_UTF__UNKNOWN_LENGTH,
+                                         tc->bigendian, pool, pool));
+        }
       else
-        SVN_ERR(svn_utf__utf32_to_utf8(&result, (const void*)tc->source,
-                                       SVN_UTF__UNKNOWN_LENGTH,
-                                       tc->bigendian, pool, pool));
-      SVN_ERR_ASSERT(0 == strcmp(result->data, tc->result));
+        {
+          memset(source32, 0, maxlen * sizeof(*source32));
+          memcpy(source32, tc->source, (tc->sourcelen + 1) * sizeof(*source32));
+          SVN_ERR(svn_utf__utf32_to_utf8(&result, source32,
+                                         tc->counted ? tc->sourcelen : SVN_UTF__UNKNOWN_LENGTH,
+                                         tc->bigendian, pool, pool));
+        }
+      if (tc->counted)
+        SVN_ERR_ASSERT(0 == memcmp(result->data, tc->result, tc->sourcelen));
+      else
+        SVN_ERR_ASSERT(0 == strcmp(result->data, tc->result));
     }
 
-  /* Test counted strings with NUL characters */
-  SVN_ERR(svn_utf__utf16_to_utf8(
-              &result, (void*)("x\0" "\0\0" "y\0" "*\0"), 3,
-              FALSE, pool, pool));
-  SVN_ERR_ASSERT(0 == memcmp(result->data, "x\0y", 3));
-
-  SVN_ERR(svn_utf__utf32_to_utf8(
-              &result,
-              (void*)("\0\0\0x" "\0\0\0\0" "\0\0\0y" "\0\0\0*"), 3,
-              TRUE, pool, pool));
-  SVN_ERR_ASSERT(0 == memcmp(result->data, "x\0y", 3));
-
   return SVN_NO_ERROR;
 }
 

Modified: subversion/branches/mod-dav-svn-expressions/subversion/tests/libsvn_subr/x509-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/mod-dav-svn-expressions/subversion/tests/libsvn_subr/x509-test.c?rev=1846488&r1=1846487&r2=1846488&view=diff
==============================================================================
--- subversion/branches/mod-dav-svn-expressions/subversion/tests/libsvn_subr/x509-test.c (original)
+++ subversion/branches/mod-dav-svn-expressions/subversion/tests/libsvn_subr/x509-test.c Tue Nov 13 07:49:04 2018
@@ -592,6 +592,32 @@ static struct x509_test cert_tests[] = {
     "good.example.com",
     "9693f17e59205f41ca2e14450d151b945651b2d7"
   },
+  /* Signed using RSASSA-PSS algorithm with algorithm parameters */
+  {
+    "MIICsjCCAWkCCQDHslXYA8hCxTA+BgkqhkiG9w0BAQowMaANMAsGCWCGSAFlAwQC"
+    "AaEaMBgGCSqGSIb3DQEBCDALBglghkgBZQMEAgGiBAICAN4wKjEUMBIGA1UECgwL"
+    "TXkgTG9jYWwgQ0ExEjAQBgNVBAMMCWxvY2FsaG9zdDAeFw0xODAyMDIxNjQ4MzVa"
+    "Fw0xODAyMDMxNjQ4MzVaMC4xGDAWBgNVBAoMD015IExvY2FsIFNlcnZlcjESMBAG"
+    "A1UEAwwJbG9jYWxob3N0MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCues61"
+    "JXXpLQI5yeg4aCLWRfvnJY7wnuU6FSA++3wwCJREx1/7ebnP9RRRqqKM+ZeeFMC+"
+    "UlJE3ft2tJTDOVk9j6qjvKrJUKM1YkIe0lARxs4RtZKDGfOdBhw/+iD+6fZzhL0n"
+    "+w+dIJGzl6ADWsE/x9yjDTkdgbtxHrx/76K0KQIDAQABMD4GCSqGSIb3DQEBCjAx"
+    "oA0wCwYJYIZIAWUDBAIBoRowGAYJKoZIhvcNAQEIMAsGCWCGSAFlAwQCAaIEAgIA"
+    "3gOCAQEABYRAijCSGyFdSuUYALUnNzPylqYXlW+dMKPywlUrFEhKnvS+FD9twerI"
+    "8kT4MDW6XvhScmL1MCDPNAkFY92UqaUrgT80oyrbpuakVrxFSS1i28xy8+kXAWYq"
+    "RNQVaME1NqnATYF0ZMD5xQK4rpa76gvWj3K8Lt++9EjjbkNiirIIMQEOxh1lwnDQ"
+    "81q1Rk6iujlnVDGHDQ+w8reE6fKfSWfv1EaQRcjNKCuzrW8WNN387G2byvwaaKeL"
+    "M7lV7wiV6PwrTNTZzVG3cWKDOEP1mGE7gyMu66siLECo8U95+ahK7O6vfeT3m3gv"
+    "7kzWNYozAQtBSC7b0WqWbVrzWI4HSg==",
+    "O=My Local Server, CN=localhost",
+    "2.5.4.10 2.5.4.3",
+    "O=My Local CA, CN=localhost",
+    "2.5.4.10 2.5.4.3",
+    "2018-02-02T16:48:35.000000Z ",
+    "2018-02-03T16:48:35.000000Z ",
+    "localhost",
+    "25ab5a059acfc793fc0d3734d426794a4ca7b631"
+  },
   { NULL }
 };
 

Modified: subversion/branches/mod-dav-svn-expressions/subversion/tests/libsvn_wc/conflict-data-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/mod-dav-svn-expressions/subversion/tests/libsvn_wc/conflict-data-test.c?rev=1846488&r1=1846487&r2=1846488&view=diff
==============================================================================
--- subversion/branches/mod-dav-svn-expressions/subversion/tests/libsvn_wc/conflict-data-test.c (original)
+++ subversion/branches/mod-dav-svn-expressions/subversion/tests/libsvn_wc/conflict-data-test.c Tue Nov 13 07:49:04 2018
@@ -594,6 +594,7 @@ test_serialize_tree_conflict(const svn_t
                               svn_wc_conflict_reason_moved_away,
                               svn_wc_conflict_action_delete,
                               sbox_wc_path(&sbox, "A/B"),
+                              sbox_wc_path(&sbox, "A/C"),
                               pool, pool));
 
   SVN_ERR(svn_wc__conflict_skel_set_op_switch(
@@ -610,11 +611,13 @@ test_serialize_tree_conflict(const svn_t
   {
     svn_wc_conflict_reason_t reason;
     svn_wc_conflict_action_t action;
-    const char *moved_away_op_root_abspath;
+    const char *moved_away_src_op_root_abspath;
+    const char *moved_away_dst_op_root_abspath;
 
     SVN_ERR(svn_wc__conflict_read_tree_conflict(&reason,
                                                 &action,
-                                                &moved_away_op_root_abspath,
+                                                &moved_away_src_op_root_abspath,
+                                                &moved_away_dst_op_root_abspath,
                                                 sbox.wc_ctx->db,
                                                 sbox.wc_abspath,
                                                 conflict_skel,
@@ -622,8 +625,10 @@ test_serialize_tree_conflict(const svn_t
 
     SVN_TEST_ASSERT(reason == svn_wc_conflict_reason_moved_away);
     SVN_TEST_ASSERT(action == svn_wc_conflict_action_delete);
-    SVN_TEST_STRING_ASSERT(moved_away_op_root_abspath,
+    SVN_TEST_STRING_ASSERT(moved_away_src_op_root_abspath,
                            sbox_wc_path(&sbox, "A/B"));
+    SVN_TEST_STRING_ASSERT(moved_away_dst_op_root_abspath,
+                           sbox_wc_path(&sbox, "A/C"));
   }
 
   return SVN_NO_ERROR;

Modified: subversion/branches/mod-dav-svn-expressions/subversion/tests/libsvn_wc/op-depth-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/mod-dav-svn-expressions/subversion/tests/libsvn_wc/op-depth-test.c?rev=1846488&r1=1846487&r2=1846488&view=diff
==============================================================================
--- subversion/branches/mod-dav-svn-expressions/subversion/tests/libsvn_wc/op-depth-test.c (original)
+++ subversion/branches/mod-dav-svn-expressions/subversion/tests/libsvn_wc/op-depth-test.c Tue Nov 13 07:49:04 2018
@@ -535,7 +535,7 @@ check_db_conflicts(svn_test__sandbox_t *
           SVN_ERR(svn_wc__conflict_read_tree_conflict(&info->tc.reason,
                                                       &info->tc.action,
                                                       &move_src_abspath,
-                                                      b->wc_ctx->db,
+                                                      NULL, b->wc_ctx->db,
                                                       local_abspath,
                                                       conflict,
                                                       b->pool, iterpool));

Modified: subversion/branches/mod-dav-svn-expressions/subversion/tests/libsvn_wc/utils.c
URL: http://svn.apache.org/viewvc/subversion/branches/mod-dav-svn-expressions/subversion/tests/libsvn_wc/utils.c?rev=1846488&r1=1846487&r2=1846488&view=diff
==============================================================================
--- subversion/branches/mod-dav-svn-expressions/subversion/tests/libsvn_wc/utils.c (original)
+++ subversion/branches/mod-dav-svn-expressions/subversion/tests/libsvn_wc/utils.c Tue Nov 13 07:49:04 2018
@@ -417,11 +417,12 @@ sbox_wc_revert(svn_test__sandbox_t *b, c
   SVN_ERR(svn_wc__acquire_write_lock(&lock_root_abspath, b->wc_ctx,
                                      dir_abspath, FALSE /* lock_anchor */,
                                      b->pool, b->pool));
-  SVN_ERR(svn_wc_revert5(b->wc_ctx, abspath, depth,
+  SVN_ERR(svn_wc_revert6(b->wc_ctx, abspath, depth,
                          FALSE /* use_commit_times */,
                          NULL /* changelist_filter */,
                          FALSE /* clear_changelists */,
                          FALSE /* metadata_only */,
+                         TRUE /*added_keep_local*/,
                          NULL, NULL, /* cancel baton + func */
                          NULL, NULL, /* notify baton + func */
                          b->pool));

Modified: subversion/branches/mod-dav-svn-expressions/subversion/tests/libsvn_wc/wc-queries-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/mod-dav-svn-expressions/subversion/tests/libsvn_wc/wc-queries-test.c?rev=1846488&r1=1846487&r2=1846488&view=diff
==============================================================================
--- subversion/branches/mod-dav-svn-expressions/subversion/tests/libsvn_wc/wc-queries-test.c (original)
+++ subversion/branches/mod-dav-svn-expressions/subversion/tests/libsvn_wc/wc-queries-test.c Tue Nov 13 07:49:04 2018
@@ -99,6 +99,7 @@ static const int slow_statements[] =
   STMT_SELECT_DELETE_LIST,
   STMT_SELECT_UPDATE_MOVE_LIST,
   STMT_FIND_REPOS_PATH_IN_WC,
+  STMT_SELECT_PRESENT_HIGHEST_WORKING_NODES_BY_BASENAME_AND_KIND,
 
   /* Designed as slow to avoid penalty on other queries */
   STMT_SELECT_UNREFERENCED_PRISTINES,

Modified: subversion/branches/mod-dav-svn-expressions/subversion/tests/svn_test_main.c
URL: http://svn.apache.org/viewvc/subversion/branches/mod-dav-svn-expressions/subversion/tests/svn_test_main.c?rev=1846488&r1=1846487&r2=1846488&view=diff
==============================================================================
--- subversion/branches/mod-dav-svn-expressions/subversion/tests/svn_test_main.c (original)
+++ subversion/branches/mod-dav-svn-expressions/subversion/tests/svn_test_main.c Tue Nov 13 07:49:04 2018
@@ -903,9 +903,12 @@ svn_test_main(int argc, const char *argv
       apr_err = apr_getopt_long(os, cl_options, &opt_id, &opt_arg);
       if (APR_STATUS_IS_EOF(apr_err))
         break;
-      else if (apr_err && (apr_err != APR_BADCH))
+      else if (apr_err)
         {
           /* Ignore invalid option error to allow passing arbitrary options */
+          if (apr_err == APR_BADCH)
+            continue;
+
           fprintf(stderr, "apr_getopt_long failed : [%d] %s\n",
                   apr_err, apr_strerror(apr_err, errmsg, sizeof(errmsg)));
           exit(1);

Modified: subversion/branches/mod-dav-svn-expressions/tools/buildbot/slaves/bb-openbsd/svnbuild.sh
URL: http://svn.apache.org/viewvc/subversion/branches/mod-dav-svn-expressions/tools/buildbot/slaves/bb-openbsd/svnbuild.sh?rev=1846488&r1=1846487&r2=1846488&view=diff
==============================================================================
--- subversion/branches/mod-dav-svn-expressions/tools/buildbot/slaves/bb-openbsd/svnbuild.sh (original)
+++ subversion/branches/mod-dav-svn-expressions/tools/buildbot/slaves/bb-openbsd/svnbuild.sh Tue Nov 13 07:49:04 2018
@@ -22,7 +22,8 @@
 set -e
 set -x
 
-export JAVA_HOME=/usr/local/jdk-1.7.0
-
-branch="$(basename $(svn info . | grep ^URL  | cut -d' ' -f2))"
-(cd .. && gmake BRANCH="$branch" THREADING="no")
+url="$(svn info --show-item url)"
+branch="${url##*/}"
+(test -h ../GNUmakefile || ln -s ../unix-build/Makefile.svn ../GNUmakefile)
+touch ../objdir/svn-${branch}/.retrieved
+(cd .. && gmake BRANCH="$branch" THREADING="no" JAVA="no" MAKE_JOBS=8)

Modified: subversion/branches/mod-dav-svn-expressions/tools/buildbot/slaves/bb-openbsd/svncheck-bindings.sh
URL: http://svn.apache.org/viewvc/subversion/branches/mod-dav-svn-expressions/tools/buildbot/slaves/bb-openbsd/svncheck-bindings.sh?rev=1846488&r1=1846487&r2=1846488&view=diff
==============================================================================
--- subversion/branches/mod-dav-svn-expressions/tools/buildbot/slaves/bb-openbsd/svncheck-bindings.sh (original)
+++ subversion/branches/mod-dav-svn-expressions/tools/buildbot/slaves/bb-openbsd/svncheck-bindings.sh Tue Nov 13 07:49:04 2018
@@ -22,11 +22,11 @@
 set -e
 set -x
 
-branch="$(basename $(svn info . | grep ^URL  | cut -d' ' -f2))"
+url="$(svn info --show-item url)"
+branch="${url##*/}"
 export MALLOC_OPTIONS=S
-(cd .. && gmake BRANCH="$branch" THREADING="no" svn-check-bindings)
+(cd .. && gmake BRANCH="$branch" THREADING="no" JAVA="no" svn-check-bindings)
 grep -q "^Result: PASS$" tests.log.bindings.pl || exit 1
 grep -q "^OK$" tests.log.bindings.py || exit 1
 grep -q ", 0 failures, 0 errors" tests.log.bindings.rb || exit 1
-#TODO javahl
 exit 0

Modified: subversion/branches/mod-dav-svn-expressions/tools/buildbot/slaves/bb-openbsd/svncheck.sh
URL: http://svn.apache.org/viewvc/subversion/branches/mod-dav-svn-expressions/tools/buildbot/slaves/bb-openbsd/svncheck.sh?rev=1846488&r1=1846487&r2=1846488&view=diff
==============================================================================
--- subversion/branches/mod-dav-svn-expressions/tools/buildbot/slaves/bb-openbsd/svncheck.sh (original)
+++ subversion/branches/mod-dav-svn-expressions/tools/buildbot/slaves/bb-openbsd/svncheck.sh Tue Nov 13 07:49:04 2018
@@ -22,10 +22,10 @@
 set -e
 set -x
 
-branch="$(basename $(svn info . | grep ^URL  | cut -d' ' -f2))"
+url="$(svn info --show-item url)"
+branch="${url##*/}"
 export MALLOC_OPTIONS=S
-(cd .. && gmake BRANCH="$branch" PARALLEL="" THREADING="no" \
-                MEMCACHED_SERVER="127.0.0.1:11211" \
+(cd .. && gmake BRANCH="$branch" PARALLEL="4" THREADING="no" JAVA="no" \
                 EXCLUSIVE_WC_LOCKS=1 \
                                   svn-check-local \
                                   svn-check-svn \

Modified: subversion/branches/mod-dav-svn-expressions/tools/buildbot/slaves/bb-openbsd/svnclean.sh
URL: http://svn.apache.org/viewvc/subversion/branches/mod-dav-svn-expressions/tools/buildbot/slaves/bb-openbsd/svnclean.sh?rev=1846488&r1=1846487&r2=1846488&view=diff
==============================================================================
--- subversion/branches/mod-dav-svn-expressions/tools/buildbot/slaves/bb-openbsd/svnclean.sh (original)
+++ subversion/branches/mod-dav-svn-expressions/tools/buildbot/slaves/bb-openbsd/svnclean.sh Tue Nov 13 07:49:04 2018
@@ -22,12 +22,20 @@
 set -e
 set -x
 
-branch="$(basename $(svn info . | grep ^URL  | cut -d' ' -f2))"
+url="$(svn info --show-item url)"
+branch="${url##*/}"
 (test -h ../svn-trunk || ln -s build ../svn-trunk)
-for i in 6 7 8 9 10; do
+for i in $(jot - 6 12); do
   (test -h ../svn-1.${i}.x || ln -s build ../svn-1.${i}.x)
 done
+lastchangedrev="$(svn info --show-item=last-changed-revision ../../unix-build/Makefile.svn)"
 svn update ../../unix-build
+newlastchangedrev="$(svn info --show-item=last-changed-revision ../../unix-build/Makefile.svn)"
 (test -h ../GNUmakefile || ln -s ../unix-build/Makefile.svn ../GNUmakefile)
-(cd .. && gmake BRANCH="$branch" reset clean)
+# always rebuild svn, but only rebuild dependencies if Makefile.svn has changed
+if [ "$lastchangedrev" != "$newlastchangedrev" ]; then
+  (cd .. && gmake BRANCH="$branch" reset clean)
+else
+  (cd .. && gmake BRANCH="$branch" svn-reset svn-bindings-reset svn-clean)
+fi
 rm -f tests.log* fails.log*

Modified: subversion/branches/mod-dav-svn-expressions/tools/buildbot/slaves/svn-x64-macosx/setenv.sh
URL: http://svn.apache.org/viewvc/subversion/branches/mod-dav-svn-expressions/tools/buildbot/slaves/svn-x64-macosx/setenv.sh?rev=1846488&r1=1846487&r2=1846488&view=diff
==============================================================================
--- subversion/branches/mod-dav-svn-expressions/tools/buildbot/slaves/svn-x64-macosx/setenv.sh (original)
+++ subversion/branches/mod-dav-svn-expressions/tools/buildbot/slaves/svn-x64-macosx/setenv.sh Tue Nov 13 07:49:04 2018
@@ -24,8 +24,9 @@
 ##     SVNBB_SERF               Serf installation prefix
 ##                              Note: Serf should be built only
 ##                                    with the system APR/-Util.
+##     SVNBB_APR                Path of the default APR
+##     SVNBB_APRUTIL            Path of the default APR-Util
 ##     SVNBB_APR_13_NOTHREAD    Path of APR-1.3 with threading disabled
-##     SVNBB_APR_15             Path of APR-1.5
 ##     SVNBB_APR_20_DEV         Path of APR-2.0
 ##     SVNBB_JUNIT              The path of the junit.jar
 ##     SVNBB_PARALLEL           Optional: parallelization; defaults to 2
@@ -45,7 +46,8 @@ export SVNBB_BDB
 export SVNBB_SWIG
 export SVNBB_SERF
 export SVNBB_APR_13_NOTHREAD
-export SVNBB_APR_15
+export SVNBB_APR
+export SVNBB_APRUTIL
 export SVNBB_APR_20_DEV
 export SVNBB_JUNIT
 export SVNBB_PARALLEL

Modified: subversion/branches/mod-dav-svn-expressions/tools/buildbot/slaves/svn-x64-macosx/svnbuild-bindings.sh
URL: http://svn.apache.org/viewvc/subversion/branches/mod-dav-svn-expressions/tools/buildbot/slaves/svn-x64-macosx/svnbuild-bindings.sh?rev=1846488&r1=1846487&r2=1846488&view=diff
==============================================================================
--- subversion/branches/mod-dav-svn-expressions/tools/buildbot/slaves/svn-x64-macosx/svnbuild-bindings.sh (original)
+++ subversion/branches/mod-dav-svn-expressions/tools/buildbot/slaves/svn-x64-macosx/svnbuild-bindings.sh Tue Nov 13 07:49:04 2018
@@ -25,21 +25,16 @@ scripts=$(cd $(dirname "$0") && pwd)
 . ${scripts}/setenv.sh
 
 #
-# Step 4: build swig-py
+# Step 4: build bindings
 #
 
-echo "============ make swig-py"
-cd ${absbld}
-make swig-py
+build_bindings() {
+    echo "============ make $1"
+    cd ${absbld}
+    make $1
+}
 
-echo "============ make swig-pl"
-cd ${absbld}
-make swig-pl
-
-echo "============ make swig-rb"
-cd ${absbld}
-make swig-rb
-
-echo "============ make javahl"
-cd ${absbld}
-make javahl
+build_bindings swig-py
+build_bindings swig-pl
+build_bindings swig-rb
+build_bindings javahl

Modified: subversion/branches/mod-dav-svn-expressions/tools/buildbot/slaves/svn-x64-macosx/svnbuild.sh
URL: http://svn.apache.org/viewvc/subversion/branches/mod-dav-svn-expressions/tools/buildbot/slaves/svn-x64-macosx/svnbuild.sh?rev=1846488&r1=1846487&r2=1846488&view=diff
==============================================================================
--- subversion/branches/mod-dav-svn-expressions/tools/buildbot/slaves/svn-x64-macosx/svnbuild.sh (original)
+++ subversion/branches/mod-dav-svn-expressions/tools/buildbot/slaves/svn-x64-macosx/svnbuild.sh Tue Nov 13 07:49:04 2018
@@ -27,17 +27,33 @@ scripts=$(cd $(dirname "$0") && pwd)
 ${scripts}/mkramdisk.sh ${volume_name} ${ramconf}
 
 # These are the default APR and Serf config options
-serfconfig="--with-serf=${SVNBB_SERF} --with-apxs=/usr/sbin/apxs"
+serfconfig=" --with-serf=${SVNBB_SERF} --with-apxs=/usr/local/opt/httpd/bin/apxs"
 
 # An optional parameter tells build scripts which version of APR to use
 if [ ! -z "$1" ]; then
     aprdir=$(eval 'echo $SVNBB_'"$1")
+else
+    aprconfig="--with-apr=${SVNBB_APR} --with-apr-util=${SVNBB_APRUTIL}"
 fi
 if [ ! -z "${aprdir}" -a  -d "${aprdir}" ]; then
     aprconfig="--with-apr=${aprdir} --with-apr-util=${aprdir}"
     serfconfig=" --without-serf --without-apxs"
 fi
 
+# An optional parameter tells us if this is a warnings-only build.
+# We run the warnings build with a number of additional options.
+if [ "$2" = "warnings" ]; then
+    parallel=1
+    maintainer_mode=' -q --enable-maintainer-mode'
+    config_cflags="-Wno-deprecated-declarations"
+    config_cflags="${config_cflags} -DPACK_AFTER_EVERY_COMMIT"
+    config_cflags="${config_cflags} -DSVN_UNALIGNED_ACCESS_IS_OK=0"
+    config_cflags="${config_cflags} -DSUFFIX_LINES_TO_KEEP=0"
+    config_cflags="${config_cflags} -DSVN_DEPRECATED="
+else
+    parallel=${SVNBB_PARALLEL}
+fi
+
 #
 # Step 0: Create a directory for the test log files
 #
@@ -82,8 +98,10 @@ fi
 
 echo "============ configure"
 cd ${absbld}
-env CC=clang CXX=clang++ \
-${abssrc}/configure \
+env CC=clang CFLAGS="${config_cflags}" \
+    CXX=clang++ CXXFLAGS="${config_cxxflags}" \
+    LDFLAGS='-Wl,-w' \
+${abssrc}/configure${maintainer_mode} \
     --prefix="${absbld}/.install-prefix" \
     --enable-debug${optimizeconfig} \
     --disable-nls \
@@ -91,6 +109,7 @@ ${abssrc}/configure \
     ${aprconfig}${serfconfig} \
     --with-swig="${SVNBB_SWIG}" \
     --with-berkeley-db=db.h:"${SVNBB_BDB}/include":${SVNBB_BDB}/lib:db \
+    --enable-bdb6 \
     --enable-javahl \
     --without-jikes \
     ${lz4config} \
@@ -105,4 +124,4 @@ test -f config.log && mv config.log "${a
 
 echo "============ make"
 cd ${absbld}
-make -j${SVNBB_PARALLEL}
+make -j${parallel}

Modified: subversion/branches/mod-dav-svn-expressions/tools/buildbot/slaves/svn-x64-macosx/svncheck-bindings.sh
URL: http://svn.apache.org/viewvc/subversion/branches/mod-dav-svn-expressions/tools/buildbot/slaves/svn-x64-macosx/svncheck-bindings.sh?rev=1846488&r1=1846487&r2=1846488&view=diff
==============================================================================
--- subversion/branches/mod-dav-svn-expressions/tools/buildbot/slaves/svn-x64-macosx/svncheck-bindings.sh (original)
+++ subversion/branches/mod-dav-svn-expressions/tools/buildbot/slaves/svn-x64-macosx/svncheck-bindings.sh Tue Nov 13 07:49:04 2018
@@ -24,6 +24,8 @@ run_tests() {
 
     echo "============ make check-${check}"
     cd ${absbld}
+    make -s install
+    make -s install-${check}
     make check-${check} ${cleanup} || exit 1
 }
 

Modified: subversion/branches/mod-dav-svn-expressions/tools/buildbot/slaves/svn-x64-macosx/svncheck.sh
URL: http://svn.apache.org/viewvc/subversion/branches/mod-dav-svn-expressions/tools/buildbot/slaves/svn-x64-macosx/svncheck.sh?rev=1846488&r1=1846487&r2=1846488&view=diff
==============================================================================
--- subversion/branches/mod-dav-svn-expressions/tools/buildbot/slaves/svn-x64-macosx/svncheck.sh (original)
+++ subversion/branches/mod-dav-svn-expressions/tools/buildbot/slaves/svn-x64-macosx/svncheck.sh Tue Nov 13 07:49:04 2018
@@ -24,15 +24,22 @@ run_tests() {
     ok=true
 
     case "${ra}" in
-        local) check=check;             skipC=;;
-        svn)   check=svnserveautocheck; skipC="SKIP_C_TESTS=1";;
-        dav)   check=davautocheck;      skipC="SKIP_C_TESTS=1";;
+        local) check=check;             more=;;
+        svn)   check=svnserveautocheck; more="SKIP_C_TESTS=1";;
+        dav)   check=davautocheck;      more="SKIP_C_TESTS=1";
+               if [ "${fs}" == "bdb" ]; then
+                   more="${more} APACHE_MPM=prefork"
+               else
+                   more="${more} APACHE_MPM=event"
+               fi;;
         *)     exit 1;;
     esac
 
+    ${allow_remote} && more="${more} ALLOW_REMOTE_HTTP_CONNECTION=1"
+
     echo "============ make check ${ra}+${fs}"
     cd ${absbld}
-    make ${check} FS_TYPE=${fs} PARALLEL=${SVNBB_PARALLEL} CLEANUP=1 ${skipC} || ok=false
+    make ${check} FS_TYPE=${fs} PARALLEL=${SVNBB_PARALLEL} CLEANUP=1 ${more} || ok=false
 
     # Move any log files to the buildbot work directory
     test -f tests.log && mv tests.log "${abssrc}/.test-logs/tests-${ra}-${fs}.log"
@@ -72,6 +79,7 @@ check_fsfs_v6=false
 check_fsfs_v4=false
 check_fsx=false
 check_bdb=false
+allow_remote=false
 
 while [ ! -z "$1" ]; do
     case "$1" in
@@ -84,6 +92,7 @@ while [ ! -z "$1" ]; do
         fsfs-v4) check_fsfs_v4=true;;
         fsx)     check_fsx=true;;
         bdb)     check_bdb=true;;
+        remote)  allow_remote=true;;
         *)       exit 1;;
     esac
     shift

Modified: subversion/branches/mod-dav-svn-expressions/tools/client-side/bash_completion
URL: http://svn.apache.org/viewvc/subversion/branches/mod-dav-svn-expressions/tools/client-side/bash_completion?rev=1846488&r1=1846487&r2=1846488&view=diff
==============================================================================
--- subversion/branches/mod-dav-svn-expressions/tools/client-side/bash_completion (original)
+++ subversion/branches/mod-dav-svn-expressions/tools/client-side/bash_completion Tue Nov 13 07:49:04 2018
@@ -128,7 +128,7 @@ function _svn_complete_target() {
 		COMPREPLY=( $(compgen -d -S '/' -X '*/.*' -- $cur ) )
 		return
 	elif [[ ( $1 == "all" && $cur == ^/* ) || ( "$colon" == ":" && $cur == //*/* ) ]]
-	then	# we already hava a protocoll and host: autocomplete for svn ls ^/bla | svn ls remote_url | svn checkout remote_url
+	then	# we already have a protocol and host: autocomplete for svn ls ^/bla | svn ls remote_url | svn checkout remote_url
 		local p
 		if [ "$colon" == ":" ] ; then
 			p="$prefix$colon"
@@ -248,6 +248,8 @@ _svn()
 	cmds="$cmds patch propdel pdel propedit pedit propget pget proplist"
 	cmds="$cmds plist propset pset relocate resolve resolved revert status"
 	cmds="$cmds switch unlock update upgrade"
+	cmds="$cmds x-shelf-diff x-shelf-drop x-shelf-list x-shelf-list-by-paths"
+	cmds="$cmds x-shelf-log x-shelf-save x-shelve x-shelves x-unshelve"
 
 	# help options have a strange command status...
 	local helpOpts='--help -h'
@@ -445,7 +447,7 @@ _svn()
 
 	    # then we have an argument
 	    if [[ $cmd = 'merge' && ! $URL ]] ; then
-              # fist argument is the source URL for the merge
+              # first argument is the source URL for the merge
 	      URL=$opt
 	    fi
 
@@ -844,9 +846,11 @@ _svn()
 
 	# otherwise build possible options for the command
 	pOpts="--username --password --no-auth-cache --non-interactive \
+	       --password-from-stdin \
 	       --trust-server-cert-failures \
 	       --force-interactive"
-	mOpts="-m --message -F --file --encoding --force-log --with-revprop"
+	mOpts="-m --message -F --file --encoding --force-log --with-revprop \
+               --editor-cmd"
 	rOpts="-r --revision"
 	qOpts="-q --quiet"
 	nOpts="-N --non-recursive --depth"
@@ -881,20 +885,20 @@ _svn()
                          --force"
 		;;
 	cleanup)
-		cmdOpts="--diff3-cmd $pOpts --include-externals -q --quiet\
-			--remove-ignored --remove-unversioned"
+		cmdOpts="$pOpts --include-externals -q --quiet\
+			--remove-ignored --remove-unversioned --vacuum-pristines"
 		;;
 	commit|ci)
-		cmdOpts="$mOpts $qOpts $nOpts --targets --editor-cmd $pOpts \
+		cmdOpts="$mOpts $qOpts $nOpts --targets $pOpts \
 		         --no-unlock $cOpts --keep-changelists \
 		         --include-externals"
 		;;
 	copy|cp)
-		cmdOpts="$mOpts $rOpts $qOpts --editor-cmd $pOpts --parents \
+		cmdOpts="$mOpts $rOpts $qOpts $pOpts --parents \
 		         --ignore-externals --pin-externals"
 		;;
 	delete|del|remove|rm)
-		cmdOpts="--force $mOpts $qOpts --targets --editor-cmd $pOpts \
+		cmdOpts="--force $mOpts $qOpts --targets $pOpts \
                          --keep-local"
 		;;
 	diff|di)
@@ -914,7 +918,7 @@ _svn()
 		;;
 	import)
 		cmdOpts="--auto-props --no-auto-props $mOpts $qOpts $nOpts \
-		         --no-ignore --editor-cmd $pOpts --force"
+		         --no-ignore $pOpts --force"
 		;;
 	info)
 		cmdOpts="$pOpts $rOpts --targets -R --recursive --depth \
@@ -948,10 +952,10 @@ _svn()
 		         $qOpts -v --verbose --incremental --log"
 		;;
 	mkdir)
-		cmdOpts="$mOpts $qOpts --editor-cmd $pOpts --parents"
+		cmdOpts="$mOpts $qOpts $pOpts --parents"
 		;;
 	move|mv|rename|ren)
-		cmdOpts="$mOpts $rOpts $qOpts --force --editor-cmd $pOpts \
+		cmdOpts="$mOpts $qOpts --force $pOpts \
                          --parents --allow-mixed-revisions"
 		;;
 	patch)
@@ -964,7 +968,7 @@ _svn()
 		[[ $isRevProp || ! $prop ]] && cmdOpts="$cmdOpts --revprop"
 		;;
 	propedit|pedit|pe)
-		cmdOpts="--editor-cmd $pOpts $mOpts --force"
+		cmdOpts="$pOpts $mOpts --force"
 		[[ $isRevProp || ! $prop ]] && \
 		    cmdOpts="$cmdOpts --revprop $rOpts"
 		;;
@@ -1004,7 +1008,7 @@ _svn()
                          $rOpts $cOpts"
 		;;
 	switch|sw)
-		cmdOpts="--relocate $rOpts $nOpts $qOpts $pOpts --diff3-cmd \
+		cmdOpts="$rOpts $nOpts $qOpts $pOpts --diff3-cmd \
                          --force --accept --ignore-externals --set-depth \
 		         --ignore-ancestry"
 		;;
@@ -1020,6 +1024,37 @@ _svn()
 	upgrade)
 		cmdOpts="$qOpts $pOpts"
 		;;
+	x-shelf-list-by-paths)
+		cmdOpts="$pOpts"
+		;;
+	x-shelf-diff)
+		cmdOpts="$pOpts --summarize"
+		;;
+	x-shelf-drop)
+		cmdOpts="$pOpts"
+		;;
+	x-shelf-list|x-shelves)
+		cmdOpts="$qOpts $pOpts"
+		;;
+	x-shelf-log)
+		cmdOpts="$qOpts $pOpts"
+		;;
+	x-shelf-save)
+		cmdOpts="--dry-run \
+                         --depth --targets $cOpts \
+                         $mOpts \
+                         $qOpts $pOpts"
+		;;
+	x-shelve)
+		cmdOpts="--keep-local --dry-run \
+                         --depth --targets $cOpts \
+                         $mOpts \
+                         $qOpts $pOpts"
+		;;
+	x-unshelve)
+		cmdOpts="--drop --dry-run \
+                         $qOpts $pOpts"
+		;;
 	*)
 		;;
 	esac
@@ -1102,9 +1137,9 @@ _svnadmin ()
 	cur=${COMP_WORDS[COMP_CWORD]}
 
 	# Possible expansions, without pure-prefix abbreviations such as "h".
-	cmds='crashtest create delrevprop deltify dump freeze help hotcopy \
-	      info list-dblogs \
-	      list-unused-dblogs load lock lslocks lstxns pack recover rmlocks \
+	cmds='crashtest create delrevprop deltify dump dump-revprops freeze \
+	      help hotcopy info list-dblogs list-unused-dblogs \
+	      load load-revprops lock lslocks lstxns pack recover rmlocks \
 	      rmtxns setlog setrevprop setuuid unlock upgrade verify --version'
 
 	if [[ $COMP_CWORD -eq 1 ]] ; then
@@ -1115,7 +1150,7 @@ _svnadmin ()
 	# options that require a parameter
 	# note: continued lines must end '|' continuing lines must start '|'
 	optsParam="-r|--revision|--parent-dir|--fs-type|-M|--memory-cache-size"
-	optsParam="$optsParam|-F|--file"
+	optsParam="$optsParam|-F|--file|--exclude|--include"
 
 	# if not typing an option, or if the previous option required a
 	# parameter, then fallback on ordinary filename expansion
@@ -1130,15 +1165,18 @@ _svnadmin ()
 	case ${COMP_WORDS[1]} in
 	create)
 		cmdOpts="--bdb-txn-nosync --bdb-log-keep --config-dir \
-		         --fs-type --pre-1.4-compatible --pre-1.5-compatible \
-		         --pre-1.6-compatible --compatible-version"
+		         --fs-type --compatible-version"
 		;;
 	deltify)
-		cmdOpts="-r --revision -q --quiet"
+		cmdOpts="-r --revision -q --quiet -M --memory-cache-size"
 		;;
 	dump)
 		cmdOpts="-r --revision --incremental -q --quiet --deltas \
-		         -M --memory-cache-size -F --file"
+		         -M --memory-cache-size -F --file \
+		         --exclude --include --pattern"
+		;;
+        dump-revprops)
+		cmdOpts="-r --revision -q --quiet -F --file"
 		;;
 	freeze)
 		cmdOpts="-F --file"
@@ -1147,23 +1185,35 @@ _svnadmin ()
 		cmdOpts="$cmds"
 		;;
 	hotcopy)
-		cmdOpts="--clean-logs"
+		cmdOpts="--clean-logs --incremental -q --quiet"
 		;;
 	load)
 		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 --normalize-props -F --file"
+		         --no-flush-to-disk --normalize-props -F --file \
+		         --ignore-dates -r --revision"
+		;;
+        load-revprops)
+		cmdOpts="-r --revision -q --quiet -F --file \
+		         --bypass-prop-validation --normalize-props \
+		         --force-uuid --no-flush-to-disk"
 		;;
 	lstxns)
         	cmdOpts="-r --revision"
 		;;
 	lock|unlock)
-		cmdOpts="--bypass-hooks"
+		cmdOpts="--bypass-hooks -q --quiet"
+		;;
+	pack)
+		cmdOpts="-M --memory-cache-size -q --quiet"
 		;;
 	recover)
 		cmdOpts="--wait"
 		;;
+	rmlocks)
+		cmdOpts="-q --quiet"
+		;;
 	rmtxns)
 		cmdOpts="-q --quiet"
 		;;
@@ -1176,7 +1226,9 @@ _svnadmin ()
 		         --use-post-revprop-change-hook"
 		;;
 	verify)
-		cmdOpts="-r --revision -q --quiet"
+		cmdOpts="-r --revision -t --transaction -q --quiet \
+		         --check-normalization --keep-going \
+		         -M --memory-cache-size --metadata-only"
 		;;
 	*)
 		;;
@@ -1255,9 +1307,9 @@ _svndumpfilter ()
 	cmdOpts=
 	case ${COMP_WORDS[1]} in
 	exclude|include)
-		cmdOpts="--drop-empty-revs --renumber-revs
+		cmdOpts="--drop-empty-revs --drop-all-empty-revs --renumber-revs
 		         --skip-missing-merge-sources --targets
-		         --preserve-revprops --quiet"
+		         --preserve-revprops --quiet --pattern"
 		;;
 	help|h|\?)
 		cmdOpts="$cmds"

Modified: subversion/branches/mod-dav-svn-expressions/tools/client-side/bash_completion_test
URL: http://svn.apache.org/viewvc/subversion/branches/mod-dav-svn-expressions/tools/client-side/bash_completion_test?rev=1846488&r1=1846487&r2=1846488&view=diff
==============================================================================
--- subversion/branches/mod-dav-svn-expressions/tools/client-side/bash_completion_test (original)
+++ subversion/branches/mod-dav-svn-expressions/tools/client-side/bash_completion_test Tue Nov 13 07:49:04 2018
@@ -20,9 +20,16 @@
 # script produces appropriate lists of completions for various incomplete svn
 # command lines.
 
-if [ ! -f "$1" ] || [ "$2" ]; then
-  echo "Usage: bash_completion_test BASH_COMPLETION_PATHNAME"
+THIS_DIR=`dirname "$0"`
+SCRIPT="$1"
+if [ -z "$SCRIPT" ]; then
+  SCRIPT="$THIS_DIR/bash_completion"
+fi
+
+if [ ! -r "$SCRIPT" ] || [ "$2" ]; then
+  echo "Usage: bash_completion_test [BASH_COMPLETION_PATHNAME]"
   echo "Tests the specified \"bash_completion\" script,"
+  echo "defaulting to the one in the same directory as this test,"
   echo "including checking it against the \"svn\" program found in the current PATH."
   exit 1
 fi
@@ -32,20 +39,26 @@ shopt -s extglob
 export LC_ALL=C
 
 # Execute the script which is to be tested.
-. "$1"
+. "$SCRIPT"
 
-# From the given incomplete svn command, print a space-separated list of
+# From the given incomplete command, print a space-separated list of
 # possible completions of the last argument (or of an empty first argument
 # if no subcommand is given).
-# Usage: get_svn_completions [SVN-SUBCOMMAND [SVN-OPTION...]]
-get_svn_completions() {
-  COMP_WORDS=(svn "$@")
-  if [ $# == 0 ]; then
+#
+# Usage: get_completions SVN-CMD [SVN-SUBCOMMAND [SVN-OPTION...]]
+# where SVN-CMD is "svn", "svnadmin", etc.; such that when a leading
+# underscore is added, it must name one of the completion functions in
+# "bash_completion".
+get_completions() {
+  SVN_CMD="$1"
+  COMP_WORDS=("$@")
+  if [ $# == 1 ]; then
     COMP_CWORD=1
   else
-    COMP_CWORD=$#
+    COMP_CWORD=$(($#-1))
   fi
-  _svn
+  # Call the appropriate completion function (e.g. "_svn") with no arguments.
+  "_$SVN_CMD"
   echo -n "${COMPREPLY[*]}"
 }
 
@@ -62,30 +75,38 @@ fail() {
 }
 
 # Check that EXPECTED-WORD is among the completions of the last word in
-# SVN-COMMAND.  SVN-COMMAND is a single argument to this function, split
-# into multiple arguments when passed to "get_svn_completions()".
-# Usage: includes SVN-COMMAND EXPECTED-WORD
+# SVN-ARGS.  SVN-ARGS is a single argument to this function, split
+# into multiple arguments when passed to "get_completions()".
+# Usage: includes SVN-CMD SVN-ARGS EXPECTED-WORD
 includes() {
-  COMPLETIONS=`get_svn_completions $1`
-  if [[ "$2" != @(${COMPLETIONS// /|}) ]]; then
-    fail "completions of \"svn $1\" should include \"$2\"" \
+  SVN_CMD="$1"
+  SVN_ARGS="$2"
+  EXPECTED_WORD="$3"
+  COMPLETIONS=`get_completions "$SVN_CMD" $SVN_ARGS`
+  if [[ "$EXPECTED_WORD" != @(${COMPLETIONS// /|}) ]]; then
+    fail "completions of \"$SVN_CMD $SVN_ARGS\" should include \"$EXPECTED_WORD\"" \
       "(completions: $COMPLETIONS)"
   fi
 }
 
 excludes() {
-  COMPLETIONS=`get_svn_completions $1`
-  if [[ "$2" == @(${COMPLETIONS// /|}) ]]; then
-    fail "completions of \"svn $1\" should exclude \"$2\"" \
+  SVN_CMD="$1"
+  SVN_ARGS="$2"
+  EXPECTED_WORD="$3"
+  COMPLETIONS=`get_completions "$SVN_CMD" $SVN_ARGS`
+  if [[ "$EXPECTED_WORD" == @(${COMPLETIONS// /|}) ]]; then
+    fail "completions of \"$SVN_CMD $SVN_ARGS\" should exclude \"$EXPECTED_WORD\"" \
       "(completions: $COMPLETIONS)"
   fi
 }
 
-# Print the valid subcommands for "svn", one per line, sorted.
+# Print the valid subcommands for an "svn"-like program, one per line, sorted.
 # Exclude any synonym that is just a truncation of its full name.
-# Usage: get_svn_subcommands
+# Usage: get_svn_subcommands SVN-CMD
+# where SVN-CMD is "svn" or another program that outputs similar help.
 get_svn_subcommands() {
-  svn help |
+  SVN_CMD="$1"
+  "$SVN_CMD" help |
     # Find the relevant lines.
     sed -n -e '1,/^Available subcommands:$/d;/^$/q;p' |
     # Remove brackets and commas
@@ -111,18 +132,21 @@ get_svn_subcommands() {
 }
 
 # Print the valid option switches for "svn SUBCMD", one per line, sorted.
-# Usage: get_svn_options SUBCMD
+# Usage: get_svn_options SVN-CMD SUBCMD
+# where SVN-CMD is "svn" or another program that outputs similar help.
 get_svn_options() {
-  { svn help "$1" |
+  SVN_CMD="$1"
+  SUBCMD="$2"
+  { "$SVN_CMD" help "$SUBCMD" |
       # Remove deprecated options
       grep -v deprecated |
       # Find the relevant lines; remove "arg" and description.
-      sed -n -e '1,/^Valid options:$/d;/^  -/!d' \
+      sed -n -e '1,/^\(Valid\|Global\) options:$/d;/^  -/!d' \
              -e 's/\( ARG\)* * : .*//;p' |
       # Remove brackets; put each word on its own line.
       tr -d '] ' | tr '[' '\n'
     # The following options are always accepted but not listed in the help
-    if [ "$1" != "help" ] ; then
+    if [ "$SUBCMD" != "help" ] ; then
       echo "-h"
       echo "--help"
     fi
@@ -136,36 +160,38 @@ set +e  # Do not exit on error
 TESTS_FAILED=
 
 echo "Checking general completion"
-includes "he" "help"
-includes "" "help"
-includes "" "--version"
-
-echo "Checking list of subcommands"
-HELP_SUBCMDS=`get_svn_subcommands | tr "\n" " "`
-COMPLETION_SUBCMDS=`get_svn_completions | tr " " "\n" | grep -v "^-" | sort | tr "\n" " "`
-if [ "$HELP_SUBCMDS" != "$COMPLETION_SUBCMDS" ]; then
-  fail "non-option completions for \"svn \" != subcommands accepted" \
-       "    (non-o. cmpl.: $COMPLETION_SUBCMDS)" \
-       "    (svn accepts:  $HELP_SUBCMDS)"
-fi
-
-echo "Checking list of options for each subcommand"
-for SUBCMD in $HELP_SUBCMDS; do
-  HELP_OPTIONS=`get_svn_options $SUBCMD | tr "\n" " "`
-  COMPLETION_OPTIONS=`get_svn_completions $SUBCMD - | tr " " "\n" | sort | tr "\n" " "`
-  if [ "$HELP_OPTIONS" != "$COMPLETION_OPTIONS" ]; then
-    fail "completions for \"svn $SUBCMD -\" != options accepted" \
-	 "    (completions: $COMPLETION_OPTIONS)" \
-         "    (svn accepts: $HELP_OPTIONS)"
+includes svn "he" "help"
+includes svn "" "help"
+includes svn "" "--version"
+
+for SVN_CMD in svn svnadmin svndumpfilter svnlook svnrdump svnsync; do
+  echo "Checking list of subcommands: $SVN_CMD"
+  HELP_SUBCMDS=`get_svn_subcommands "$SVN_CMD" | tr "\n" " "`
+  COMPLETION_SUBCMDS=`get_completions "$SVN_CMD" | tr " " "\n" | grep -v "^-" | sort | tr "\n" " "`
+  if [ "$HELP_SUBCMDS" != "$COMPLETION_SUBCMDS" ]; then
+    fail "non-option completions for \"$SVN_CMD\" != subcommands accepted" \
+         "    (non-o. cmpl.: $COMPLETION_SUBCMDS)" \
+         "    (help says:    $HELP_SUBCMDS)"
   fi
+
+  echo "Checking list of options for each subcommand"
+  for SUBCMD in $HELP_SUBCMDS; do
+    HELP_OPTIONS=`get_svn_options $SVN_CMD $SUBCMD | tr "\n" " "`
+    COMPLETION_OPTIONS=`get_completions $SVN_CMD $SUBCMD - | tr " " "\n" | sort | tr "\n" " "`
+    if [ "$HELP_OPTIONS" != "$COMPLETION_OPTIONS" ]; then
+      fail "completions for \"$SVN_CMD $SUBCMD -\" != options accepted" \
+           "    (completions: $COMPLETION_OPTIONS)" \
+           "    (help says:   $HELP_OPTIONS)"
+    fi
+  done
 done
 
 echo "Checking rejection of synonyms"
-excludes "diff -x -u -" "-x"
-excludes "diff -x -u --e" "--extensions"
-excludes "diff --extensions -u -" "--extensions"
-excludes "diff --extensions -u -" "-x"
-excludes "diff --extensions=-u -" "-x"
+excludes svn "diff -x -u -" "-x"
+excludes svn "diff -x -u --e" "--extensions"
+excludes svn "diff --extensions -u -" "--extensions"
+excludes svn "diff --extensions -u -" "-x"
+excludes svn "diff --extensions=-u -" "-x"
 
 if [ $TESTS_FAILED ]; then
   echo "FAILURE: at least one bash_completion test failed."

Modified: subversion/branches/mod-dav-svn-expressions/tools/client-side/svn-mergeinfo-normalizer/help-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/mod-dav-svn-expressions/tools/client-side/svn-mergeinfo-normalizer/help-cmd.c?rev=1846488&r1=1846487&r2=1846488&view=diff
==============================================================================
--- subversion/branches/mod-dav-svn-expressions/tools/client-side/svn-mergeinfo-normalizer/help-cmd.c (original)
+++ subversion/branches/mod-dav-svn-expressions/tools/client-side/svn-mergeinfo-normalizer/help-cmd.c Tue Nov 13 07:49:04 2018
@@ -163,7 +163,7 @@ svn_min__help(apr_getopt_t *os,
                                                              pool)),
                          pool);
 #endif
-#ifdef SVN_HAVE_GNOME_KEYRING
+#if (defined(SVN_HAVE_GNOME_KEYRING) || defined(SVN_HAVE_LIBSECRET))
   svn_stringbuf_appendcstr(version_footer, "* Gnome Keyring\n");
 #endif
 #ifdef SVN_HAVE_GPG_AGENT
@@ -176,7 +176,7 @@ svn_min__help(apr_getopt_t *os,
   svn_stringbuf_appendcstr(version_footer, "* KWallet (KDE)\n");
 #endif
 
-  return svn_opt_print_help4(os,
+  return svn_opt_print_help5(os,
                              "svn-mergeinfo-normalizer",
                              opt_state ? opt_state->version : FALSE,
                              opt_state ? opt_state->quiet : FALSE,

Modified: subversion/branches/mod-dav-svn-expressions/tools/client-side/svn-mergeinfo-normalizer/mergeinfo-normalizer.h
URL: http://svn.apache.org/viewvc/subversion/branches/mod-dav-svn-expressions/tools/client-side/svn-mergeinfo-normalizer/mergeinfo-normalizer.h?rev=1846488&r1=1846487&r2=1846488&view=diff
==============================================================================
--- subversion/branches/mod-dav-svn-expressions/tools/client-side/svn-mergeinfo-normalizer/mergeinfo-normalizer.h (original)
+++ subversion/branches/mod-dav-svn-expressions/tools/client-side/svn-mergeinfo-normalizer/mergeinfo-normalizer.h Tue Nov 13 07:49:04 2018
@@ -117,7 +117,7 @@ svn_opt_subcommand_t
   svn_min__remove_branches;
 
 /* See definition in svn.c for documentation. */
-extern const svn_opt_subcommand_desc2_t svn_min__cmd_table[];
+extern const svn_opt_subcommand_desc3_t svn_min__cmd_table[];
 
 /* See definition in svn.c for documentation. */
 extern const int svn_min__global_options[];

Modified: subversion/branches/mod-dav-svn-expressions/tools/client-side/svn-mergeinfo-normalizer/svn-mergeinfo-normalizer.c
URL: http://svn.apache.org/viewvc/subversion/branches/mod-dav-svn-expressions/tools/client-side/svn-mergeinfo-normalizer/svn-mergeinfo-normalizer.c?rev=1846488&r1=1846487&r2=1846488&view=diff
==============================================================================
--- subversion/branches/mod-dav-svn-expressions/tools/client-side/svn-mergeinfo-normalizer/svn-mergeinfo-normalizer.c (original)
+++ subversion/branches/mod-dav-svn-expressions/tools/client-side/svn-mergeinfo-normalizer/svn-mergeinfo-normalizer.c Tue Nov 13 07:49:04 2018
@@ -68,6 +68,7 @@
    use the short option letter as identifier.  */
 typedef enum svn_min__longopt_t {
   opt_auth_password = SVN_OPT_FIRST_LONGOPT_ID,
+  opt_auth_password_from_stdin,
   opt_auth_username,
   opt_config_dir,
   opt_config_options,
@@ -113,6 +114,9 @@ const apr_getopt_option_t svn_min__optio
                     N_("specify a password ARG (caution: on many operating\n"
                        "                             "
                        "systems, other users will be able to see this)")},
+  {"password-from-stdin",
+                    opt_auth_password_from_stdin, 0,
+                    N_("read password from stdin")},
   {"targets",       opt_targets, 1,
                     N_("pass contents of file ARG as additional args")},
   {"depth",         opt_depth, 1,
@@ -209,51 +213,52 @@ const apr_getopt_option_t svn_min__optio
    command to take these arguments allows scripts to just pass them
    willy-nilly to every invocation of 'svn') . */
 const int svn_min__global_options[] =
-{ opt_auth_username, opt_auth_password, opt_no_auth_cache, opt_non_interactive,
-  opt_force_interactive, opt_trust_server_cert,
-  opt_trust_server_cert_unknown_ca, opt_trust_server_cert_cn_mismatch,
-  opt_trust_server_cert_expired, opt_trust_server_cert_not_yet_valid,
-  opt_trust_server_cert_other_failure,
+{ opt_auth_username, opt_auth_password, opt_auth_password_from_stdin,
+  opt_no_auth_cache, opt_non_interactive, opt_force_interactive,
+  opt_trust_server_cert, opt_trust_server_cert_unknown_ca,
+  opt_trust_server_cert_cn_mismatch, opt_trust_server_cert_expired,
+  opt_trust_server_cert_not_yet_valid, opt_trust_server_cert_other_failure,
   opt_config_dir, opt_config_options, 0
 };
 
-const svn_opt_subcommand_desc2_t svn_min__cmd_table[] =
+const svn_opt_subcommand_desc3_t svn_min__cmd_table[] =
 {
-  { "help", svn_min__help, {"?", "h"}, N_
-    ("Describe the usage of this program or its subcommands.\n"
-     "usage: help [SUBCOMMAND...]\n"),
+  { "help", svn_min__help, {"?", "h"}, {N_(
+     "Describe the usage of this program or its subcommands.\n"
+     "usage: help [SUBCOMMAND...]\n"
+    )},
     {0} },
 
   /* This command is also invoked if we see option "--help", "-h" or "-?". */
 
-  { "analyze", svn_min__analyze, { "analyse" }, N_
-    ("Generate a report of which part of the sub-tree mergeinfo can be\n"
+  { "analyze", svn_min__analyze, { "analyse" }, {N_(
+     "Generate a report of which part of the sub-tree mergeinfo can be\n"
      "removed and which part can't.\n"
      "usage: analyze [WCPATH...]\n"
-     "\n"
+     "\n"), N_(
      "  If neither --remove-obsoletes, --remove-redundant nor --combine-ranges\n"
      "  option is given, all three will be used implicitly.\n"
-     "\n"
+     "\n"), N_(
      "  In verbose mode, the command will behave just like 'normalize --dry-run'\n"
      "  but will show an additional summary of all deleted branches that were\n"
      "  encountered plus the revision of their latest deletion (if available).\n"
-     "\n"
+     "\n"), N_(
      "  In non-verbose mode, the per-node output does not give the parent path,\n"
      "  no successful elisions and branch removals nor the list of remaining\n"
      "  branches.\n"
-    ),
+    )},
     {opt_targets, opt_depth, 'v',
      opt_remove_obsoletes, opt_remove_redundant,
      opt_remove_redundant_misaligned, opt_combine_ranges} },
 
-  { "normalize", svn_min__normalize, { 0 }, N_
-    ("Normalize / reduce the mergeinfo throughout the working copy sub-tree.\n"
+  { "normalize", svn_min__normalize, { 0 }, {N_(
+     "Normalize / reduce the mergeinfo throughout the working copy sub-tree.\n"
      "usage: normalize [WCPATH...]\n"
-     "\n"
+     "\n"), N_(
      "  If neither --remove-obsoletes, --remove-redundant, --combine-ranges\n"
      "  nor --remove-redundant-misaligned option is given, --remove-redundant\n"
      "  will be used implicitly.\n"
-     "\n"
+     "\n"), N_(
      "  In non-verbose mode, only general progress as well as a summary before\n"
      "  and after the normalization process will be shown.  Note that sub-node\n"
      "  mergeinfo which could be removed entirely does not contribute to the\n"
@@ -261,12 +266,12 @@ const svn_opt_subcommand_desc2_t svn_min
      "  ranges combined only refers to the mergeinfo lines still present after\n"
      "  the normalization process.  To get total numbers, compare the initial\n"
      "  with the final mergeinfo statistics.\n"
-     "\n"
+     "\n"), N_(
      "  The detailed operation log in verbose mode replaces the progress display.\n"
      "  For each node with mergeinfo, the nearest parent node with mergeinfo is\n"
      "  given - if there is one and the result of trying to remove the mergeinfo\n"
      "  is shown for each branch.  The various outputs are:\n"
-     "\n"
+     "\n"), N_(
      "    elide redundant branch - Revision ranges are the same as in the parent.\n"
      "                             Mergeinfo for this branch can be elided.\n"
      "    elide branch           - Not an exact match with the parent but the\n"
@@ -320,32 +325,34 @@ const svn_opt_subcommand_desc2_t svn_min
      "                             The sub-tree mergeinfo cannot be elided.\n"
      "    REVERSE RANGE(S) found - The mergeinfo contains illegal reverse ranges.\n"
      "                             The sub-tree mergeinfo cannot be elided.\n"
-     "\n"
+     "\n"), N_(
      "  If all branches have been removed from a nodes' mergeinfo, the whole\n"
      "  svn:mergeinfo property will be removed.  Otherwise, only obsolete\n"
      "  branches will be removed.  In verbose mode, a list of branches that\n"
-     "  could not be removed will be shown per node.\n"),
+     "  could not be removed will be shown per node.\n"
+    )},
     {opt_targets, opt_depth, opt_dry_run, 'q', 'v',
      opt_remove_obsoletes, opt_remove_redundant,
      opt_remove_redundant_misaligned, opt_combine_ranges} },
 
-  { "remove-branches", svn_min__remove_branches, { 0 }, N_
-    ("Read a list of branch names from the given file and remove all\n"
+  { "remove-branches", svn_min__remove_branches, { 0 }, {N_(
+     "Read a list of branch names from the given file and remove all\n"
      "mergeinfo referring to these branches from the given targets.\n"
      "usage: remove-branches [WCPATH...] --file FILE\n"
-     "\n"
+     "\n"), N_(
      "  The command will behave just like 'normalize --remove-obsoletes' but\n"
      "  will never actually contact the repository.  Instead, it assumes any\n"
      "  path given in FILE is a deleted branch.\n"
-     "\n"
+     "\n"), N_(
      "  Compared to a simple 'normalize --remove-obsoletes' run, this command\n"
      "  allows for selective removal of obsolete branches.  It may therefore be\n"
      "  better suited for large deployments with complex branch structures.\n"
      "  You may also use this to remove mergeinfo that refers to still existing\n"
-     "  branches.\n"),
+     "  branches.\n"
+    )},
     {opt_targets, opt_depth, opt_dry_run, 'q', 'v', 'F'} },
 
-  { NULL, NULL, {0}, NULL, {0} }
+  { NULL, NULL, {0}, {NULL}, {0} }
 };
 
 
@@ -410,13 +417,14 @@ sub_main(int *exit_code, int argc, const
   svn_client_ctx_t *ctx;
   apr_array_header_t *received_opts;
   int i;
-  const svn_opt_subcommand_desc2_t *subcommand = NULL;
+  const svn_opt_subcommand_desc3_t *subcommand = NULL;
   svn_min__cmd_baton_t command_baton = { 0 };
   svn_auth_baton_t *ab;
   svn_config_t *cfg_config;
   svn_boolean_t interactive_conflicts = FALSE;
   svn_boolean_t force_interactive = FALSE;
   apr_hash_t *cfg_hash;
+  svn_boolean_t read_pass_from_stdin = FALSE;
 
   received_opts = apr_array_make(pool, SVN_OPT_MAX_OPTIONS, sizeof(int));
 
@@ -528,6 +536,9 @@ sub_main(int *exit_code, int argc, const
         SVN_ERR(svn_utf_cstring_to_utf8(&opt_state.auth_password,
                                         opt_arg, pool));
         break;
+      case opt_auth_password_from_stdin:
+        read_pass_from_stdin = TRUE;
+        break;
       case opt_no_auth_cache:
         opt_state.no_auth_cache = TRUE;
         break;
@@ -606,6 +617,14 @@ sub_main(int *exit_code, int argc, const
                                   opt_state.non_interactive,
                                   force_interactive);
 
+  /* --password-from-stdin can only be used with --non-interactive */
+  if (read_pass_from_stdin && !opt_state.non_interactive)
+    {
+      return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                              _("--password-from-stdin requires "
+                                "--non-interactive"));
+    }
+
   /* ### This really belongs in libsvn_client.  The trouble is,
      there's no one place there to run it from, no
      svn_client_init().  We'd have to add it to all the public
@@ -623,7 +642,7 @@ sub_main(int *exit_code, int argc, const
      just typos/mistakes.  Whatever the case, the subcommand to
      actually run is svn_cl__help(). */
   if (opt_state.help)
-    subcommand = svn_opt_get_canonical_subcommand2(svn_min__cmd_table, "help");
+    subcommand = svn_opt_get_canonical_subcommand3(svn_min__cmd_table, "help");
 
   /* If we're not running the `help' subcommand, then look for a
      subcommand in the first argument. */
@@ -634,8 +653,8 @@ sub_main(int *exit_code, int argc, const
           if (opt_state.version)
             {
               /* Use the "help" subcommand to handle the "--version" option. */
-              static const svn_opt_subcommand_desc2_t pseudo_cmd =
-                { "--version", svn_min__help, {0}, "",
+              static const svn_opt_subcommand_desc3_t pseudo_cmd =
+                { "--version", svn_min__help, {0}, {""},
                   {opt_version,    /* must accept its own option */
                    'q',            /* brief output */
                    'v',            /* verbose output */
@@ -660,7 +679,7 @@ sub_main(int *exit_code, int argc, const
 
           SVN_ERR(svn_utf_cstring_to_utf8(&first_arg, os->argv[os->ind++],
                                           pool));
-          subcommand = svn_opt_get_canonical_subcommand2(svn_min__cmd_table,
+          subcommand = svn_opt_get_canonical_subcommand3(svn_min__cmd_table,
                                                          first_arg);
           if (subcommand == NULL)
             {
@@ -688,12 +707,12 @@ sub_main(int *exit_code, int argc, const
       if (opt_id == 'h' || opt_id == '?')
         continue;
 
-      if (! svn_opt_subcommand_takes_option3(subcommand, opt_id,
+      if (! svn_opt_subcommand_takes_option4(subcommand, opt_id,
                                              svn_min__global_options))
         {
           const char *optstr;
           const apr_getopt_option_t *badopt =
-            svn_opt_get_option_from_code2(opt_id, svn_min__options,
+            svn_opt_get_option_from_code3(opt_id, svn_min__options,
                                           subcommand, pool);
           svn_opt_format_option(&optstr, badopt, FALSE, pool);
           if (subcommand->name[0] == '-')
@@ -788,6 +807,12 @@ sub_main(int *exit_code, int argc, const
   }
 #endif
 
+  /* Get password from stdin if necessary */
+  if (read_pass_from_stdin)
+    {
+      SVN_ERR(svn_cmdline__stdin_readline(&opt_state.auth_password, pool, pool));
+    }
+
   /* Create a client context object. */
   command_baton.opt_state = &opt_state;
   SVN_ERR(svn_client_create_context2(&ctx, cfg_hash, pool));

Modified: subversion/branches/mod-dav-svn-expressions/tools/client-side/svn-mergeinfo-normalizer/wc_mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/mod-dav-svn-expressions/tools/client-side/svn-mergeinfo-normalizer/wc_mergeinfo.c?rev=1846488&r1=1846487&r2=1846488&view=diff
==============================================================================
--- subversion/branches/mod-dav-svn-expressions/tools/client-side/svn-mergeinfo-normalizer/wc_mergeinfo.c (original)
+++ subversion/branches/mod-dav-svn-expressions/tools/client-side/svn-mergeinfo-normalizer/wc_mergeinfo.c Tue Nov 13 07:49:04 2018
@@ -112,8 +112,8 @@ static int
 compare_mergeinfo(const void *lhs,
                   const void *rhs)
 {
-  const mergeinfo_t *lhs_mi = *(const mergeinfo_t **)lhs;
-  const mergeinfo_t *rhs_mi = *(const mergeinfo_t **)rhs;
+  const mergeinfo_t *lhs_mi = *(const mergeinfo_t *const *)lhs;
+  const mergeinfo_t *rhs_mi = *(const mergeinfo_t *const *)rhs;
 
   return strcmp(lhs_mi->local_path, rhs_mi->local_path);
 }

Modified: subversion/branches/mod-dav-svn-expressions/tools/client-side/svn-viewspec.py
URL: http://svn.apache.org/viewvc/subversion/branches/mod-dav-svn-expressions/tools/client-side/svn-viewspec.py?rev=1846488&r1=1846487&r2=1846488&view=diff
==============================================================================
--- subversion/branches/mod-dav-svn-expressions/tools/client-side/svn-viewspec.py (original)
+++ subversion/branches/mod-dav-svn-expressions/tools/client-side/svn-viewspec.py Tue Nov 13 07:49:04 2018
@@ -121,6 +121,8 @@ DEPTH_FILES      = 'files'
 DEPTH_IMMEDIATES = 'immediates'
 DEPTH_INFINITY   = 'infinity'
 
+os_system = None
+args = None
 
 class TreeNode:
     """A representation of a single node in a Subversion sparse
@@ -159,8 +161,8 @@ def svn_path_compare_paths(path1, path2)
     NOTE: Stolen unapologetically from Subversion's Python bindings
     module svn.core."""
 
-    path1_len = len(path1);
-    path2_len = len(path2);
+    path1_len = len(path1)
+    path2_len = len(path2)
     min_len = min(path1_len, path2_len)
     i = 0
 
@@ -280,10 +282,10 @@ def checkout_tree(base_url, revision, tr
     if revision != -1:
         revision_str = "--revision=%d " % (revision)
     if is_top:
-        os.system('svn checkout "%s" "%s" --depth=%s %s'
+        os_system('svn checkout "%s" "%s" --depth=%s %s'
                   % (base_url, target_dir, depth, revision_str))
     else:
-        os.system('svn update "%s" --set-depth=%s %s'
+        os_system('svn update "%s" --set-depth=%s %s'
                   % (target_dir, depth, revision_str))
     child_names = tree_node.children.keys()
     child_names.sort(svn_path_compare_paths)
@@ -304,27 +306,34 @@ def checkout_spec(viewspec, target_dir):
 
 def usage_and_exit(errmsg=None):
     stream = errmsg and sys.stderr or sys.stdout
-    msg = __doc__.replace("__SCRIPTNAME__", os.path.basename(sys.argv[0]))
+    msg = __doc__.replace("__SCRIPTNAME__", os.path.basename(args[0]))
     stream.write(msg)
     if errmsg:
         stream.write("ERROR: %s\n" % (errmsg))
-    sys.exit(errmsg and 1 or 0)
+        return 1
+    return 0
+
+def main(os_sys, args_in):
+    global os_system
+    global args
+    os_system = os_sys
+    args = args_in
 
-def main():
-    argc = len(sys.argv)
+    argc = len(args)
     if argc < 2:
-        usage_and_exit('Not enough arguments.')
-    subcommand = sys.argv[1]
+        return usage_and_exit('Not enough arguments.')
+    subcommand = args[1]
     if subcommand == 'help':
-        usage_and_exit()
+        return usage_and_exit()
     elif subcommand == 'help-format':
         msg = FORMAT_HELP.replace("__SCRIPTNAME__",
-                                  os.path.basename(sys.argv[0]))
+                                  os.path.basename(args[0]))
         sys.stdout.write(msg)
+        return 1
     elif subcommand == 'examine':
         if argc < 3:
-            usage_and_exit('No viewspec file specified.')
-        fp = (sys.argv[2] == '-') and sys.stdin or open(sys.argv[2], 'r')
+            return usage_and_exit('No viewspec file specified.')
+        fp = (args[2] == '-') and sys.stdin or open(args[2], 'r')
         viewspec = parse_viewspec(fp)
         sys.stdout.write("Url: %s\n" % (viewspec.base_url))
         revision = viewspec.revision
@@ -336,13 +345,14 @@ def main():
         viewspec.tree.dump(True)
     elif subcommand == 'checkout':
         if argc < 3:
-            usage_and_exit('No viewspec file specified.')
+            return usage_and_exit('No viewspec file specified.')
         if argc < 4:
-            usage_and_exit('No target directory specified.')
-        fp = (sys.argv[2] == '-') and sys.stdin or open(sys.argv[2], 'r')
-        checkout_spec(parse_viewspec(fp), sys.argv[3])
+            return usage_and_exit('No target directory specified.')
+        fp = (args[2] == '-') and sys.stdin or open(args[2], 'r')
+        checkout_spec(parse_viewspec(fp), args[3])
     else:
-        usage_and_exit('Unknown subcommand "%s".' % (subcommand))
+        return usage_and_exit('Unknown subcommand "%s".' % (subcommand))
 
 if __name__ == "__main__":
-    main()
+    if main(os.system, sys.argv):
+        sys.exit(1)

Modified: subversion/branches/mod-dav-svn-expressions/tools/client-side/svnconflict/svnconflict.c
URL: http://svn.apache.org/viewvc/subversion/branches/mod-dav-svn-expressions/tools/client-side/svnconflict/svnconflict.c?rev=1846488&r1=1846487&r2=1846488&view=diff
==============================================================================
--- subversion/branches/mod-dav-svn-expressions/tools/client-side/svnconflict/svnconflict.c (original)
+++ subversion/branches/mod-dav-svn-expressions/tools/client-side/svnconflict/svnconflict.c Tue Nov 13 07:49:04 2018
@@ -78,6 +78,7 @@ typedef struct svnconflict_cmd_baton_t
    use the short option letter as identifier.  */
 typedef enum svnconflict_longopt_t {
   opt_auth_password = SVN_OPT_FIRST_LONGOPT_ID,
+  opt_auth_password_from_stdin,
   opt_auth_username,
   opt_config_dir,
   opt_config_options,
@@ -96,6 +97,9 @@ static const apr_getopt_option_t svnconf
                     N_("specify a password ARG (caution: on many operating\n"
                        "                             "
                        "systems, other users will be able to see this)")},
+  {"password-from-stdin",
+                    opt_auth_password_from_stdin, 0,
+                    N_("read password from stdin")},
   {"config-dir",    opt_config_dir, 1,
                     N_("read user configuration files from directory ARG")},
   {"config-option", opt_config_options, 1,
@@ -141,20 +145,22 @@ static svn_error_t * svnconflict_resolve
 
 /* Options that apply to all commands. */
 static const int svnconflict_global_options[] =
-{ opt_auth_username, opt_auth_password, opt_config_dir, opt_config_options, 0 };
+{ opt_auth_username, opt_auth_password, opt_auth_password_from_stdin,
+  opt_config_dir, opt_config_options, 0 };
 
-static const svn_opt_subcommand_desc2_t svnconflict_cmd_table[] =
+static const svn_opt_subcommand_desc3_t svnconflict_cmd_table[] =
 {
   /* This command is also invoked if we see option "--help", "-h" or "-?". */
-  { "help", svnconflict_help, {"?", "h"}, N_
-    ("Describe the usage of this program or its subcommands.\n"
-     "usage: help [SUBCOMMAND...]\n"),
+  { "help", svnconflict_help, {"?", "h"}, {N_(
+     "Describe the usage of this program or its subcommands.\n"
+     "usage: help [SUBCOMMAND...]\n"
+    )},
     {0} },
 
-  { "list", svnconflict_list, {"ls"}, N_
-    ("List conflicts at a conflicted path.\n"
+  { "list", svnconflict_list, {"ls"}, {N_(
+     "List conflicts at a conflicted path.\n"
      "usage: list PATH\n"
-     "\n"
+     "\n"), N_(
      "  List conflicts at PATH, one per line. Possible conflicts are:\n"
      "  \n"
      "  text-conflict\n"
@@ -171,67 +177,67 @@ static const svn_opt_subcommand_desc2_t
      "    If a tree conflict exists, no text or property conflicts exist.\n"
      "  \n"
      "  If PATH is not in conflict, the exit code will be 1, and 0 otherwise.\n"
-     ""),
+    )},
     {0}, },
 
-  { "options-text", svnconflict_options_text, {0}, N_
-    ("List options for resolving a text conflict at path.\n"
+  { "options-text", svnconflict_options_text, {0}, {N_(
+     "List options for resolving a text conflict at path.\n"
      "usage: options-text PATH\n"
-     "\n"
+     "\n"), N_(
      "  List text conflict resolution options at PATH, one per line.\n"
      "  Each line contains a numeric option ID, a colon, and a description.\n"
      "  If PATH is not in conflict, the exit code will be 1, and 0 otherwise.\n"
-     ""),
+    )},
     {0}, },
 
-  { "options-prop", svnconflict_options_prop, {0}, N_
-    ("List options for resolving a property conflict at path.\n"
+  { "options-prop", svnconflict_options_prop, {0}, {N_(
+     "List options for resolving a property conflict at path.\n"
      "usage: options-prop PATH\n"
-     "\n"
+     "\n"), N_(
      "  List property conflict resolution options at PATH, one per line.\n"
      "  Each line contains a numeric option ID, a colon, and a description.\n"
      "  If PATH is not in conflict, the exit code will be 1, and 0 otherwise.\n"
-     ""),
+    )},
     {0}, },
 
-  { "options-tree", svnconflict_options_tree, {0}, N_
-    ("List options for resolving a tree conflict at path.\n"
+  { "options-tree", svnconflict_options_tree, {0}, {N_(
+     "List options for resolving a tree conflict at path.\n"
      "usage: options-tree PATH\n"
-     "\n"
+     "\n"), N_(
      "  List tree conflict resolution options at PATH, one per line.\n"
      "  Each line contains a numeric option ID, a colon, and a description.\n"
      "  If PATH is not in conflict, the exit code will be 1, and 0 otherwise.\n"
-     ""),
+    )},
     {0}, },
 
-  { "resolve-text", svnconflict_resolve_text, {0}, N_
-    ("Resolve the text conflict at path.\n"
+  { "resolve-text", svnconflict_resolve_text, {0}, {N_(
+     "Resolve the text conflict at path.\n"
      "usage: resolve-text OPTION_ID PATH\n"
-     "\n"
+     "\n"), N_(
      "  Resolve the text conflict at PATH with a given resolution option.\n"
      "  If PATH is not in conflict, the exit code will be 1, and 0 otherwise.\n"
-     ""),
+    )},
     {0}, },
 
-  { "resolve-prop", svnconflict_resolve_prop, {0}, N_
-    ("Resolve the property conflict at path.\n"
+  { "resolve-prop", svnconflict_resolve_prop, {0}, {N_(
+     "Resolve the property conflict at path.\n"
      "usage: resolve-prop PROPNAME OPTION_ID PATH\n"
-     "\n"
+     "\n"), N_(
      "  Resolve conflicted property PROPNAME at PATH with a given resolution option.\n"
      "  If PATH is not in conflict, the exit code will be 1, and 0 otherwise.\n"
-     ""),
+    )},
     {0}, },
 
-  { "resolve-tree", svnconflict_resolve_tree, {0}, N_
-    ("Resolve the tree conflict at path.\n"
+  { "resolve-tree", svnconflict_resolve_tree, {0}, {N_(
+     "Resolve the tree conflict at path.\n"
      "usage: resolve-tree OPTION_ID PATH\n"
-     "\n"
+     "\n"), N_(
      "  Resolve the tree conflict at PATH with a given resolution option.\n"
      "  If PATH is not in conflict, the exit code will be 1, and 0 otherwise.\n"
-     ""),
+    )},
     {0}, },
 
-  { NULL, NULL, {0}, NULL, {0} }
+  { NULL, NULL, {0}, {NULL}, {0} }
 };
 
 /* Version compatibility check */
@@ -292,7 +298,7 @@ svnconflict_help(apr_getopt_t *os, void
       SVN_ERR(svn_ra_print_modules(version_footer, pool));
     }
 
-  SVN_ERR(svn_opt_print_help4(os,
+  SVN_ERR(svn_opt_print_help5(os,
                               "svnconflict",   /* ### erm, derive somehow? */
                               opt_state ? opt_state->version : FALSE,
                               FALSE, /* quiet */
@@ -363,12 +369,12 @@ svnconflict_list(apr_getopt_t *os, void
                         &conflict, local_abspath, ctx, pool));
 
   if (text_conflicted)
-    svn_cmdline_printf(pool, "text-conflict\n");
+    SVN_ERR(svn_cmdline_printf(pool, "text-conflict\n"));
 
   for (i = 0; i < props_conflicted->nelts; i++)
     {
       const char *propname = APR_ARRAY_IDX(props_conflicted, i, const char *); 
-      svn_cmdline_printf(pool, "prop-conflict: %s\n", propname);
+      SVN_ERR(svn_cmdline_printf(pool, "prop-conflict: %s\n", propname));
     }
 
   if (tree_conflicted)
@@ -380,14 +386,14 @@ svnconflict_list(apr_getopt_t *os, void
                                                        &local_change,
                                                        conflict, ctx,
                                                        pool, pool));
-      svn_cmdline_printf(pool, "tree-conflict: %s %s\n",
-                         incoming_change, local_change);
+      SVN_ERR(svn_cmdline_printf(pool, "tree-conflict: %s %s\n",
+                                 incoming_change, local_change));
     }
 
   return SVN_NO_ERROR;
 }
 
-static void
+static svn_error_t *
 print_conflict_options(apr_array_header_t *options, apr_pool_t *pool)
 {
   int i;
@@ -401,8 +407,9 @@ print_conflict_options(apr_array_header_
       option = APR_ARRAY_IDX(options, i, svn_client_conflict_option_t *);
       id = svn_client_conflict_option_get_id(option);
       label = svn_client_conflict_option_get_label(option, pool);
-      svn_cmdline_printf(pool, "%d: %s\n", id, label);
+      SVN_ERR(svn_cmdline_printf(pool, "%d: %s\n", id, label));
     }
+  return SVN_NO_ERROR;
 }
 
 /* This implements the `svn_opt_subcommand_t' interface. */
@@ -433,7 +440,7 @@ svnconflict_options_text(apr_getopt_t *o
   SVN_ERR(svn_client_conflict_text_get_resolution_options(&options,
                                                           conflict, ctx,
                                                           pool, pool));
-  print_conflict_options(options, pool);
+  SVN_ERR(print_conflict_options(options, pool));
 
   return SVN_NO_ERROR;
 }
@@ -466,7 +473,7 @@ svnconflict_options_prop(apr_getopt_t *o
   SVN_ERR(svn_client_conflict_prop_get_resolution_options(&options,
                                                           conflict, ctx,
                                                           pool, pool));
-  print_conflict_options(options, pool);
+  SVN_ERR(print_conflict_options(options, pool));
 
   return SVN_NO_ERROR;
 }
@@ -500,7 +507,7 @@ svnconflict_options_tree(apr_getopt_t *o
   SVN_ERR(svn_client_conflict_tree_get_resolution_options(&options,
                                                           conflict, ctx,
                                                           pool, pool));
-  print_conflict_options(options, pool);
+  SVN_ERR(print_conflict_options(options, pool));
 
   return SVN_NO_ERROR;
 }
@@ -635,10 +642,11 @@ sub_main(int *exit_code, int argc, const
   apr_array_header_t *received_opts;
   svnconflict_cmd_baton_t command_baton;
   int i;
-  const svn_opt_subcommand_desc2_t *subcommand = NULL;
+  const svn_opt_subcommand_desc3_t *subcommand = NULL;
   svn_auth_baton_t *ab;
   svn_config_t *cfg_config;
   apr_hash_t *cfg_hash;
+  svn_boolean_t read_pass_from_stdin = FALSE;
 
   received_opts = apr_array_make(pool, SVN_OPT_MAX_OPTIONS, sizeof(int));
 
@@ -704,6 +712,9 @@ sub_main(int *exit_code, int argc, const
         SVN_ERR(svn_utf_cstring_to_utf8(&opt_state.auth_password,
                                         opt_arg, pool));
         break;
+      case opt_auth_password_from_stdin:
+        read_pass_from_stdin = TRUE;
+        break;
       case opt_config_dir:
         SVN_ERR(svn_utf_cstring_to_utf8(&utf8_opt_arg, opt_arg, pool));
         opt_state.config_dir = svn_dirent_internal_style(utf8_opt_arg, pool);
@@ -732,7 +743,7 @@ sub_main(int *exit_code, int argc, const
      just typos/mistakes.  Whatever the case, the subcommand to
      actually run is svnconflict_help(). */
   if (opt_state.help)
-    subcommand = svn_opt_get_canonical_subcommand2(svnconflict_cmd_table,
+    subcommand = svn_opt_get_canonical_subcommand3(svnconflict_cmd_table,
                                                    "help");
 
   /* If we're not running the `help' subcommand, then look for a
@@ -744,8 +755,8 @@ sub_main(int *exit_code, int argc, const
           if (opt_state.version)
             {
               /* Use the "help" subcommand to handle the "--version" option. */
-              static const svn_opt_subcommand_desc2_t pseudo_cmd =
-                { "--version", svnconflict_help, {0}, "",
+              static const svn_opt_subcommand_desc3_t pseudo_cmd =
+                { "--version", svnconflict_help, {0}, {""},
                   {opt_version,    /* must accept its own option */
                    opt_config_dir  /* all commands accept this */
                   } };
@@ -768,7 +779,7 @@ sub_main(int *exit_code, int argc, const
 
           SVN_ERR(svn_utf_cstring_to_utf8(&first_arg, os->argv[os->ind++],
                                           pool));
-          subcommand = svn_opt_get_canonical_subcommand2(svnconflict_cmd_table,
+          subcommand = svn_opt_get_canonical_subcommand3(svnconflict_cmd_table,
                                                          first_arg);
           if (subcommand == NULL)
             {
@@ -795,12 +806,12 @@ sub_main(int *exit_code, int argc, const
       if (opt_id == 'h' || opt_id == '?')
         continue;
 
-      if (! svn_opt_subcommand_takes_option3(subcommand, opt_id,
+      if (! svn_opt_subcommand_takes_option4(subcommand, opt_id,
                                              svnconflict_global_options))
         {
           const char *optstr;
           const apr_getopt_option_t *badopt =
-            svn_opt_get_option_from_code2(opt_id, svnconflict_options,
+            svn_opt_get_option_from_code3(opt_id, svnconflict_options,
                                           subcommand, pool);
           svn_opt_format_option(&optstr, badopt, FALSE, pool);
           if (subcommand->name[0] == '-')
@@ -845,6 +856,13 @@ sub_main(int *exit_code, int argc, const
 
   cfg_config = svn_hash_gets(cfg_hash, SVN_CONFIG_CATEGORY_CONFIG);
 
+  /* Get password from stdin if necessary */
+  if (read_pass_from_stdin)
+    {
+      SVN_ERR(svn_cmdline__stdin_readline(&opt_state.auth_password, pool, pool));
+    }
+
+
   /* Create a client context object. */
   command_baton.opt_state = &opt_state;
   SVN_ERR(svn_client_create_context2(&ctx, cfg_hash, pool));

Modified: subversion/branches/mod-dav-svn-expressions/tools/dev/svnmover/svnmover.c
URL: http://svn.apache.org/viewvc/subversion/branches/mod-dav-svn-expressions/tools/dev/svnmover/svnmover.c?rev=1846488&r1=1846487&r2=1846488&view=diff
==============================================================================
--- subversion/branches/mod-dav-svn-expressions/tools/dev/svnmover/svnmover.c (original)
+++ subversion/branches/mod-dav-svn-expressions/tools/dev/svnmover/svnmover.c Tue Nov 13 07:49:04 2018
@@ -2436,7 +2436,7 @@ do_put_file(svn_branch__txn_t *txn,
     else
       SVN_ERR(svn_stream_for_stdin2(&src, FALSE, scratch_pool));
 
-    svn_stringbuf_from_stream(&text, src, 0, scratch_pool);
+    SVN_ERR(svn_stringbuf_from_stream(&text, src, 0, scratch_pool));
   }
   payload = svn_element__payload_create_file(props, text, scratch_pool);
 
@@ -4042,7 +4042,7 @@ display_version(apr_getopt_t *os, svn_bo
   version_footer = svn_stringbuf_create(ra_desc_start, pool);
   SVN_ERR(svn_ra_print_modules(version_footer, pool));
 
-  SVN_ERR(svn_opt_print_help4(NULL, "svnmover", TRUE, _quiet, FALSE,
+  SVN_ERR(svn_opt_print_help5(NULL, "svnmover", TRUE, _quiet, FALSE,
                               version_footer->data,
                               NULL, NULL, NULL, NULL, NULL, pool));
 
@@ -4332,7 +4332,8 @@ sub_main(int *exit_code, int argc, const
     trust_server_cert_opt,
     trust_server_cert_failures_opt,
     ui_opt,
-    colour_opt
+    colour_opt,
+    auth_password_from_stdin_opt
   };
   static const apr_getopt_option_t options[] = {
     {"verbose", 'v', 0, ""},
@@ -4341,6 +4342,7 @@ sub_main(int *exit_code, int argc, const
     {"file", 'F', 1, ""},
     {"username", 'u', 1, ""},
     {"password", 'p', 1, ""},
+    {"password-from-stdin", auth_password_from_stdin_opt, 1, ""},
     {"root-url", 'U', 1, ""},
     {"revision", 'r', 1, ""},
     {"branch-id", 'B', 1, ""},
@@ -4387,6 +4389,7 @@ sub_main(int *exit_code, int argc, const
   const char *log_msg;
   svn_tristate_t coloured_output = svn_tristate_false;
   svnmover_wc_t *wc;
+  svn_boolean_t read_pass_from_stdin = FALSE;
 
   /* Check library versions */
   SVN_ERR(check_lib_versions());
@@ -4431,6 +4434,9 @@ sub_main(int *exit_code, int argc, const
         case 'p':
           password = apr_pstrdup(pool, arg);
           break;
+        case auth_password_from_stdin_opt:
+          read_pass_from_stdin = TRUE;
+          break;
         case 'U':
           SVN_ERR(svn_utf_cstring_to_utf8(&anchor_url, arg, pool));
           if (! svn_path_is_url(anchor_url))
@@ -4553,6 +4559,13 @@ sub_main(int *exit_code, int argc, const
                                   "--non-interactive"));
     }
 
+  /* --password-from-stdin can only be used with --non-interactive */
+  if (read_pass_from_stdin && !non_interactive)
+    {
+      return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                              _("--password-from-stdin requires "
+                                "--non-interactive"));
+    }
 
   /* Now initialize the client context */
 
@@ -4580,6 +4593,12 @@ sub_main(int *exit_code, int argc, const
                                             "svnmover: ", "--config-option"));
     }
 
+  /* Get password from stdin if necessary */
+  if (read_pass_from_stdin)
+    {
+      SVN_ERR(svn_cmdline__stdin_readline(&password, pool, pool));
+    }
+
   SVN_ERR(svn_client_create_context2(&ctx, cfg_hash, pool));
 
   cfg_config = svn_hash_gets(cfg_hash, SVN_CONFIG_CATEGORY_CONFIG);