subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From v...@apache.org
Subject svn commit: r1352418 [5/6] - in /subversion/branches/javahl-ra: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ build/win32/ contrib/server-side/ notes/wc-ng/ subversion/bindings/javahl/src/org/apache/subversion/javahl/ subversio...
Date Thu, 21 Jun 2012 05:54:47 GMT
Modified: subversion/branches/javahl-ra/subversion/libsvn_subr/skel.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_subr/skel.c?rev=1352418&r1=1352417&r2=1352418&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_subr/skel.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_subr/skel.c Thu Jun 21 05:54:42 2012
@@ -136,41 +136,6 @@ getsize(const char *data, apr_size_t len
     }
 }
 
-/* Store the ASCII decimal representation of VALUE at DATA.  Return
-   the length of the representation if all goes well; return zero if
-   the result doesn't fit in LEN bytes.  */
-static apr_size_t
-putsize(char *data, apr_size_t len, apr_size_t value)
-{
-  apr_size_t i = 0;
-
-  /* Generate the digits, least-significant first.  */
-  do
-    {
-      if (i >= len)
-        return 0;
-
-      data[i] = (value % 10) + '0';
-      value /= 10;
-      i++;
-    }
-  while (value > 0);
-
-  /* Put the digits in most-significant-first order.  */
-  {
-    apr_size_t left, right;
-
-    for (left = 0, right = i-1; left < right; left++, right--)
-      {
-        char t = data[left];
-        data[left] = data[right];
-        data[right] = t;
-      }
-  }
-
-  return i;
-}
-
 
 /* Checking validity of skels. */
 static svn_error_t *
@@ -434,7 +399,7 @@ estimate_unparsed_size(const svn_skel_t 
     }
   else
     {
-      int total_len;
+      apr_size_t total_len;
       svn_skel_t *child;
 
       /* Allow space for opening and closing parens, and a space
@@ -491,17 +456,18 @@ unparse(const svn_skel_t *skel, svn_stri
         svn_stringbuf_appendbytes(str, skel->data, skel->len);
       else
         {
-          /* Append the length to STR.  */
-          char buf[200];
+          /* Append the length to STR.  Ensure enough space for at least
+           * one 64 bit int. */
+          char buf[200 + SVN_INT64_BUFFER_SIZE];
           apr_size_t length_len;
 
-          length_len = putsize(buf, sizeof(buf), skel->len);
+          length_len = svn__ui64toa(buf, skel->len);
 
           SVN_ERR_ASSERT_NO_RETURN(length_len > 0);
 
           /* Make sure we have room for the length, the space, and the
              atom's contents.  */
-          svn_stringbuf_ensure(str, str->len + length_len + 1 + skel->len + 1);
+          svn_stringbuf_ensure(str, str->len + length_len + 1 + skel->len);
           svn_stringbuf_appendbytes(str, buf, length_len);
           svn_stringbuf_appendbyte(str, ' ');
           svn_stringbuf_appendbytes(str, skel->data, skel->len);

Modified: subversion/branches/javahl-ra/subversion/libsvn_subr/spillbuf.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_subr/spillbuf.c?rev=1352418&r1=1352417&r2=1352418&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_subr/spillbuf.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_subr/spillbuf.c Thu Jun 21 05:54:42 2012
@@ -291,7 +291,7 @@ read_data(struct memblock_t **mem,
   /* NOTE: mem's size/next are uninitialized.  */
 
   if (buf->spill_size < buf->blocksize)
-    (*mem)->size = buf->spill_size;
+    (*mem)->size = (apr_size_t)buf->spill_size;
   else
     (*mem)->size = buf->blocksize;  /* The size of (*mem)->data  */
   (*mem)->next = NULL;

Modified: subversion/branches/javahl-ra/subversion/libsvn_subr/sqlite.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_subr/sqlite.c?rev=1352418&r1=1352417&r2=1352418&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_subr/sqlite.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_subr/sqlite.c Thu Jun 21 05:54:42 2012
@@ -50,8 +50,8 @@
   #include <sqlite3.h>
 #endif
 
-#if !SQLITE_VERSION_AT_LEAST(3,6,18)
-#error SQLite is too old -- version 3.6.18 is the minimum required version
+#if !SQLITE_VERSION_AT_LEAST(3,7,12)
+#error SQLite is too old -- version 3.7.12 is the minimum required version
 #endif
 
 INTERNAL_STATEMENTS_SQL_DECLARE_STATEMENTS(internal_statements);
@@ -685,16 +685,14 @@ internal_open(sqlite3 **db3, const char 
     else
       SVN_ERR_MALFUNCTION();
 
-    /* If this flag is defined (3.6.x), then let's turn off SQLite's mutexes.
-       All svn objects are single-threaded, so we can already guarantee that
-       our use of the SQLite handle will be serialized properly.
+    /* Turn off SQLite's mutexes. All svn objects are single-threaded,
+       so we can already guarantee that our use of the SQLite handle
+       will be serialized properly.
 
        Note: in 3.6.x, we've already config'd SQLite into MULTITHREAD mode,
        so this is probably redundant, but if we are running in a process where
        somebody initialized SQLite before us it is needed anyway.  */
-#ifdef SQLITE_OPEN_NOMUTEX
     flags |= SQLITE_OPEN_NOMUTEX;
-#endif
 
     /* Open the database. Note that a handle is returned, even when an error
        occurs (except for out-of-memory); thus, we can safely use it to
@@ -813,23 +811,9 @@ svn_sqlite__open(svn_sqlite__db_t **db, 
   sqlite3_profile((*db)->db3, sqlite_profiler, (*db)->db3);
 #endif
 
-  /* Work around a bug in SQLite 3.7.7.  The bug was fixed in SQLite 3.7.7.1.
-
-     See:
-
-       Date: Sun, 26 Jun 2011 18:52:14 -0400
-       From: Richard Hipp <drh@sqlite.org>
-       To: General Discussion of SQLite Database <sqlite-users@sqlite.org>
-       Cc: dev@subversion.apache.org
-       Subject: Re: [sqlite] PRAGMA bug in 3.7.7 (but fine in 3.7.6.3)
-       Message-ID: <BANLkTimDypWGY-8tHFgJsTxN6ty6OkdJ0Q@mail.gmail.com>
-   */
+  /* ### simplify this. remnants of some old SQLite compat code.  */
   {
     int ignored_err = SQLITE_OK;
-#if !SQLITE_VERSION_AT_LEAST(3,7,8) && defined(SQLITE_SCHEMA)
-    if (!strcmp(sqlite3_libversion(), "3.7.7"))
-      ignored_err = SQLITE_SCHEMA;
-#endif
 
     SVN_ERR(exec_sql2(*db, "PRAGMA case_sensitive_like=1;", ignored_err));
   }
@@ -853,7 +837,7 @@ svn_sqlite__open(svn_sqlite__db_t **db, 
                  Requires SQLite >= 3.6.18  */
               "PRAGMA recursive_triggers=ON;"));
 
-#if SQLITE_VERSION_AT_LEAST(3,6,19) && defined(SVN_DEBUG)
+#if defined(SVN_DEBUG)
   /* When running in debug mode, enable the checking of foreign key
      constraints.  This has possible performance implications, so we don't
      bother to do it for production...for now. */
@@ -1132,13 +1116,15 @@ wrapped_func(sqlite3_context *context,
              sqlite3_value *values[])
 {
   struct function_wrapper_baton_t *fwb = sqlite3_user_data(context);
-  svn_sqlite__context_t sctx = { context };
+  svn_sqlite__context_t sctx;
   svn_sqlite__value_t **local_vals =
                             apr_palloc(fwb->scratch_pool,
                                        sizeof(svn_sqlite__value_t *) * argc);
   svn_error_t *err;
   int i;
 
+  sctx.context = context;
+
   for (i = 0; i < argc; i++)
     {
       local_vals[i] = apr_palloc(fwb->scratch_pool, sizeof(*local_vals[i]));

Modified: subversion/branches/javahl-ra/subversion/libsvn_subr/stream.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_subr/stream.c?rev=1352418&r1=1352417&r2=1352418&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_subr/stream.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_subr/stream.c Thu Jun 21 05:54:42 2012
@@ -380,7 +380,7 @@ stream_readline_chunky(svn_stringbuf_t *
       {
         /* Append the next chunk to the string read so far.
          */
-        svn_stringbuf_ensure(str, str->len + LINE_CHUNK_SIZE + 1);
+        svn_stringbuf_ensure(str, str->len + LINE_CHUNK_SIZE);
         numbytes = LINE_CHUNK_SIZE;
         SVN_ERR(svn_stream_read(stream, str->data + str->len, &numbytes));
         str->len += numbytes;

Modified: subversion/branches/javahl-ra/subversion/libsvn_subr/string.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_subr/string.c?rev=1352418&r1=1352417&r2=1352418&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_subr/string.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_subr/string.c Thu Jun 21 05:54:42 2012
@@ -1,6 +1,6 @@
 /*
- * svn_string.c:  routines to manipulate counted-length strings
- *                (svn_stringbuf_t and svn_string_t) and C strings.
+ * string.c:  routines to manipulate counted-length strings
+ *            (svn_stringbuf_t and svn_string_t) and C strings.
  *
  *
  * ====================================================================
@@ -407,7 +407,7 @@ svn_stringbuf_set(svn_stringbuf_t *str, 
 {
   apr_size_t amt = strlen(value);
 
-  svn_stringbuf_ensure(str, amt + 1);
+  svn_stringbuf_ensure(str, amt);
   memcpy(str->data, value, amt + 1);
   str->len = amt;
 }
@@ -549,8 +549,8 @@ svn_stringbuf_appendbytes(svn_stringbuf_
 
   total_len = str->len + count;  /* total size needed */
 
-  /* +1 for null terminator. */
-  svn_stringbuf_ensure(str, (total_len + 1));
+  /* svn_stringbuf_ensure adds 1 for null terminator. */
+  svn_stringbuf_ensure(str, total_len);
 
   /* get address 1 byte beyond end of original bytestring */
   start_address = (str->data + str->len);
@@ -976,7 +976,7 @@ svn__ui64toa(char * dest, apr_uint64_t n
       /* Number is larger than 100^4, i.e. we can write 4x2 chars.
        * Also, use 32 bit DIVs as these are about twice as fast.
        */
-      reduced = number % 100000000;
+      reduced = (apr_uint32_t)(number % 100000000);
       number /= 100000000;
 
       COPY_TWO_BYTES(target - 0, decimal_table[reduced % 100]);

Modified: subversion/branches/javahl-ra/subversion/libsvn_subr/temp_serializer.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_subr/temp_serializer.c?rev=1352418&r1=1352417&r2=1352418&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_subr/temp_serializer.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_subr/temp_serializer.c Thu Jun 21 05:54:42 2012
@@ -72,7 +72,7 @@ struct svn_temp_serializer__context_t
   source_stack_t *source;
 };
 
-/* Mmake sure the serialized data len is a multiple of the default alignment,
+/* Make sure the serialized data len is a multiple of the default alignment,
  * i.e. structures may be appended without violating member alignment
  * guarantees.
  */
@@ -83,7 +83,7 @@ align_buffer_end(svn_temp_serializer__co
   apr_size_t aligned_len = APR_ALIGN_DEFAULT(current_len);
   if (aligned_len != current_len)
     {
-      svn_stringbuf_ensure(context->buffer, aligned_len+1);
+      svn_stringbuf_ensure(context->buffer, aligned_len);
       context->buffer->len = aligned_len;
     }
 }

Modified: subversion/branches/javahl-ra/subversion/libsvn_subr/win32_crypto.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_subr/win32_crypto.c?rev=1352418&r1=1352417&r2=1352418&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_subr/win32_crypto.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_subr/win32_crypto.c Thu Jun 21 05:54:42 2012
@@ -64,7 +64,8 @@ encrypt_data(const svn_string_t *orig,
   if (CryptProtectData(&blobin, description, NULL, NULL, NULL,
                        CRYPTPROTECT_UI_FORBIDDEN, &blobout))
     {
-      crypted = svn_string_ncreate(blobout.pbData, blobout.cbData, pool);
+      crypted = svn_string_ncreate((const char *)blobout.pbData,
+                                   blobout.cbData, pool);
       LocalFree(blobout.pbData);
     }
   return crypted;
@@ -87,7 +88,8 @@ decrypt_data(const svn_string_t *crypted
                          CRYPTPROTECT_UI_FORBIDDEN, &blobout))
     {
       if (0 == lstrcmpW(descr, description))
-        orig = svn_string_ncreate(blobout.pbData, blobout.cbData, pool);
+        orig = svn_string_ncreate((const char *)blobout.pbData,
+                                  blobout.cbData, pool);
       LocalFree(blobout.pbData);
       LocalFree(descr);
     }

Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/adm_ops.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/adm_ops.c?rev=1352418&r1=1352417&r2=1352418&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/adm_ops.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/adm_ops.c Thu Jun 21 05:54:42 2012
@@ -2696,8 +2696,12 @@ svn_wc_get_changelists(svn_wc_context_t 
                        void *cancel_baton,
                        apr_pool_t *scratch_pool)
 {
-  struct get_cl_fn_baton gnb = { wc_ctx->db, NULL,
-                                 callback_func, callback_baton };
+  struct get_cl_fn_baton gnb;
+
+  gnb.db = wc_ctx->db;
+  gnb.clhash = NULL;
+  gnb.callback_func = callback_func;
+  gnb.callback_baton = callback_baton;
 
   if (changelist_filter)
     SVN_ERR(svn_hash_from_cstring_keys(&gnb.clhash, changelist_filter,

Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/conflicts.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/conflicts.c?rev=1352418&r1=1352417&r2=1352418&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/conflicts.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/conflicts.c Thu Jun 21 05:54:42 2012
@@ -587,6 +587,13 @@ svn_wc__resolve_conflicts(svn_wc_context
   cswb.notify_func = notify_func;
   cswb.notify_baton = notify_baton;
 
+  if (notify_func)
+    notify_func(notify_baton,
+                svn_wc_create_notify(local_abspath,
+                                    svn_wc_notify_conflict_resolver_starting,
+                                    scratch_pool),
+                scratch_pool);
+
   SVN_ERR(svn_wc_walk_status(wc_ctx,
                              local_abspath,
                              depth,
@@ -598,6 +605,13 @@ svn_wc__resolve_conflicts(svn_wc_context
                              cancel_func, cancel_baton,
                              scratch_pool));
 
+  if (notify_func)
+    notify_func(notify_baton,
+                svn_wc_create_notify(local_abspath,
+                                    svn_wc_notify_conflict_resolver_done,
+                                    scratch_pool),
+                scratch_pool);
+
   return SVN_NO_ERROR;
 }
 

Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/copy.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/copy.c?rev=1352418&r1=1352417&r2=1352418&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/copy.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/copy.c Thu Jun 21 05:54:42 2012
@@ -466,7 +466,6 @@ copy_versioned_dir(svn_wc__db_t *db,
      any conflict-marker files. */
   if (disk_children && apr_hash_count(disk_children))
     {
-      apr_hash_index_t *hi;
       apr_hash_t *marker_files;
 
       SVN_ERR(svn_wc__db_get_conflict_marker_files(&marker_files, db,
@@ -551,7 +550,6 @@ copy_or_move(svn_wc_context_t *wc_ctx,
     svn_wc__db_status_t src_status, dstdir_status;
     const char *src_repos_root_url, *dst_repos_root_url;
     const char *src_repos_uuid, *dst_repos_uuid;
-    svn_error_t *err;
 
     err = svn_wc__db_read_info(&src_status, &src_db_kind, NULL, NULL,
                                &src_repos_root_url, &src_repos_uuid, NULL,
@@ -664,7 +662,6 @@ copy_or_move(svn_wc_context_t *wc_ctx,
      disk, before actually doing the file copy. */
   {
     svn_wc__db_status_t dst_status;
-    svn_error_t *err;
 
     err = svn_wc__db_read_info(&dst_status, NULL, NULL, NULL, NULL, NULL,
                                NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,

Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/merge.c?rev=1352418&r1=1352417&r2=1352418&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/merge.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/merge.c Thu Jun 21 05:54:42 2012
@@ -929,6 +929,8 @@ maybe_resolve_conflicts(svn_skel_t **wor
  * The merge is trivial if the file at LEFT_ABSPATH equals the detranslated
  * form of the target at DETRANSLATED_TARGET_ABSPATH, because in this case
  * the content of RIGHT_ABSPATH can be copied to the target.
+ * Another trivial case is if DETRANSLATED_TARGET_ABSPATH is identical to 
+ * RIGHT_ABSPATH - we can just accept the existing content as merge result.
  * On success, set *MERGE_OUTCOME to SVN_WC_MERGE_MERGED in case the
  * target was changed, or to SVN_WC_MERGE_UNCHANGED if the target was not
  * changed. Install work queue items allocated in RESULT_POOL in *WORK_ITEMS.
@@ -992,6 +994,23 @@ merge_file_trivial(svn_skel_t **work_ite
 
       return SVN_NO_ERROR;
     }
+  else
+    {
+      /* Check whether the existing version equals the right side. If it 
+       * does, the locally existing, changed file equals the incoming
+       * file, so there is no conflict. For binary files, we historically
+       * conflicted them needlessly, while merge_text_file figured it out 
+       * eventually and returned svn_wc_merge_unchanged for them, which
+       * is what we do here. */
+      SVN_ERR(svn_io_files_contents_same_p(&same_contents,
+                                           detranslated_target_abspath,
+                                           right_abspath, scratch_pool));
+      if (same_contents)
+        {
+          *merge_outcome = svn_wc_merge_unchanged;
+          return SVN_NO_ERROR;
+        }
+    }
 
   *merge_outcome = svn_wc_merge_no_merge;
   return SVN_NO_ERROR;
@@ -1536,7 +1555,7 @@ svn_wc_merge5(enum svn_wc_merge_outcome_
       {
         *merge_content_outcome = svn_wc_merge_no_merge;
         if (merge_props_outcome)
-          *merge_props_outcome = svn_wc_merge_no_merge;
+          *merge_props_outcome = svn_wc_notify_state_unchanged;
         return SVN_NO_ERROR;
       }
 

Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/old-and-busted.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/old-and-busted.c?rev=1352418&r1=1352417&r2=1352418&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/old-and-busted.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/old-and-busted.c Thu Jun 21 05:54:42 2012
@@ -382,7 +382,7 @@ opt_revision_to_string(const char **str,
       *str = apr_pstrmemdup(pool, "HEAD", 4);
       break;
     case svn_opt_revision_number:
-      *str = apr_itoa(pool, rev->value.number);
+      *str = apr_ltoa(pool, rev->value.number);
       break;
     default:
       return svn_error_createf

Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/props.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/props.c?rev=1352418&r1=1352417&r2=1352418&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/props.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/props.c Thu Jun 21 05:54:42 2012
@@ -1852,8 +1852,11 @@ svn_wc__prop_list_recursive(svn_wc_conte
 {
   svn_wc__proplist_receiver_t receiver = receiver_func;
   void *baton = receiver_baton;
-  struct propname_filter_baton_t pfb = { receiver_func, receiver_baton,
-                                         propname };
+  struct propname_filter_baton_t pfb;
+
+  pfb.receiver_func = receiver_func;
+  pfb.receiver_baton = receiver_baton;
+  pfb.propname = propname;
 
   SVN_ERR_ASSERT(receiver_func);
 
@@ -2489,8 +2492,14 @@ svn_wc_prop_set4(svn_wc_context_t *wc_ct
     }
   else
     {
-      struct propset_walk_baton wb = { name, value, wc_ctx->db, skip_checks,
-                                       notify_func, notify_baton };
+      struct propset_walk_baton wb;
+
+      wb.propname = name;
+      wb.propval = value;
+      wb.db = wc_ctx->db;
+      wb.force = skip_checks;
+      wb.notify_func = notify_func;
+      wb.notify_baton = notify_baton;
 
       SVN_ERR(svn_wc__internal_walk_children(wc_ctx->db, local_abspath,
                                              FALSE, changelist_filter,

Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/upgrade.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/upgrade.c?rev=1352418&r1=1352417&r2=1352418&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/upgrade.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/upgrade.c Thu Jun 21 05:54:42 2012
@@ -1545,7 +1545,9 @@ svn_wc__upgrade_sdb(int *result_format,
                     int start_format,
                     apr_pool_t *scratch_pool)
 {
-  struct bump_baton bb = { wcroot_abspath };
+  struct bump_baton bb;
+
+  bb.wcroot_abspath = wcroot_abspath;
 
   if (start_format < SVN_WC__WC_NG_VERSION /* 12 */)
     return svn_error_createf(SVN_ERR_WC_UPGRADE_REQUIRED, NULL,

Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/wc_db.c?rev=1352418&r1=1352417&r2=1352418&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/wc_db.c Thu Jun 21 05:54:42 2012
@@ -5141,8 +5141,11 @@ svn_wc__db_op_set_changelist(svn_wc__db_
 {
   svn_wc__db_wcroot_t *wcroot;
   const char *local_relpath;
-  struct set_changelist_baton_t scb = { new_changelist, changelist_filter,
-                                        depth };
+  struct set_changelist_baton_t scb;
+
+  scb.new_changelist = new_changelist;
+  scb.changelist_filter = changelist_filter;
+  scb.depth = depth;
 
   SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
 
@@ -5780,9 +5783,16 @@ svn_wc__db_revert_list_read(svn_boolean_
 {
   svn_wc__db_wcroot_t *wcroot;
   const char *local_relpath;
-  struct revert_list_read_baton b = {reverted, conflict_old, conflict_new,
-                                     conflict_working, prop_reject,
-                                     copied_here, kind, result_pool};
+  struct revert_list_read_baton b;
+
+  b.reverted = reverted;
+  b.conflict_old = conflict_old;
+  b.conflict_new = conflict_new;
+  b.conflict_working = conflict_working;
+  b.prop_reject = prop_reject;
+  b.copied_here = copied_here;
+  b.kind = kind;
+  b.result_pool = result_pool;
 
   SVN_ERR(svn_wc__db_wcroot_parse_local_abspath(&wcroot, &local_relpath,
                               db, local_abspath, scratch_pool, scratch_pool));
@@ -5853,7 +5863,10 @@ svn_wc__db_revert_list_read_copied_child
 {
   svn_wc__db_wcroot_t *wcroot;
   const char *local_relpath;
-  struct revert_list_read_copied_children_baton b = {children, result_pool};
+  struct revert_list_read_copied_children_baton b;
+
+  b.children = children;
+  b.result_pool = result_pool;
 
   SVN_ERR(svn_wc__db_wcroot_parse_local_abspath(&wcroot, &local_relpath,
                               db, local_abspath, scratch_pool, scratch_pool));
@@ -8131,7 +8144,10 @@ read_url(const char **url,
          apr_pool_t *result_pool,
          apr_pool_t *scratch_pool)
 {
-  struct read_url_baton_t rub = { url, result_pool };
+  struct read_url_baton_t rub;
+
+  rub.url = url;
+  rub.result_pool = result_pool;
   SVN_ERR(svn_wc__db_with_txn(wcroot, local_relpath, read_url_txn, &rub,
                               scratch_pool));
 
@@ -10076,7 +10092,7 @@ scan_addition_txn(void *baton,
 
 
     /* ### This loop here is to skip up to the first node which is a BASE node,
-       because base_get_info() doesn't accomodate the scenario that
+       because base_get_info() doesn't accommodate the scenario that
        we're looking at here; we found the true op_root, which may be inside
        further changed trees. */
     while (TRUE)
@@ -13317,9 +13333,18 @@ svn_wc__db_revision_status(svn_revnum_t 
 {
   svn_wc__db_wcroot_t *wcroot;
   const char *local_relpath;
-  struct revision_status_baton_t rsb = { min_revision, max_revision,
-        is_sparse_checkout, is_modified, is_switched, trail_url, committed,
-        cancel_func, cancel_baton, db };
+  struct revision_status_baton_t rsb;
+
+  rsb.min_revision = min_revision;
+  rsb.max_revision = max_revision;
+  rsb.is_sparse_checkout = is_sparse_checkout;
+  rsb.is_modified = is_modified;
+  rsb.is_switched = is_switched;
+  rsb.trail_url = trail_url;
+  rsb.committed = committed;
+  rsb.cancel_func = cancel_func;
+  rsb.cancel_baton = cancel_baton;
+  rsb.db = db;
 
   SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
 

Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/wc_db_util.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/wc_db_util.c?rev=1352418&r1=1352417&r2=1352418&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/wc_db_util.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/wc_db_util.c Thu Jun 21 05:54:42 2012
@@ -196,7 +196,12 @@ svn_wc__db_with_txn(svn_wc__db_wcroot_t 
                     void *cb_baton,
                     apr_pool_t *scratch_pool)
 {
-  struct txn_baton_t tb = { wcroot, local_relpath, cb_func, cb_baton };
+  struct txn_baton_t tb;
+
+  tb.wcroot = wcroot;
+  tb.local_relpath = local_relpath;
+  tb.cb_func = cb_func;
+  tb.cb_baton = cb_baton;
 
   return svn_error_trace(
     svn_sqlite__with_lock(wcroot->sdb, run_txn, &tb, scratch_pool));

Modified: subversion/branches/javahl-ra/subversion/mod_authz_svn/mod_authz_svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/mod_authz_svn/mod_authz_svn.c?rev=1352418&r1=1352417&r2=1352418&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/mod_authz_svn/mod_authz_svn.c (original)
+++ subversion/branches/javahl-ra/subversion/mod_authz_svn/mod_authz_svn.c Thu Jun 21 05:54:42 2012
@@ -235,7 +235,7 @@ convert_case(char *text, svn_boolean_t t
   char *c = text;
   while (*c)
     {
-      *c = (to_uppercase ? apr_toupper(*c) : apr_tolower(*c));
+      *c = (char)(to_uppercase ? apr_toupper(*c) : apr_tolower(*c));
       ++c;
     }
 }

Modified: subversion/branches/javahl-ra/subversion/mod_dav_svn/liveprops.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/mod_dav_svn/liveprops.c?rev=1352418&r1=1352417&r2=1352418&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/mod_dav_svn/liveprops.c (original)
+++ subversion/branches/javahl-ra/subversion/mod_dav_svn/liveprops.c Thu Jun 21 05:54:42 2012
@@ -75,7 +75,8 @@ enum {
   SVN_PROPID_baseline_relative_path = 1,
   SVN_PROPID_md5_checksum,
   SVN_PROPID_repository_uuid,
-  SVN_PROPID_deadprop_count
+  SVN_PROPID_deadprop_count,
+  SVN_PROPID_sha1_checksum
 };
 
 
@@ -106,6 +107,7 @@ static const dav_liveprop_spec props[] =
   SVN_RO_SVN_PROP(md5_checksum, md5-checksum),
   SVN_RO_SVN_PROP(repository_uuid, repository-uuid),
   SVN_RO_SVN_PROP(deadprop_count, deadprop-count),
+  SVN_RO_SVN_PROP(sha1_checksum, sha1-checksum),
 
   { 0 } /* sentinel */
 };
@@ -668,6 +670,7 @@ insert_prop_internal(const dav_resource 
       break;
 
     case SVN_PROPID_md5_checksum:
+    case SVN_PROPID_sha1_checksum:
       if ((! resource->collection)
           && (! resource->baselined)
           && (resource->type == DAV_RESOURCE_TYPE_REGULAR
@@ -676,11 +679,21 @@ insert_prop_internal(const dav_resource 
         {
           svn_node_kind_t kind;
           svn_checksum_t *checksum;
+          svn_checksum_kind_t checksum_kind;
+
+          if (propid == SVN_PROPID_md5_checksum)
+            {
+              checksum_kind = svn_checksum_md5;
+            }
+          else
+            {
+              checksum_kind = svn_checksum_sha1;
+            }
 
           serr = svn_fs_check_path(&kind, resource->info->root.root,
                                    resource->info->repos_path, scratch_pool);
           if (!serr && kind == svn_node_file)
-            serr = svn_fs_file_checksum(&checksum, svn_checksum_md5,
+            serr = svn_fs_file_checksum(&checksum, checksum_kind,
                                         resource->info->root.root,
                                         resource->info->repos_path, TRUE,
                                         scratch_pool);
@@ -688,8 +701,11 @@ insert_prop_internal(const dav_resource 
             {
               ap_log_rerror(APLOG_MARK, APLOG_ERR, serr->apr_err,
                             resource->info->r,
-                            "Can't fetch or compute MD5 checksum of '%s': "
+                            "Can't fetch or compute %s checksum of '%s': "
                             "%s",
+                            checksum_kind == svn_checksum_md5
+                              ? "MD5"
+                              : "SHA1",
                             resource->info->repos_path,
                             serr->message);
               svn_error_clear(serr);

Modified: subversion/branches/javahl-ra/subversion/mod_dav_svn/mirror.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/mod_dav_svn/mirror.c?rev=1352418&r1=1352417&r2=1352418&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/mod_dav_svn/mirror.c (original)
+++ subversion/branches/javahl-ra/subversion/mod_dav_svn/mirror.c Thu Jun 21 05:54:42 2012
@@ -54,6 +54,16 @@ static void proxy_request_fixup(request_
                                                            (char *)NULL),
                                                r->pool);
     r->handler = "proxy-server";
+
+    /* ### FIXME: Seems we could avoid adding some or all of these
+           filters altogether when the root_dir (that is, the slave's
+           location, relative to the server root) and path portion of
+           the master_uri (the master's location, relative to the
+           server root) are identical, rather than adding them here
+           and then trying to remove them later.  (See the filter
+           removal logic in dav_svn__location_in_filter() and
+           dav_svn__location_body_filter().  -- cmpilato */
+
     ap_add_output_filter("LocationRewrite", NULL, r, r->connection);
     ap_add_output_filter("ReposRewrite", NULL, r, r->connection);
     ap_add_input_filter("IncomingRewrite", NULL, r, r->connection);

Modified: subversion/branches/javahl-ra/subversion/mod_dav_svn/reports/update.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/mod_dav_svn/reports/update.c?rev=1352418&r1=1352417&r2=1352418&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/mod_dav_svn/reports/update.c (original)
+++ subversion/branches/javahl-ra/subversion/mod_dav_svn/reports/update.c Thu Jun 21 05:54:42 2012
@@ -582,10 +582,10 @@ upd_add_directory(const char *path,
 
 static svn_error_t *
 upd_open_directory(const char *path,
-                                        void *parent_baton,
-                                        svn_revnum_t base_revision,
-                                        apr_pool_t *pool,
-                                        void **child_baton)
+                   void *parent_baton,
+                   svn_revnum_t base_revision,
+                   apr_pool_t *pool,
+                   void **child_baton)
 {
   return open_helper(TRUE /* is_dir */,
                      path, parent_baton, base_revision, pool, child_baton);

Modified: subversion/branches/javahl-ra/subversion/mod_dav_svn/repos.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/mod_dav_svn/repos.c?rev=1352418&r1=1352417&r2=1352418&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/mod_dav_svn/repos.c (original)
+++ subversion/branches/javahl-ra/subversion/mod_dav_svn/repos.c Thu Jun 21 05:54:42 2012
@@ -1573,7 +1573,7 @@ static const char *get_entry(apr_pool_t 
 
         for (cp = parm; (*cp && !svn_ctype_isspace(*cp) && *cp != '='); ++cp)
           {
-            *cp = apr_tolower(*cp);
+            *cp = (char)apr_tolower(*cp);
           }
 
         if (!*cp)
@@ -3043,14 +3043,12 @@ set_headers(request_rec *r, const dav_re
   apr_table_setn(r->headers_out, "ETag",
                  dav_svn__getetag(resource, resource->pool));
 
-#if 0
   /* As version resources don't change, encourage caching. */
-  /* ### FIXME: This conditional is wrong -- type is often REGULAR,
-     ### and the resource doesn't seem to be baselined. */
-  if (resource->type == DAV_RESOURCE_TYPE_VERSION)
+  if ((resource->type == DAV_RESOURCE_TYPE_REGULAR
+       && resource->versioned && !resource->collection)
+      || resource->type == DAV_RESOURCE_TYPE_VERSION)
     /* Cache resource for one week (specified in seconds). */
     apr_table_setn(r->headers_out, "Cache-Control", "max-age=604800");
-#endif
 
   /* we accept byte-ranges */
   apr_table_setn(r->headers_out, "Accept-Ranges", "bytes");

Modified: subversion/branches/javahl-ra/subversion/svn/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/svn/main.c?rev=1352418&r1=1352417&r2=1352418&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/svn/main.c (original)
+++ subversion/branches/javahl-ra/subversion/svn/main.c Thu Jun 21 05:54:42 2012
@@ -1391,20 +1391,20 @@ const svn_opt_subcommand_desc2_t svn_cl_
      "\n"
      "  Example output:\n"
      "    svn status wc\n"
-     "     M     wc/bar.c\n"
-     "    A  +   wc/qax.c\n"
+     "     M      wc/bar.c\n"
+     "    A  +    wc/qax.c\n"
      "\n"
      "    svn status -u wc\n"
-     "     M           965    wc/bar.c\n"
-     "           *     965    wc/foo.c\n"
-     "    A  +           -    wc/qax.c\n"
+     "     M             965   wc/bar.c\n"
+     "            *      965   wc/foo.c\n"
+     "    A  +             -   wc/qax.c\n"
      "    Status against revision:   981\n"
      "\n"
      "    svn status --show-updates --verbose wc\n"
-     "     M           965       938 kfogel       wc/bar.c\n"
-     "           *     965       922 sussman      wc/foo.c\n"
-     "    A  +           -       687 joe          wc/qax.c\n"
-     "                 965       687 joe          wc/zig.c\n"
+     "     M             965      938 kfogel       wc/bar.c\n"
+     "            *      965      922 sussman      wc/foo.c\n"
+     "    A  +             -      687 joe          wc/qax.c\n"
+     "                   965      687 joe          wc/zig.c\n"
      "    Status against revision:   981\n"
      "\n"
      "    svn status\n"

Modified: subversion/branches/javahl-ra/subversion/svn/merge-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/svn/merge-cmd.c?rev=1352418&r1=1352417&r2=1352418&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/svn/merge-cmd.c (original)
+++ subversion/branches/javahl-ra/subversion/svn/merge-cmd.c Thu Jun 21 05:54:42 2012
@@ -61,8 +61,14 @@ merge_reintegrate(const char *source_pat
 
   if (url1)
     {
-      svn_opt_revision_t revision1 = { svn_opt_revision_number, { rev1 } };
-      svn_opt_revision_t revision2 = { svn_opt_revision_number, { rev2 } };
+      svn_opt_revision_t revision1;
+      svn_opt_revision_t revision2;
+
+      revision1.kind = svn_opt_revision_number;
+      revision1.value.number = rev1;
+
+      revision2.kind = svn_opt_revision_number;
+      revision2.value.number = rev2;
 
       /* Do the merge.  Set 'allow_mixed_rev' to true, not because we want
        * to allow a mixed-rev WC but simply to bypass the check, as it was
@@ -393,6 +399,10 @@ svn_cl__merge(apr_getopt_t *os,
       if (two_sources_specified)
         return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
                                 _("SOURCE2 can't be used with --symmetric"));
+      if (first_range_start.kind != svn_opt_revision_unspecified
+          || first_range_end.kind != svn_opt_revision_unspecified)
+        return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                                _("a revision range can't be used with --symmetric"));
 
       SVN_ERR_W(svn_cl__check_related_source_and_target(
                   sourcepath1, &peg_revision1, targetpath, &unspecified,

Modified: subversion/branches/javahl-ra/subversion/svn/notify.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/svn/notify.c?rev=1352418&r1=1352417&r2=1352418&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/svn/notify.c (original)
+++ subversion/branches/javahl-ra/subversion/svn/notify.c Thu Jun 21 05:54:42 2012
@@ -982,6 +982,14 @@ notify(void *baton, const svn_wc_notify_
         goto print_error;
       break;
 
+    case svn_wc_notify_conflict_resolver_starting:
+      /* Once all operations invoke the interactive conflict resolution after
+       * they've completed, we can run svn_cl__print_conflict_stats() here. */
+      break;
+
+    case svn_wc_notify_conflict_resolver_done:
+      break;
+
     default:
       break;
     }

Modified: subversion/branches/javahl-ra/subversion/svndumpfilter/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/svndumpfilter/main.c?rev=1352418&r1=1352417&r2=1352418&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/svndumpfilter/main.c (original)
+++ subversion/branches/javahl-ra/subversion/svndumpfilter/main.c Thu Jun 21 05:54:42 2012
@@ -256,6 +256,19 @@ struct node_baton_t
 
 /* Filtering vtable members */
 
+/* File-format stamp. */
+static svn_error_t *
+magic_header_record(int version, void *parse_baton, apr_pool_t *pool)
+{
+  struct parse_baton_t *pb = parse_baton;
+  SVN_ERR(svn_stream_printf(pb->out_stream, pool,
+                            SVN_REPOS_DUMPFILE_MAGIC_HEADER ": %d\n\n",
+                            version));
+
+  return SVN_NO_ERROR;
+}
+
+
 /* New revision: set up revision_baton, decide if we skip it. */
 static svn_error_t *
 new_revision_record(void **revision_baton,
@@ -878,10 +891,11 @@ close_revision(void *revision_baton)
 
 
 /* Filtering vtable */
-svn_repos_parse_fns2_t filtering_vtable =
+svn_repos_parse_fns3_t filtering_vtable =
   {
-    new_revision_record,
+    magic_header_record,
     uuid_record,
+    new_revision_record,
     new_node_record,
     set_revision_property,
     set_node_property,
@@ -1032,17 +1046,6 @@ parse_baton_initialize(struct parse_bato
   baton->last_live_revision = SVN_INVALID_REVNUM;
   baton->oldest_original_rev = SVN_INVALID_REVNUM;
 
-  /* This is non-ideal: We should pass through the version of the
-   * input dumpstream.  However, our API currently doesn't allow that.
-   * Hardcoding version 2 is acceptable because:
-   *   - We currently do not accept version 3 or greater.
-   *   - Dumpstream version 1 is so ancient as to be ignorable
-   *     (0.17.x and earlier)
-   */
-  SVN_ERR(svn_stream_printf(baton->out_stream, pool,
-                            SVN_REPOS_DUMPFILE_MAGIC_HEADER ": %d\n\n",
-                            2));
-
   *pb = baton;
   return SVN_NO_ERROR;
 }
@@ -1144,8 +1147,8 @@ do_filter(apr_getopt_t *os,
     }
 
   SVN_ERR(parse_baton_initialize(&pb, opt_state, do_exclude, pool));
-  SVN_ERR(svn_repos_parse_dumpstream2(pb->in_stream, &filtering_vtable, pb,
-                                      NULL, NULL, pool));
+  SVN_ERR(svn_repos_parse_dumpstream3(pb->in_stream, &filtering_vtable, pb,
+                                      TRUE, NULL, NULL, pool));
 
   /* The rest of this is just reporting.  If we aren't reporting, get
      outta here. */

Modified: subversion/branches/javahl-ra/subversion/svnrdump/load_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/svnrdump/load_editor.c?rev=1352418&r1=1352417&r2=1352418&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/svnrdump/load_editor.c (original)
+++ subversion/branches/javahl-ra/subversion/svnrdump/load_editor.c Thu Jun 21 05:54:42 2012
@@ -584,6 +584,14 @@ new_revision_record(void **revision_bato
 }
 
 static svn_error_t *
+magic_header_record(int version,
+            void *parse_baton,
+            apr_pool_t *pool)
+{
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
 uuid_record(const char *uuid,
             void *parse_baton,
             apr_pool_t *pool)
@@ -1146,7 +1154,7 @@ svn_rdump__load_dumpstream(svn_stream_t 
                            void *cancel_baton,
                            apr_pool_t *pool)
 {
-  svn_repos_parse_fns2_t *parser;
+  svn_repos_parse_fns3_t *parser;
   struct parse_baton *parse_baton;
   const svn_string_t *lock_string;
   svn_boolean_t be_atomic;
@@ -1163,8 +1171,9 @@ svn_rdump__load_dumpstream(svn_stream_t 
                                            session_url, pool));
 
   parser = apr_pcalloc(pool, sizeof(*parser));
-  parser->new_revision_record = new_revision_record;
+  parser->magic_header_record = magic_header_record;
   parser->uuid_record = uuid_record;
+  parser->new_revision_record = new_revision_record;
   parser->new_node_record = new_node_record;
   parser->set_revision_property = set_revision_property;
   parser->set_node_property = set_node_property;
@@ -1185,7 +1194,7 @@ svn_rdump__load_dumpstream(svn_stream_t 
   parse_baton->last_rev_mapped = SVN_INVALID_REVNUM;
   parse_baton->oldest_dumpstream_rev = SVN_INVALID_REVNUM;
 
-  err = svn_repos_parse_dumpstream2(stream, parser, parse_baton,
+  err = svn_repos_parse_dumpstream3(stream, parser, parse_baton, FALSE,
                                     cancel_func, cancel_baton, pool);
 
   /* If all goes well, or if we're cancelled cleanly, don't leave a

Modified: subversion/branches/javahl-ra/subversion/svnserve/cyrus_auth.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/svnserve/cyrus_auth.c?rev=1352418&r1=1352417&r2=1352418&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/svnserve/cyrus_auth.c (original)
+++ subversion/branches/javahl-ra/subversion/svnserve/cyrus_auth.c Thu Jun 21 05:54:42 2012
@@ -61,7 +61,7 @@ static int canonicalize_username(sasl_co
                                  char *out, /* the output buffer */
                                  unsigned out_max, unsigned *out_len)
 {
-  int realm_len = strlen(user_realm);
+  size_t realm_len = strlen(user_realm);
   char *pos;
 
   *out_len = inlen;

Modified: subversion/branches/javahl-ra/subversion/svnserve/serve.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/svnserve/serve.c?rev=1352418&r1=1352417&r2=1352418&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/svnserve/serve.c (original)
+++ subversion/branches/javahl-ra/subversion/svnserve/serve.c Thu Jun 21 05:54:42 2012
@@ -2928,7 +2928,7 @@ repos_path_valid(const char *path)
          consisting of just dots and spaces.  Win32 functions treat
          paths such as ".. " and "......." inconsistently.  Make sure
          no one can escape out of the root. */
-      if (path - s >= 2 && strspn(s, ". ") == path - s)
+      if (path - s >= 2 && strspn(s, ". ") == (size_t)(path - s))
         return FALSE;
 #else  /* ! WIN32 */
       if (path - s == 2 && s[0] == '.' && s[1] == '.')

Modified: subversion/branches/javahl-ra/subversion/svnversion/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/svnversion/main.c?rev=1352418&r1=1352417&r2=1352418&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/svnversion/main.c (original)
+++ subversion/branches/javahl-ra/subversion/svnversion/main.c Thu Jun 21 05:54:42 2012
@@ -179,10 +179,8 @@ main(int argc, const char *argv[])
       if (APR_STATUS_IS_EOF(status))
         break;
       if (status != APR_SUCCESS)
-        {
-          usage(pool);
-          return EXIT_FAILURE;
-        }
+        usage(pool);  /* this will exit() */
+
       switch (opt)
         {
         case 'n':
@@ -201,8 +199,7 @@ main(int argc, const char *argv[])
           is_version = TRUE;
           break;
         default:
-          usage(pool);
-          return EXIT_FAILURE;
+          usage(pool);  /* this will exit() */
         }
     }
 
@@ -212,10 +209,7 @@ main(int argc, const char *argv[])
       exit(0);
     }
   if (os->ind > argc || os->ind < argc - 2)
-    {
-      usage(pool);
-      return EXIT_FAILURE;
-    }
+    usage(pool);  /* this will exit() */
 
   SVN_INT_ERR(svn_utf_cstring_to_utf8(&wc_path,
                                       (os->ind < argc) ? os->argv[os->ind]

Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/atomic-ra-revprop-change.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/atomic-ra-revprop-change.c?rev=1352418&r1=1352417&r2=1352418&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/atomic-ra-revprop-change.c (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/atomic-ra-revprop-change.c Thu Jun 21 05:54:42 2012
@@ -31,6 +31,7 @@
 #include "svn_pools.h"
 #include "svn_dirent_uri.h"
 #include "svn_ra.h"
+#include "svn_cmdline.h"
 
 #include "private/svn_skel.h"
 
@@ -41,7 +42,7 @@
 #define KEY_NEW_PROPVAL "value"
 
 #define USAGE_MSG \
-  "Usage: %s URL REVISION PROPNAME VALUES_SKEL HTTP_LIBRARY WANT_ERROR\n" \
+  "Usage: %s URL REVISION PROPNAME VALUES_SKEL WANT_ERROR CONFIG_DIR\n" \
   "\n" \
   "VALUES_SKEL is a proplist skel containing pseudo-properties '%s' \n" \
   "and '%s'.  A pseudo-property missing from the skel is interpreted \n" \
@@ -52,83 +53,28 @@
   "the exit code shall be zero.\n"
 
 
-
-/* implements svn_auth_simple_prompt_func_t */
-static svn_error_t *
-aborting_simple_prompt_func(svn_auth_cred_simple_t **cred,
-                            void *baton,
-                            const char *realm,
-                            const char *username,
-                            svn_boolean_t may_save,
-                            apr_pool_t *pool)
-{
-  /* Oops, the jrandom:rayjandom we passed for SVN_AUTH_PARAM_DEFAULT_* failed,
-     and the prompt provider has retried.
-   */
-  SVN_ERR_MALFUNCTION();
-}
-
-/* implements svn_auth_username_prompt_func_t */
-static svn_error_t *
-aborting_username_prompt_func(svn_auth_cred_username_t **cred,
-                              void *baton,
-                              const char *realm,
-                              svn_boolean_t may_save,
-                              apr_pool_t *pool)
-{
-  /* Oops, the jrandom:rayjandom we passed for SVN_AUTH_PARAM_DEFAULT_* failed,
-     and the prompt provider has retried.
-   */
-  SVN_ERR_MALFUNCTION();
-}
-
 static svn_error_t *
 construct_auth_baton(svn_auth_baton_t **auth_baton_p,
+                     const char *config_dir,
                      apr_pool_t *pool)
 {
-  apr_array_header_t *providers;
-  svn_auth_provider_object_t *simple_provider;
-  svn_auth_baton_t *auth_baton;
-
-  /* A bit of dancing just to pass jrandom:rayjandom. */
-  providers = apr_array_make(pool, 2, sizeof(svn_auth_provider_object_t *)),
-  svn_auth_get_simple_prompt_provider(&simple_provider,
-                                      aborting_simple_prompt_func, NULL,
-                                      0, pool);
-  APR_ARRAY_PUSH(providers, svn_auth_provider_object_t *) = simple_provider;
-  svn_auth_get_username_prompt_provider(&simple_provider,
-                                        aborting_username_prompt_func, NULL,
-                                        0, pool);
-  APR_ARRAY_PUSH(providers, svn_auth_provider_object_t *) = simple_provider;
-  svn_auth_open(&auth_baton, providers, pool);
-  svn_auth_set_parameter(auth_baton,
-                         SVN_AUTH_PARAM_DEFAULT_USERNAME, "jrandom");
-  svn_auth_set_parameter(auth_baton,
-                         SVN_AUTH_PARAM_DEFAULT_PASSWORD, "rayjandom");
-
-  *auth_baton_p = auth_baton;
+  SVN_ERR(svn_cmdline_create_auth_baton(auth_baton_p,
+                                        TRUE  /* non_interactive */,
+                                        "jrandom", "rayjandom",
+                                        config_dir,
+                                        TRUE  /* no_auth_cache */,
+                                        FALSE /* trust_server_cert */,
+                                        NULL, NULL, NULL, pool));
   return SVN_NO_ERROR;
 }
 
 static svn_error_t *
 construct_config(apr_hash_t **config_p,
-                 const char *http_library,
+                 const char *config_dir,
                  apr_pool_t *pool)
 {
-  apr_hash_t *config;
-  svn_config_t *servers;
-
-  /* Populate SERVERS. */
-  SVN_ERR(svn_config_create(&servers, FALSE,  pool));
-  svn_config_set(servers, SVN_CONFIG_SECTION_GLOBAL,
-                 SVN_CONFIG_OPTION_HTTP_LIBRARY, http_library);
-
-  /* Populate CONFIG. */
-  config = apr_hash_make(pool);
-  apr_hash_set(config, SVN_CONFIG_CATEGORY_SERVERS,
-               APR_HASH_KEY_STRING, servers);
+  SVN_ERR(svn_config_get_config(config_p, config_dir, pool));
 
-  *config_p = config;
   return SVN_NO_ERROR;
 }
 
@@ -138,8 +84,8 @@ change_rev_prop(const char *url,
                 const char *propname,
                 const svn_string_t *propval,
                 const svn_string_t *old_value,
-                const char *http_library,
                 svn_boolean_t want_error,
+                const char *config_dir,
                 apr_pool_t *pool)
 {
   svn_ra_callbacks2_t *callbacks;
@@ -149,8 +95,8 @@ change_rev_prop(const char *url,
   svn_error_t *err;
 
   SVN_ERR(svn_ra_create_callbacks(&callbacks, pool));
-  SVN_ERR(construct_auth_baton(&callbacks->auth_baton, pool));
-  SVN_ERR(construct_config(&config, http_library, pool));
+  SVN_ERR(construct_auth_baton(&callbacks->auth_baton, config_dir, pool));
+  SVN_ERR(construct_config(&config, config_dir, pool));
 
   SVN_ERR(svn_ra_open4(&sess, NULL, url, NULL, callbacks, NULL /* baton */,
                        config, pool));
@@ -216,9 +162,9 @@ main(int argc, const char *argv[])
   const char *propname;
   svn_string_t *propval;
   svn_string_t *old_propval;
-  const char *http_library;
   char *digits_end = NULL;
   svn_boolean_t want_error;
+  const char *config_dir;
 
   if (argc != 7)
     {
@@ -240,8 +186,9 @@ main(int argc, const char *argv[])
   revision = strtol(argv[2], &digits_end, 10);
   propname = argv[3];
   SVN_INT_ERR(extract_values_from_skel(&old_propval, &propval, argv[4], pool));
-  http_library = argv[5];
-  want_error = !strcmp(argv[6], "1");
+  want_error = !strcmp(argv[5], "1");
+  config_dir = svn_dirent_canonicalize(argv[6], pool);
+
 
   if ((! SVN_IS_VALID_REVNUM(revision)) || (! digits_end) || *digits_end)
     SVN_INT_ERR(svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
@@ -249,7 +196,7 @@ main(int argc, const char *argv[])
 
   /* Do something. */
   err = change_rev_prop(url, revision, propname, propval, old_propval,
-                        http_library, want_error, pool);
+                        want_error, config_dir, pool);
   if (err)
     {
       svn_handle_error2(err, stderr, FALSE, "atomic-ra-revprop-change: ");

Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/blame_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/blame_tests.py?rev=1352418&r1=1352417&r2=1352418&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/blame_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/blame_tests.py Thu Jun 21 05:54:42 2012
@@ -333,6 +333,7 @@ def blame_eol_styles(sbox):
 
   # do the test for each eol-style
   for eol in ['CR', 'LF', 'CRLF', 'native']:
+    svntest.main.run_svn(None, 'propdel', 'svn:eol-style', file_path)
     svntest.main.file_write(file_path, "This is no longer the file 'iota'.\n")
 
     for i in range(1,3):

Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/davautocheck.sh
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/davautocheck.sh?rev=1352418&r1=1352417&r2=1352418&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/davautocheck.sh (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/davautocheck.sh Thu Jun 21 05:54:42 2012
@@ -67,6 +67,10 @@
 #
 # To prevent the server from advertising httpv2, pass USE_HTTPV1 in
 # the environment.
+#
+# To enable "SVNCacheRevProps on" set CACHE_REVPROPS in the environment.
+#
+# To test over https set USE_SSL in the environment.
 # 
 # To use value for "SVNPathAuthz" directive set SVN_PATH_AUTHZ with
 # appropriate value in the environment.
@@ -186,6 +190,11 @@ if [ ${SVN_PATH_AUTHZ:+set} ]; then
  SVN_PATH_AUTHZ_LINE="SVNPathAuthz      ${SVN_PATH_AUTHZ}"
 fi
 
+CACHE_REVPROPS_SETTING=off
+if [ ${CACHE_REVPROPS:+set} ]; then
+  CACHE_REVPROPS_SETTING=on
+fi
+
 # Find the source and build directories. The build dir can be found if it is
 # the current working dir or the source dir.
 ABS_SRCDIR=$(cd ${SCRIPTDIR}/../../../; pwd)
@@ -275,6 +284,10 @@ if [ ${APACHE_MPM:+set} ]; then
     LOAD_MOD_MPM=$(get_loadmodule_config mod_mpm_$APACHE_MPM) \
       || fail "MPM module not found"
 fi
+if [ ${USE_SSL:+set} ]; then
+    LOAD_MOD_SSL=$(get_loadmodule_config mod_ssl) \
+      || fail "SSL module not found"
+fi
 
 random_port() {
   if [ -n "$BASH_VERSION" ]; then
@@ -302,6 +315,53 @@ mkdir "$HTTPD_ROOT" \
 
 say "Using directory '$HTTPD_ROOT'..."
 
+if [ ${USE_SSL:+set} ]; then
+  say "Setting up SSL"
+  BASE_URL="https://localhost:$HTTPD_PORT"
+# A self-signed certifcate for localhost generated via:
+#   openssl req -new -x509 -nodes -out cert.pem -keyout cert-key.pem
+  SSL_CERTIFICATE_FILE="$HTTPD_ROOT/cert.pem"
+cat > "$SSL_CERTIFICATE_FILE" <<__EOF__
+-----BEGIN CERTIFICATE-----
+MIICrTCCAhagAwIBAgIJAN/ks6HqqeVKMA0GCSqGSIb3DQEBBQUAMEQxGjAYBgNV
+BAoTEUFwYWNoZSBTdWJ2ZXJzaW9uMRIwEAYDVQQLEwl0ZXN0c3VpdGUxEjAQBgNV
+BAMTCWxvY2FsaG9zdDAeFw0xMjA2MTIyMTIyNDlaFw0xMjA3MTIyMTIyNDlaMEQx
+GjAYBgNVBAoTEUFwYWNoZSBTdWJ2ZXJzaW9uMRIwEAYDVQQLEwl0ZXN0c3VpdGUx
+EjAQBgNVBAMTCWxvY2FsaG9zdDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
+pAIkUHZbKgb6n75AZu7YG3skAeFZRVCiu9K/KwLKxDlhDuXhAjrGUOyfwtvj0Ezw
+F6J1Ke6NJFNOMw9FKcp9BegUyWHQ0hTxQSbgIGCgZGG74LUO5kdHQBU9bu/3daF+
+TC0e08OO90RLAoNr/CADZOTDDPD1QYFS3Au49GZPtI8CAwEAAaOBpjCBozAdBgNV
+HQ4EFgQUKgls7+vC/CGZKNJUczUSo+ZL2wAwdAYDVR0jBG0wa4AUKgls7+vC/CGZ
+KNJUczUSo+ZL2wChSKRGMEQxGjAYBgNVBAoTEUFwYWNoZSBTdWJ2ZXJzaW9uMRIw
+EAYDVQQLEwl0ZXN0c3VpdGUxEjAQBgNVBAMTCWxvY2FsaG9zdIIJAN/ks6HqqeVK
+MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAFMkecdq3XuJaRaC+4G38
+RNzUFR5Mnv/Ue/43J5CEJ5g2RTxro8DnGcYw2Qbv8lCUDBhkQ8L/lwnLe5jd204D
+Ad9t+1LXNyrYYncOmoZyzKupbfR0m6qz2Q45tqEztHokVWLnchiBaOL0nnGY0rPM
+zyc9CVIgp7ivvAud6ja++CQ=
+-----END CERTIFICATE-----
+__EOF__
+  SSL_CERTIFICATE_KEY_FILE="$HTTPD_ROOT/cert-key.pem"
+cat > "$SSL_CERTIFICATE_KEY_FILE" <<__EOF__
+ -----BEGIN RSA PRIVATE KEY-----
+MIICXAIBAAKBgQCkAiRQdlsqBvqfvkBm7tgbeyQB4VlFUKK70r8rAsrEOWEO5eEC
+OsZQ7J/C2+PQTPAXonUp7o0kU04zD0Upyn0F6BTJYdDSFPFBJuAgYKBkYbvgtQ7m
+R0dAFT1u7/d1oX5MLR7Tw473REsCg2v8IANk5MMM8PVBgVLcC7j0Zk+0jwIDAQAB
+AoGAFU0x6kF1FcBSTO0o8DWVW/xicNwT/Cy89igpLCzwqQvKz2SMFP4NQ/V3ypdE
+v4k+pdMz5H5XVqB7R6Z0FTl3g1ecfZoxYuMYWgzaaS6nx1xWJUqMTUqHArt9Sl/K
+/k6H5cNPC3JxGv7Blz87a3ypi93ZgSOJZDixG0BoRClGegECQQDVLTMqH5pVeBH1
+kfY2O8initMhi1lluM7yREbvZtxm844P11m7V4sOX9XQtBaaW3qLjzIru0TBJCL6
+F1JF7mYlAkEAxPRsJuFtBtWpQvnFzX3uXtaJtKtBIHbyBhmzo4f+ed/JU4Kzu1Pk
+CMnKgglg8rzU8/0HIU0AiaV2ItlQwb6PowJATZkWds7qLxJ19x4ascMxV0uBb0R6
+Vjzfl/CioaKfuBoQLFQHpdpIFANuoXnsgGOsSADoEmMos+WjlcXHfQ06wQJBAJTe
+79Tftephm+QtKc9urbvvy/zNKZghcEUeLkOgqsByYBoIhFRHT+k4piJudmJkS071
+ZetM6eghMk+bFcisgqMCQDD3kQ8gYOS9GbHPuTF4dfFSBx51nvd+hWNna1wi3rl+
+7nYzmrRWOp4ZMUG7i6GwqYHZ9stwJ/xRup5oink5VoQ=
+-----END RSA PRIVATE KEY-----
+__EOF__
+  SSL_MAKE_VAR="SSL_CERT=$SSL_CERTIFICATE_FILE"
+  SSL_TEST_ARG="--ssl-cert $SSL_CERTIFICATE_FILE"
+fi
+
 say "Adding users for lock authentication"
 $HTPASSWD -bc $HTTPD_USERS jrandom   rayjandom
 $HTPASSWD -b  $HTTPD_USERS jconstant rayjandom
@@ -310,6 +370,7 @@ touch $HTTPD_MIME_TYPES
 
 cat > "$HTTPD_CFG" <<__EOF__
 $LOAD_MOD_MPM
+$LOAD_MOD_SSL
 $LOAD_MOD_LOG_CONFIG
 $LOAD_MOD_MIME
 $LOAD_MOD_ALIAS
@@ -339,6 +400,14 @@ else
 __EOF__
 fi
 
+if [ ${USE_SSL:+set} ]; then
+cat >> "$HTTPD_CFG" <<__EOF__
+SSLEngine on
+SSLCertificateFile $SSL_CERTIFICATE_FILE
+SSLCertificateKeyFile $SSL_CERTIFICATE_KEY_FILE
+__EOF__
+fi
+
 cat >> "$HTTPD_CFG" <<__EOF__
 Listen              $HTTPD_PORT
 ServerName          localhost
@@ -380,6 +449,7 @@ CustomLog           "$HTTPD_ROOT/ops" "%
   AuthUserFile      $HTTPD_USERS
   Require           valid-user
   SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
+  SVNCacheRevProps  ${CACHE_REVPROPS_SETTING}
   ${SVN_PATH_AUTHZ_LINE}
 </Location>
 <Location /svn-test-work/local_tmp/repos>
@@ -416,7 +486,7 @@ say "HTTPD started and listening on '$BA
 ### server/request.c:ap_process_request_internal():
 ###   [Wed Feb 22 13:06:55 2006] [crit] [client 127.0.0.1] configuration error:  couldn't check user: /cfg
 HTTP_FETCH=wget
-HTTP_FETCH_OUTPUT="-q -O"
+HTTP_FETCH_OUTPUT="--no-check-certificate -q -O"
 type wget > /dev/null 2>&1
 if [ $? -ne 0 ]; then
   type curl > /dev/null 2>&1
@@ -424,7 +494,7 @@ if [ $? -ne 0 ]; then
     fail "Neither curl or wget found."
   fi
   HTTP_FETCH=curl
-  HTTP_FETCH_OUTPUT='-s -o'
+  HTTP_FETCH_OUTPUT='-s -k -o'
 fi
 $HTTP_FETCH $HTTP_FETCH_OUTPUT "$HTTPD_CFG-copy" "$BASE_URL/cfg"
 diff -q "$HTTPD_CFG" "$HTTPD_CFG-copy" > /dev/null \
@@ -455,13 +525,13 @@ else
 fi
 
 if [ $# = 0 ]; then
-  time make check "BASE_URL=$BASE_URL"
+  time make check "BASE_URL=$BASE_URL" $SSL_MAKE_VAR
   r=$?
 else
   (cd "$ABS_BUILDDIR/subversion/tests/cmdline/"
   TEST="$1"
   shift
-  time "$ABS_SRCDIR/subversion/tests/cmdline/${TEST}_tests.py" "--url=$BASE_URL" "$@")
+  time "$ABS_SRCDIR/subversion/tests/cmdline/${TEST}_tests.py" "--url=$BASE_URL" $SSL_TEST_ARG "$@")
   r=$?
 fi
 

Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/merge_symmetric_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/merge_symmetric_tests.py?rev=1352418&r1=1352417&r2=1352418&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/merge_symmetric_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/merge_symmetric_tests.py Thu Jun 21 05:54:42 2012
@@ -46,6 +46,7 @@ from svntest.main import server_has_merg
 from merge_tests import local_path
 from merge_tests import expected_merge_output
 from merge_tests import svn_merge
+from merge_tests import set_up_branch
 
 #----------------------------------------------------------------------
 
@@ -127,7 +128,17 @@ from merge_tests import svn_merge
 #
 #   Subtree mergeinfo
 #
-#     ...
+#     subtree to, fro
+#     A (--o-o-o-o---------x
+#       ( \         \     /
+#       (  \         \   /
+#     B (   o--o------s--
+#
+#     merge to, reverse cherry subtree to, merge to
+#     A (--o-o-o-o------------------
+#       ( \         \        \     \
+#       (  \         \        \     \
+#     B (   o--o------x-------rcs----x
 #
 #   Sparse WC
 #
@@ -142,9 +153,11 @@ from merge_tests import svn_merge
 #
 #   o   - an original change
 #   ?   - an original change or no-op (test both)
-#   x   - a merge
+#   x   - a branch root merge
 #   c   - a cherry-pick merge
 #   [o] - source range of a cherry-pick merge
+#   s   - a subtree merge
+#   r   - reverse merge
 
 
 ########################################################################
@@ -481,7 +494,6 @@ def merge_twice_same_direction_2(sbox):
 #   Merge to and fro
 
 @SkipUnless(server_has_mergeinfo)
-@Wimp("needs SVN_WITH_SYMMETRIC_MERGE")
 def merge_to_and_fro_1_1(sbox):
   """merge_to_and_fro_1_1"""
 
@@ -498,7 +510,6 @@ def merge_to_and_fro_1_1(sbox):
                   expect_3ways=[three_way_merge('A4', 'B7')])
 
 @SkipUnless(server_has_mergeinfo)
-@Wimp("needs SVN_WITH_SYMMETRIC_MERGE")
 def merge_to_and_fro_1_2(sbox):
   """merge_to_and_fro_1_2"""
 
@@ -542,7 +553,6 @@ def init_merge_to_and_fro_2(sbox, mod_9,
     no_op_commit(sbox)  # r10
 
 @SkipUnless(server_has_mergeinfo)
-@Wimp("needs SVN_WITH_SYMMETRIC_MERGE")
 def merge_to_and_fro_2_1(sbox):
   """merge_to_and_fro_2_1"""
 
@@ -559,7 +569,6 @@ def merge_to_and_fro_2_1(sbox):
                   expect_3ways=[three_way_merge('A7', 'B10')])
 
 @SkipUnless(server_has_mergeinfo)
-@Wimp("needs SVN_WITH_SYMMETRIC_MERGE")
 def merge_to_and_fro_2_2(sbox):
   """merge_to_and_fro_2_2"""
 
@@ -603,7 +612,6 @@ def init_merge_to_and_fro_3(sbox, mod_9,
     no_op_commit(sbox)  # r10
 
 @SkipUnless(server_has_mergeinfo)
-@Wimp("needs SVN_WITH_SYMMETRIC_MERGE")
 def merge_to_and_fro_3_1(sbox):
   """merge_to_and_fro_3_1"""
 
@@ -620,7 +628,6 @@ def merge_to_and_fro_3_1(sbox):
                   expect_3ways=[three_way_merge_no_op('B7', 'B10')])
 
 @SkipUnless(server_has_mergeinfo)
-@Wimp("needs SVN_WITH_SYMMETRIC_MERGE")
 def merge_to_and_fro_3_2(sbox):
   """merge_to_and_fro_3_2"""
 
@@ -637,7 +644,6 @@ def merge_to_and_fro_3_2(sbox):
                   expect_3ways=[three_way_merge('B7', 'B10')])
 
 @SkipUnless(server_has_mergeinfo)
-@Wimp("needs SVN_WITH_SYMMETRIC_MERGE")
 def merge_to_and_fro_4_1(sbox):
   """merge_to_and_fro_4_1"""
 
@@ -654,7 +660,6 @@ def merge_to_and_fro_4_1(sbox):
                   expect_3ways=[three_way_merge_no_op('B7', 'A10')])
 
 @SkipUnless(server_has_mergeinfo)
-@Wimp("needs SVN_WITH_SYMMETRIC_MERGE")
 def merge_to_and_fro_4_2(sbox):
   """merge_to_and_fro_4_2"""
 
@@ -745,6 +750,242 @@ def cherry3_fwd(sbox):
                   expect_mi=[7, 8, 9],
                   expect_3ways=[three_way_merge('A8', 'A9')])
 
+#----------------------------------------------------------------------
+# Symmetric merges ignore subtree mergeinfo during reintegrate.
+@SkipUnless(server_has_mergeinfo)
+@XFail()
+def subtree_to_and_fro(sbox):
+  "reintegrate considers source subtree mergeinfo"
+
+#     A (--o-o-o-o---------x
+#       ( \         \     /
+#       (  \         \   /
+#     B (   o--o------s--
+
+  # Some paths we'll care about.
+  A_COPY_gamma_path = sbox.ospath('A_COPY/D/gamma')
+  psi_path = sbox.ospath('A/D/H/psi')
+  A_COPY_D_path = sbox.ospath('A_COPY/D')
+  A_path = sbox.ospath('A')
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  # Setup a simple 'trunk & branch': Copy ^/A to ^/A_COPY in r2 and then
+  # make a few edits under A in r3-6:
+  wc_disk, wc_status = set_up_branch(sbox)
+
+  # r7 - Edit a file on the branch.
+  svntest.main.file_write(A_COPY_gamma_path, "Branch edit to 'gamma'.\n")
+  svntest.actions.run_and_verify_svn(None, None, [], 'ci', wc_dir,
+                                     '-m', 'Edit a file on our branch')
+
+  # r8 - Do a subtree sync merge from ^/A/D to A_COPY/D.
+  # Note that among other things this changes A_COPY/D/H/psi.
+  svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir)
+  svntest.actions.run_and_verify_svn(None, None, [], 'merge', '--symmetric',
+                                     sbox.repo_url + '/A/D', A_COPY_D_path)
+
+  # r9 - Make an edit to A/D/H/psi.
+  svntest.main.file_write(psi_path, "Trunk Edit to 'psi'.\n")
+  svntest.actions.run_and_verify_svn(None, None, [], 'ci', wc_dir,
+                                     '-m', 'Edit a file on our trunk')
+
+  # Now reintegrate ^/A_COPY back to A.  To the symmetric merge code the
+  # subtree merge to A_COPY/D just looks like any other branch edit, it is
+  # not considered a merge.  So the changes which exist on A/D and were
+  # merged to A_COPY/D, are merged *back* to A, resulting in a conflict:
+  #
+  #   C:\SVN\src-trunk\Debug\subversion\tests\cmdline\svn-test-work\
+  #     working_copies\merge_symmetric_tests-18>svn merge ^^/A_COPY A
+  #     --symmetric
+  #   DBG: merge.c:11461: base on source: file:///C:/SVN/src-trunk/Debug/
+  #     subversion/tests/cmdline/svn-test-work/repositories/
+  #     merge_symmetric_tests-18/A@1
+  #   DBG: merge.c:11462: base on target: file:///C:/SVN/src-trunk/Debug/
+  #     subversion/tests/cmdline/svn-test-work/repositories/
+  #     merge_symmetric_tests-18/A@1
+  #   DBG: merge.c:11567: yca   file:///C:/SVN/src-trunk/Debug/subversion/
+  #     tests/cmdline/svn-test-work/repositories/merge_symmetric_tests-18/A@1
+  #   DBG: merge.c:11568: base  file:///C:/SVN/src-trunk/Debug/subversion/
+  #     tests/cmdline/svn-test-work/repositories/merge_symmetric_tests-18/A@1
+  #   DBG: merge.c:11571: right file:///C:/SVN/src-trunk/Debug/subversion/
+  #     tests/cmdline/svn-test-work/repositories/merge_symmetric_tests-18/
+  #     A_COPY@8
+  #   Conflict discovered in file 'A\D\H\psi'.
+  #   Select: (p) postpone, (df) diff-full, (e) edit,
+  #           (mc) mine-conflict, (tc) theirs-conflict,
+  #           (s) show all options: p
+  #   --- Merging r2 through r8 into 'A':
+  #   C    A\D\H\psi
+  #   U    A\D\gamma
+  #   --- Recording mergeinfo for merge of r2 through r8 into 'A':
+  #    U   A
+  #   Summary of conflicts:
+  #     Text conflicts: 1
+  svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir)
+  exit_code, out, err = svntest.actions.run_and_verify_svn(
+    None, [], svntest.verify.AnyOutput,
+    'merge', '--symmetric', sbox.repo_url + '/A_COPY', A_path)
+
+  # The 'old' merge produced a warning that reintegrate could not be used.
+  # Not claiming this is perfect, but it's better(?) than a conflict:
+  svntest.verify.verify_outputs("Symmetric Reintegrate failed, but not "
+                                "in the way expected",
+                                err, None,
+                                "(svn: E195016: Reintegrate can only be used if "
+                                "revisions 2 through 8 were previously "
+                                "merged from .*/A to the reintegrate source, "
+                                "but this is not the case:\n)"
+                                "|(  A_COPY\n)"
+                                "|(    Missing ranges: /A:5\n)"
+                                "|(\n)"
+                                "|(.*apr_err.*)", # In case of debug build
+                                None,
+                                True) # Match *all* lines of stdout  
+
+#----------------------------------------------------------------------
+# Symmetric merges ignore subtree mergeinfo gaps older than the last rev
+# synced to the target root.
+@SkipUnless(server_has_mergeinfo)
+def merge_to_reverse_cherry_subtree_to_merge_to(sbox):
+  "sync merge considers target subtree mergeinfo"
+
+  #   A (--o-o-o-o------------------
+  #     ( \         \        \     \
+  #     (  \         \        \     \
+  #   B (   o--o------x-------rc-----x
+
+  # Some paths we'll care about.
+  A_COPY_path = sbox.ospath('A_COPY')
+  A_COPY_B_path = sbox.ospath('A_COPY/B')
+  A_COPY_beta_path = sbox.ospath('A_COPY/B/E/beta')
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  # Setup a simple 'trunk & branch': Copy ^/A to ^/A_COPY in r2 and then
+  # make a few edits under A in r3-6:
+  wc_disk, wc_status = set_up_branch(sbox)
+
+  # Sync merge ^/A to A_COPY, then reverse merge r5 from ^/A/B to A_COPY/B.
+  # This results in mergeinfo on the target which makes it appear that the
+  # branch is synced up to r6, but the subtree mergeinfo on A_COPY/B reveals
+  # that r5 has not been merged to that subtree:
+  #
+  #   Properties on 'A_COPY':
+  #     svn:mergeinfo
+  #       /A:2-6
+  #   Properties on 'A_COPY\B':
+  #     svn:mergeinfo
+  #       /A/B:2-4,6
+  svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir)
+  svntest.actions.run_and_verify_svn(None, None, [], 'merge', '--symmetric',
+                                     sbox.repo_url + '/A', A_COPY_path)
+  svntest.actions.run_and_verify_svn(None, None, [], 'merge', '-c-5',
+                                     sbox.repo_url + '/A/B',
+                                     A_COPY_B_path)
+  svntest.actions.run_and_verify_svn(None, None, [], 'ci', wc_dir, '-m',
+                                     'sync merge and reverse subtree merge')
+
+  # Try a symmetric sync merge from ^/A to A_COPY.  Revision 5 should be
+  # merged to A_COPY/B as its subtree mergeinfo reveals that rev is missing,
+  # like so:
+  # 
+  #   >svn merge ^/A A_COPY
+  #   --- Merging r5 into 'A_COPY\B':
+  #   U    A_COPY\B\E\beta
+  #   --- Recording mergeinfo for merge of r5 through r7 into 'A_COPY':
+  #    U   A_COPY
+  #   --- Recording mergeinfo for merge of r5 through r7 into 'A_COPY\B':
+  #    U   A_COPY\B
+  #   --- Eliding mergeinfo from 'A_COPY\B':
+  #    U   A_COPY\B
+  #
+  # But the --symmetric merge ignores the subtree mergeinfo and considers
+  # only the mergeinfo on the target itself (and thus is a no-op but for
+  # the mergeinfo change on the root of the merge target):
+  #
+  #   >svn merge ^/A A_COPY --symmetric
+  #   --- Recording mergeinfo for merge of r7 into 'A_COPY':
+  #    U   A_COPY
+  #
+  #   >svn diff
+  #   Index: A_COPY
+  #   ===================================================================
+  #   --- A_COPY      (revision 7)
+  #   +++ A_COPY      (working copy)
+  #
+  #   Property changes on: A_COPY
+  #   ___________________________________________________________________
+  #   Modified: svn:mergeinfo
+  #      Merged /A:r7
+  svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir)
+  expected_output = wc.State(A_COPY_path, {
+    'B/E/beta'   : Item(status='U '),
+    })
+  expected_mergeinfo_output = wc.State(A_COPY_path, {
+    ''  : Item(status=' U'),
+    'B' : Item(status=' U'),
+    })
+  expected_elision_output = wc.State(A_COPY_path, {
+    'B' : Item(status=' U'),
+    })
+  expected_status = wc.State(A_COPY_path, {
+    ''           : Item(status=' M'),
+    'B'          : Item(status=' M'),
+    'mu'         : Item(status='  '),
+    'B/E'        : Item(status='  '),
+    'B/E/alpha'  : Item(status='  '),
+    'B/E/beta'   : Item(status='M '),
+    'B/lambda'   : Item(status='  '),
+    'B/F'        : Item(status='  '),
+    'C'          : Item(status='  '),
+    'D'          : Item(status='  '),
+    'D/G'        : Item(status='  '),
+    'D/G/pi'     : Item(status='  '),
+    'D/G/rho'    : Item(status='  '),
+    'D/G/tau'    : Item(status='  '),
+    'D/gamma'    : Item(status='  '),
+    'D/H'        : Item(status='  '),
+    'D/H/chi'    : Item(status='  '),
+    'D/H/psi'    : Item(status='  '),
+    'D/H/omega'  : Item(status='  '),
+    })
+  expected_status.tweak(wc_rev='7')
+  expected_disk = wc.State('', {
+    ''           : Item(props={SVN_PROP_MERGEINFO : '/A:2-7'}),
+    'B'          : Item(),
+    'mu'         : Item("This is the file 'mu'.\n"),
+    'B/E'        : Item(),
+    'B/E/alpha'  : Item("This is the file 'alpha'.\n"),
+    'B/E/beta'   : Item("New content"),
+    'B/lambda'   : Item("This is the file 'lambda'.\n"),
+    'B/F'        : Item(),
+    'C'          : Item(),
+    'D'          : Item(),
+    'D/G'        : Item(),
+    'D/G/pi'     : Item("This is the file 'pi'.\n"),
+    'D/G/rho'    : Item("New content"),
+    'D/G/tau'    : Item("This is the file 'tau'.\n"),
+    'D/gamma'    : Item("This is the file 'gamma'.\n"),
+    'D/H'        : Item(),
+    'D/H/chi'    : Item("This is the file 'chi'.\n"),
+    'D/H/psi'    : Item("New content"),
+    'D/H/omega'  : Item("New content"),
+    })
+  expected_skip = wc.State(A_COPY_path, { })
+  svntest.actions.run_and_verify_merge(A_COPY_path, None, None,
+                                       sbox.repo_url + '/A', None,
+                                       expected_output,
+                                       expected_mergeinfo_output,
+                                       expected_elision_output,
+                                       expected_disk,
+                                       expected_status,
+                                       expected_skip,
+                                       None, None, None, None,
+                                       None, 1, 0, '--symmetric', A_COPY_path)
+
 ########################################################################
 # Run the tests
 
@@ -768,6 +1009,8 @@ test_list = [ None,
               cherry1_fwd,
               cherry2_fwd,
               cherry3_fwd,
+              subtree_to_and_fro,
+              merge_to_reverse_cherry_subtree_to_merge_to,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/merge_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/merge_tests.py?rev=1352418&r1=1352417&r2=1352418&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/merge_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/merge_tests.py Thu Jun 21 05:54:42 2012
@@ -15216,7 +15216,7 @@ def merge_automatic_conflict_resolution(
                                      'revert', '--recursive', wc_dir)
 
   # Test --accept mine-conflict and mine-full
-  expected_output = wc.State(A_COPY_path, {'D/H/psi' : Item(status='U ')})
+  expected_output = wc.State(A_COPY_path, {'D/H/psi' : Item(status='C ')})
   expected_disk.tweak('D/H/psi', contents="BASE.\n")
   expected_status.tweak('D/H/psi', status='  ')
   svntest.actions.run_and_verify_merge(A_COPY_path, '2', '3',
@@ -15251,7 +15251,7 @@ def merge_automatic_conflict_resolution(
                                      'revert', '--recursive', wc_dir)
 
   # Test --accept theirs-conflict and theirs-full
-  expected_output = wc.State(A_COPY_path, {'D/H/psi' : Item(status='U ')})
+  expected_output = wc.State(A_COPY_path, {'D/H/psi' : Item(status='C ')})
   expected_disk.tweak('D/H/psi', contents="New content")
   expected_status.tweak('D/H/psi', status='M ')
   svntest.actions.run_and_verify_merge(A_COPY_path, '2', '3',
@@ -15285,7 +15285,7 @@ def merge_automatic_conflict_resolution(
   svntest.actions.run_and_verify_svn(None, None, [],
                                      'revert', '--recursive', wc_dir)
   # Test --accept base
-  expected_output = wc.State(A_COPY_path, {'D/H/psi' : Item(status='U ')})
+  expected_output = wc.State(A_COPY_path, {'D/H/psi' : Item(status='C ')})
   expected_elision_output = wc.State(A_COPY_path, {
     })
   expected_disk.tweak('D/H/psi', contents="This is the file 'psi'.\n")

Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/stat_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/stat_tests.py?rev=1352418&r1=1352417&r2=1352418&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/stat_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/stat_tests.py Thu Jun 21 05:54:42 2012
@@ -1567,6 +1567,82 @@ def status_depth_update(sbox):
 
 
 #----------------------------------------------------------------------
+def status_depth_update_local_modifications(sbox):
+  "run 'status --depth=X -u' with local changes"
+  
+  sbox.build()
+  wc_dir = sbox.wc_dir
+  A_path = sbox.ospath('A')
+  D_path = os.path.join(A_path, 'D')
+
+  mu_path = os.path.join(A_path, 'mu')
+  gamma_path = os.path.join(D_path, 'gamma')
+
+  svntest.main.run_svn(None, 'propset', 'svn:test', 'value', A_path)
+  svntest.main.run_svn(None, 'propset', 'svn:test', 'value', D_path)
+
+  svntest.main.file_append(mu_path, 'modified')
+  svntest.main.file_append(gamma_path, 'modified')
+
+  # depth=empty
+  expected = svntest.verify.UnorderedOutput(
+                  [" M               1   %s\n" % A_path,
+                   "Status against revision:      1\n"])
+
+  svntest.actions.run_and_verify_svn(None,
+                                     expected,
+                                     [],
+                                     "status", "-u", "--depth=empty", A_path)
+
+  expected = svntest.verify.UnorderedOutput(
+                  ["M                1   %s\n" % mu_path,
+                   "Status against revision:      1\n"])
+
+  svntest.actions.run_and_verify_svn(None,
+                                     expected,
+                                     [],
+                                     "status", "-u", "--depth=empty", mu_path)
+
+  # depth=files
+  expected = svntest.verify.UnorderedOutput(
+                  ["M                1   %s\n" % mu_path,
+                   " M               1   %s\n" % A_path,
+                   "Status against revision:      1\n"])
+
+  svntest.actions.run_and_verify_svn(None,
+                                     expected,
+                                     [],
+                                     "status", "-u", "--depth=files",
+                                     A_path)
+
+  # depth=immediates
+  expected = svntest.verify.UnorderedOutput(
+                  [" M               1   %s\n" % A_path,
+                   " M               1   %s\n" % D_path,
+                   "M                1   %s\n" % mu_path,
+                   "Status against revision:      1\n"])
+
+  svntest.actions.run_and_verify_svn(None,
+                                     expected,
+                                     [],
+                                     "status", "-u", "--depth=immediates",
+                                     A_path)
+
+  # depth=infinity (the default)
+  expected = svntest.verify.UnorderedOutput(
+                  [" M               1   %s\n" % A_path,
+                   " M               1   %s\n" % D_path,
+                   "M                1   %s\n" % mu_path,
+                   "M                1   %s\n" % gamma_path,
+                   "Status against revision:      1\n"])
+
+  svntest.actions.run_and_verify_svn(None,
+                                     expected,
+                                     [],
+                                     "status", "-u", "--depth=infinity",
+                                     A_path)
+
+#----------------------------------------------------------------------
 # Test for issue #2420
 @Issue(2420)
 def status_dash_u_deleted_directories(sbox):
@@ -1995,6 +2071,7 @@ test_list = [ None,
               status_dash_u_deleted_directories,
               status_depth_local,
               status_depth_update,
+              status_depth_update_local_modifications,
               status_dash_u_type_change,
               status_with_tree_conflicts,
               status_nested_wc_old_format,

Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/svndumpfilter_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/svndumpfilter_tests.py?rev=1352418&r1=1352417&r2=1352418&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/svndumpfilter_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/svndumpfilter_tests.py Thu Jun 21 05:54:42 2012
@@ -33,8 +33,9 @@ import tempfile
 import svntest
 from svntest.verify import SVNExpectedStdout, SVNExpectedStderr
 
-# Get some helper routines from svnadmin_tests
+# Get some helper routines
 from svnadmin_tests import load_and_verify_dumpstream, test_create
+from svntest.main import run_svn, run_svnadmin
 
 # (abbreviation)
 Skip = svntest.testcase.Skip_deco
@@ -651,6 +652,23 @@ def match_empty_prefix(sbox):
   # doesn't seem to be a consistent way to quote such an argument to
   # prevent expansion.
 
+@Issue(2760)
+def accepts_deltas(sbox):
+  "accepts deltas in the input"
+  # Accept format v3 (as created by 'svnadmin --deltas' or svnrdump).
+
+  test_create(sbox)
+  dumpfile_location = os.path.join(os.path.dirname(sys.argv[0]),
+                                   'svndumpfilter_tests_data',
+                                   'simple_v3.dump')
+  dumpfile = open(dumpfile_location).read()
+
+  filtered_out, filtered_err = filter_and_return_output(dumpfile, 0, "include",
+                                                        "trunk", "--quiet")
+  load_and_verify_dumpstream(sbox, [], [], None, filtered_out)
+
+  
+
 ########################################################################
 # Run the tests
 
@@ -664,6 +682,7 @@ test_list = [ None,
               filter_mergeinfo_revs_outside_of_dump_stream,
               dropped_but_not_renumbered_empty_revs,
               match_empty_prefix,
+              accepts_deltas,
               ]
 
 if __name__ == '__main__':

Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/svnserveautocheck.sh
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/svnserveautocheck.sh?rev=1352418&r1=1352417&r2=1352418&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/svnserveautocheck.sh (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/svnserveautocheck.sh Thu Jun 21 05:54:42 2012
@@ -103,6 +103,10 @@ if [ "$THREADED" != "" ]; then
   SVNSERVE_ARGS="-T"
 fi
 
+if [ ${CACHE_REVPROPS:+set} ]; then
+  SVNSERVE_ARGS="$SVNSERVE_ARGS --cache-revprops on"
+fi
+
 "$SERVER_CMD" -d -r "$ABS_BUILDDIR/subversion/tests/cmdline" \
             --listen-host 127.0.0.1 \
             --listen-port $SVNSERVE_PORT \

Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/svntest/actions.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/svntest/actions.py?rev=1352418&r1=1352417&r2=1352418&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/svntest/actions.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/svntest/actions.py Thu Jun 21 05:54:42 2012
@@ -1869,7 +1869,7 @@ def enable_revprop_changes(repo_dir):
 
   hook_path = main.get_pre_revprop_change_hook_path(repo_dir)
   main.create_python_hook_script(hook_path, 'import sys; sys.exit(0)',
-                                 cmd_alternative='@exit /b 0')
+                                 cmd_alternative='@exit 0')
 
 def disable_revprop_changes(repo_dir):
   """Disable revprop changes in the repository at REPO_DIR by creating a
@@ -1884,7 +1884,7 @@ def disable_revprop_changes(repo_dir):
                                  'sys.exit(1)\n',
                                  cmd_alternative=
                                        '@echo pre-revprop-change %* 1>&2\n'
-                                       '@exit /b 1\n')
+                                       '@exit 1\n')
 
 def create_failing_post_commit_hook(repo_dir):
   """Create a post-commit hook script in the repository at REPO_DIR that always
@@ -1896,7 +1896,7 @@ def create_failing_post_commit_hook(repo
     'sys.exit(1)\n',
     cmd_alternative=
             '@echo Post-commit hook failed 1>&2\n'
-            '@exit /b 1\n')
+            '@exit 1\n')
 
 # set_prop can be used for properties with NULL characters which are not
 # handled correctly when passed to subprocess.Popen() and values like "*"

Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/svntest/main.py?rev=1352418&r1=1352417&r2=1352418&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/svntest/main.py Thu Jun 21 05:54:42 2012
@@ -35,6 +35,8 @@ import optparse
 import xml
 import urllib
 import logging
+import hashlib
+from urlparse import urlparse
 
 try:
   # Python >=3.0
@@ -532,7 +534,8 @@ def run_command_stdin(command, error_exp
          [line for line in stdout_lines if not line.startswith("DBG:")], \
          stderr_lines
 
-def create_config_dir(cfgdir, config_contents=None, server_contents=None):
+def create_config_dir(cfgdir, config_contents=None, server_contents=None,
+                      ssl_cert=None, ssl_url=None):
   "Create config directories and files"
 
   # config file names
@@ -570,6 +573,56 @@ store-passwords=yes
   file_write(cfgfile_cfg, config_contents)
   file_write(cfgfile_srv, server_contents)
 
+  if (ssl_cert and ssl_url):
+    trust_ssl_cert(cfgdir, ssl_cert, ssl_url)
+  elif cfgdir != default_config_dir:
+    copy_trust(cfgdir, default_config_dir)
+
+
+def trust_ssl_cert(cfgdir, ssl_cert, ssl_url):
+  """Setup config dir to trust the given ssl_cert for the given ssl_url
+  """
+
+  cert_rep = ''
+  fp = open(ssl_cert, 'r')
+  for line in fp.readlines()[1:-1]:
+    cert_rep = cert_rep + line.strip()
+
+  parsed_url = urlparse(ssl_url)
+  netloc_url = '%s://%s' % (parsed_url.scheme, parsed_url.netloc)
+  ssl_dir = os.path.join(cfgdir, 'auth', 'svn.ssl.server')
+  if not os.path.isdir(ssl_dir):
+    os.makedirs(ssl_dir)
+  md5_name = hashlib.md5(netloc_url).hexdigest()
+  md5_file = os.path.join(ssl_dir, md5_name)
+  md5_file_contents = """K 10
+ascii_cert
+V %d
+%s
+K 8
+failures
+V 1
+8
+K 15
+svn:realmstring
+V %d
+%s
+END
+""" % (len(cert_rep), cert_rep, len(netloc_url), netloc_url)
+
+  file_write(md5_file, md5_file_contents)
+
+def copy_trust(dst_cfgdir, src_cfgdir):
+  """Copy svn.ssl.server files from one config dir to another.
+  """
+
+  src_ssl_dir = os.path.join(src_cfgdir, 'auth', 'svn.ssl.server')
+  dst_ssl_dir = os.path.join(dst_cfgdir, 'auth', 'svn.ssl.server')
+  if not os.path.isdir(dst_ssl_dir):
+    os.makedirs(dst_ssl_dir)
+  for f in os.listdir(src_ssl_dir):
+    shutil.copy(os.path.join(src_ssl_dir, f), os.path.join(dst_ssl_dir, f))
+
 def _with_config_dir(args):
   if '--config-dir' in args:
     return args
@@ -676,7 +729,7 @@ def run_atomic_ra_revprop_change(url, re
   # This passes HTTP_LIBRARY in addition to our params.
   return run_command(atomic_ra_revprop_change_binary, True, False,
                      url, revision, propname, skel,
-                     options.http_library, want_error and 1 or 0)
+                     want_error and 1 or 0, default_config_dir)
 
 def run_wc_lock_tester(recursive, path):
   "Run the wc-lock obtainer tool, returning its exit code, stdout and stderr"
@@ -1215,6 +1268,8 @@ class TestSpawningThread(threading.Threa
       args.append('--mode-filter=' + options.mode_filter)
     if options.milestone_filter:
       args.append('--milestone-filter=' + options.milestone_filter)
+    if options.ssl_cert:
+      args.append('--ssl-cert=' + options.ssl_cert)
 
     result, stdout_lines, stderr_lines = spawn_process(command, 0, 0, None,
                                                        *args)
@@ -1561,6 +1616,8 @@ def _create_parser():
                          'useful during test development!')
   parser.add_option('--srcdir', action='store', dest='srcdir',
                     help='Source directory.')
+  parser.add_option('--ssl-cert', action='store',
+                    help='Path to SSL server certificate.')
 
   # most of the defaults are None, but some are other values, set them here
   parser.set_defaults(
@@ -1861,7 +1918,9 @@ def execute_tests(test_list, serial_only
 
   if not options.is_child_process:
     # Build out the default configuration directory
-    create_config_dir(default_config_dir)
+    create_config_dir(default_config_dir,
+                      ssl_cert=options.ssl_cert,
+                      ssl_url=options.test_area_url)
 
     # Setup the pristine repository
     svntest.actions.setup_pristine_greek_repository()



Mime
View raw message