You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2012/09/27 14:13:39 UTC

svn commit: r1390960 [2/2] - in /subversion/branches/10Gb: ./ build/ build/ac-macros/ build/generator/templates/ subversion/bindings/swig/ subversion/bindings/swig/perl/native/ subversion/bindings/swig/python/libsvn_swig_py/ subversion/bindings/swig/py...

Modified: subversion/branches/10Gb/subversion/svn/cl.h
URL: http://svn.apache.org/viewvc/subversion/branches/10Gb/subversion/svn/cl.h?rev=1390960&r1=1390959&r2=1390960&view=diff
==============================================================================
--- subversion/branches/10Gb/subversion/svn/cl.h (original)
+++ subversion/branches/10Gb/subversion/svn/cl.h Thu Sep 27 12:13:36 2012
@@ -108,12 +108,6 @@ typedef enum svn_cl__accept_t
 svn_cl__accept_t
 svn_cl__accept_from_word(const char *word);
 
-/* --search and --isearch option values */
-typedef struct svn_cl__search_pattern_t {
-  const char *pattern; /* glob syntax */
-  svn_boolean_t case_insensitive;
-} svn_cl__search_pattern_t;
-
 
 /*** Mergeinfo flavors. ***/
 
@@ -243,9 +237,6 @@ typedef struct svn_cl__opt_state_t
   svn_boolean_t allow_mixed_rev; /* Allow operation on mixed-revision WC */
   svn_boolean_t include_externals; /* Recurses (in)to file & dir externals */
   apr_array_header_t* search_patterns; /* pattern arguments for --search */
-
-  svn_wc_conflict_resolver_func2_t conflict_func;
-  void *conflict_baton;
 } svn_cl__opt_state_t;
 
 
@@ -338,37 +329,58 @@ svn_cl__check_cancel(void *baton);
 
 /* Various conflict-resolution callbacks. */
 
-typedef struct svn_cl__conflict_baton_t {
-  svn_cl__accept_t accept_which;
-  apr_hash_t *config;
-  const char *editor_cmd;
-  svn_boolean_t external_failed;
-  svn_cmdline_prompt_baton_t *pb;
-  const char *path_prefix;
-} svn_cl__conflict_baton_t;
-
-/* Create and return a conflict baton in *B, allocated from POOL, with the
- * values ACCEPT_WHICH, CONFIG, EDITOR_CMD and PB placed in the same-named
- * fields of the baton, and its 'external_failed' field initialised to FALSE. */
-svn_error_t *
-svn_cl__conflict_baton_make(svn_cl__conflict_baton_t **b,
-                            svn_cl__accept_t accept_which,
-                            apr_hash_t *config,
-                            const char *editor_cmd,
-                            svn_cmdline_prompt_baton_t *pb,
-                            apr_pool_t *pool);
+/* Opaque baton type for svn_cl__conflict_func_interactive(). */
+typedef struct svn_cl__interactive_conflict_baton_t
+  svn_cl__interactive_conflict_baton_t;
+
+/* Create and return an baton for use with svn_cl__conflict_func_interactive
+ * in *B, allocated from RESULT_POOL, and initialised with the values
+ * ACCEPT_WHICH, CONFIG, EDITOR_CMD, CANCEL_FUNC and CANCEL_BATON. */
+svn_error_t *
+svn_cl__get_conflict_func_interactive_baton(
+  svn_cl__interactive_conflict_baton_t **b,
+  svn_cl__accept_t accept_which,
+  apr_hash_t *config,
+  const char *editor_cmd,
+  svn_cancel_func_t cancel_func,
+  void *cancel_baton,
+  apr_pool_t *result_pool);
 
 /* A conflict-resolution callback which prompts the user to choose
    one of the 3 fulltexts, edit the merged file on the spot, or just
    skip the conflict (to be resolved later).
    Implements @c svn_wc_conflict_resolver_func_t. */
 svn_error_t *
-svn_cl__conflict_handler(svn_wc_conflict_result_t **result,
-                         const svn_wc_conflict_description2_t *desc,
-                         void *baton,
-                         apr_pool_t *result_pool,
-                         apr_pool_t *scratch_pool);
-
+svn_cl__conflict_func_interactive(svn_wc_conflict_result_t **result,
+                                  const svn_wc_conflict_description2_t *desc,
+                                  void *baton,
+                                  apr_pool_t *result_pool,
+                                  apr_pool_t *scratch_pool);
+
+/* Create an return a baton for use with svn_cl__conflict_func_postpone(),
+ * allocated in RESULT_POOL. */
+void *
+svn_cl__get_conflict_func_postpone_baton(apr_pool_t *result_pool);
+
+/* A conflict-resolution callback which postpones all conflicts and
+ * remembers conflicted paths in BATON. */
+svn_error_t *
+svn_cl__conflict_func_postpone(svn_wc_conflict_result_t **result,
+                               const svn_wc_conflict_description2_t *desc,
+                               void *baton,
+                               apr_pool_t *result_pool,
+                               apr_pool_t *scratch_pool);
+
+/* Run the interactive conflict resolver, obtained internally from
+ * svn_cl__get_conflict_func_interactive(), on any conflicted paths
+ * stored in the BATON obtained from svn_cl__get_conflict_func_postpone(). */
+svn_error_t *
+svn_cl__resolve_postponed_conflicts(void *baton,
+                                    svn_depth_t depth,
+                                    svn_cl__accept_t accept_which,
+                                    const char *editor_cmd,
+                                    svn_client_ctx_t *ctx,
+                                    apr_pool_t *scratch_pool);
 
 
 /*** Command-line output functions -- printing to the user. ***/
@@ -623,14 +635,6 @@ svn_cl__notifier_mark_export(void *baton
 svn_error_t *
 svn_cl__notifier_mark_wc_to_repos_copy(void *baton);
 
-/* Return TRUE if any conflicts were detected during notification. */
-svn_boolean_t
-svn_cl__notifier_check_conflicts(void *baton);
-
-/* Return a sorted array of conflicted paths detected during notification. */
-apr_array_header_t *
-svn_cl__notifier_get_conflicted_paths(void *baton, apr_pool_t *result_pool);
-
 /* Baton for use with svn_cl__check_externals_failed_notify_wrapper(). */
 struct svn_cl__check_externals_failed_notify_baton
 {
@@ -878,15 +882,6 @@ svn_cl__check_related_source_and_target(
                                         svn_client_ctx_t *ctx,
                                         apr_pool_t *pool);
 
-/* Run the conflict resolver for all targets in the TARGETS list with
- * the specified DEPTH. */
-svn_error_t *
-svn_cl__resolve_conflicts(apr_array_header_t *targets,
-                          svn_depth_t depth,
-                          const svn_cl__opt_state_t *opt_state,
-                          svn_client_ctx_t *ctx,
-                          apr_pool_t *scratch_pool);
-
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */

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

Modified: subversion/branches/10Gb/subversion/svn/log-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/10Gb/subversion/svn/log-cmd.c?rev=1390960&r1=1390959&r2=1390960&view=diff
==============================================================================
--- subversion/branches/10Gb/subversion/svn/log-cmd.c (original)
+++ subversion/branches/10Gb/subversion/svn/log-cmd.c Thu Sep 27 12:13:36 2012
@@ -155,12 +155,11 @@ match_search_pattern(const char *search_
                      const char *date,
                      const char *log_message,
                      apr_hash_t *changed_paths,
-                     svn_boolean_t case_insensitive_search,
                      apr_pool_t *pool)
 {
   /* Match any substring containing the pattern, like UNIX 'grep' does. */
   const char *pattern = apr_psprintf(pool, "*%s*", search_pattern);
-  int flags = (case_insensitive_search ? APR_FNM_CASE_BLIND : 0);
+  int flags = APR_FNM_CASE_BLIND;
 
   /* Does the author match the search pattern? */
   if (author && apr_fnmatch(pattern, author, flags) == APR_SUCCESS)
@@ -227,14 +226,13 @@ match_search_patterns(apr_array_header_t
       /* All patterns within the group must match. */
       for (j = 0; j < pattern_group->nelts; j++)
         {
-          svn_cl__search_pattern_t p;
+          const char *pattern;
 
           svn_pool_clear(iterpool);
           
-          p = APR_ARRAY_IDX(pattern_group, j, svn_cl__search_pattern_t);
-          match = match_search_pattern(p.pattern, author, date,
-                                       message, changed_paths,
-                                       p.case_insensitive, iterpool);
+          pattern = APR_ARRAY_IDX(pattern_group, j, const char *);
+          match = match_search_pattern(pattern, author, date, message,
+                                       changed_paths, iterpool);
           if (!match)
             break;
         }

Modified: subversion/branches/10Gb/subversion/svn/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/10Gb/subversion/svn/main.c?rev=1390960&r1=1390959&r2=1390960&view=diff
==============================================================================
--- subversion/branches/10Gb/subversion/svn/main.c (original)
+++ subversion/branches/10Gb/subversion/svn/main.c Thu Sep 27 12:13:36 2012
@@ -130,9 +130,7 @@ typedef enum svn_cl__longopt_t {
   opt_allow_mixed_revisions,
   opt_include_externals,
   opt_search,
-  opt_isearch,
   opt_search_and,
-  opt_isearch_and,
 } svn_cl__longopt_t;
 
 
@@ -364,14 +362,9 @@ const apr_getopt_option_t svn_cl__option
                        "fixed revision. (See the svn:externals property)")},
   {"search", opt_search, 1,
                        N_("use ARG as search pattern (glob syntax)")},
-  {"isearch", opt_isearch, 1,
-                       N_("like --search, but case-insensitive")}, 
   {"search-and", opt_search_and, 1,
                        N_("combine ARG with the previous search pattern")},
 
-  {"isearch-and", opt_isearch_and, 1,
-                       N_("like --search-and, but case-insensitive")}, 
-
   /* Long-opt Aliases
    *
    * These have NULL desriptions, but an option code that matches some
@@ -720,7 +713,7 @@ const svn_opt_subcommand_desc2_t svn_cl_
     {'r', 'q', 'v', 'g', 'c', opt_targets, opt_stop_on_copy, opt_incremental,
      opt_xml, 'l', opt_with_all_revprops, opt_with_no_revprops, opt_with_revprop,
      opt_depth, opt_diff, opt_diff_cmd, opt_internal_diff, 'x', opt_search,
-     opt_search_and, opt_isearch, opt_isearch_and},
+     opt_search_and, },
     {{opt_with_revprop, N_("retrieve revision property ARG")},
      {'c', N_("the change made in revision ARG")}} },
 
@@ -1043,13 +1036,19 @@ const svn_opt_subcommand_desc2_t svn_cl_
 
   { "mergeinfo", svn_cl__mergeinfo, {0}, N_
     ("Display merge-related information.\n"
-     "usage: mergeinfo SOURCE[@REV] [TARGET[@REV]]\n"
-     "\n"
-     "  Display information related to merges (or potential merges) between\n"
-     "  SOURCE and TARGET (default: '.').  Display the type of information\n"
-     "  specified by the --show-revs option.  If --show-revs isn't passed,\n"
-     "  it defaults to --show-revs='merged'.\n"
+     "usage: 1. mergeinfo SOURCE[@REV] [TARGET[@REV]]\n"
+     "       2. mergeinfo --show-revs=merged SOURCE[@REV] [TARGET[@REV]]\n"
+     "       3. mergeinfo --show-revs=eligible SOURCE[@REV] [TARGET[@REV]]\n"
+     "\n"
+     "  1. Display the following information about merges between SOURCE and\n"
+     "     TARGET:\n"
+     "       the youngest common ancestor;\n"
+     "       the latest full merge in either direction, and thus the\n"
+     "         base that will be used for the next full merge.\n"
+     "  2. Print the revision numbers on SOURCE that have been merged to TARGET.\n"
+     "  3. Print the revision numbers on SOURCE that have NOT been merged to TARGET.\n"
      "\n"
+     "  The default TARGET is the current working directory ('.').\n"
      "  If --revision (-r) is provided, filter the displayed information to\n"
      "  show only that which is associated with the revisions within the\n"
      "  specified range.  Revision numbers, dates, and the 'HEAD' keyword are\n"
@@ -1574,52 +1573,43 @@ svn_cl__check_cancel(void *baton)
     return SVN_NO_ERROR;
 }
 
-/* Add a --search or --isearch argument to OPT_STATE.
+/* Add a --search argument to OPT_STATE.
  * These options start a new search pattern group. */
 static void
 add_search_pattern_group(svn_cl__opt_state_t *opt_state,
                          const char *pattern,
-                         svn_boolean_t case_insensitive,
                          apr_pool_t *result_pool)
 {
-  svn_cl__search_pattern_t p;
   apr_array_header_t *group = NULL;
 
   if (opt_state->search_patterns == NULL)
     opt_state->search_patterns = apr_array_make(result_pool, 1,
                                                 sizeof(apr_array_header_t *));
 
-  group = apr_array_make(result_pool, 1, sizeof(svn_cl__search_pattern_t));
-  p.pattern = pattern;
-  p.case_insensitive = case_insensitive;
-  APR_ARRAY_PUSH(group, svn_cl__search_pattern_t) = p;
+  group = apr_array_make(result_pool, 1, sizeof(const char *));
+  APR_ARRAY_PUSH(group, const char *) = pattern;
   APR_ARRAY_PUSH(opt_state->search_patterns, apr_array_header_t *) = group;
 }
 
-/* Add a --search-and or --isearch-and argument to OPT_STATE.
+/* Add a --search-and argument to OPT_STATE.
  * These patterns are added to an existing pattern group, if any. */
 static void
 add_search_pattern_to_latest_group(svn_cl__opt_state_t *opt_state,
                                    const char *pattern,
-                                   svn_boolean_t case_insensitive,
                                    apr_pool_t *result_pool)
 {
-  svn_cl__search_pattern_t p;
   apr_array_header_t *group;
 
   if (opt_state->search_patterns == NULL)
     {
-      add_search_pattern_group(opt_state, pattern, case_insensitive,
-                               result_pool);
+      add_search_pattern_group(opt_state, pattern, result_pool);
       return;
     }
 
   group = APR_ARRAY_IDX(opt_state->search_patterns,
                         opt_state->search_patterns->nelts - 1,
                         apr_array_header_t *);
-  p.pattern = pattern;
-  p.case_insensitive = case_insensitive;
-  APR_ARRAY_PUSH(group, svn_cl__search_pattern_t) = p;
+  APR_ARRAY_PUSH(group, const char *) = pattern;
 }
 
 
@@ -1686,7 +1676,7 @@ sub_main(int argc, const char *argv[], a
   opt_state.depth = svn_depth_unknown;
   opt_state.set_depth = svn_depth_unknown;
   opt_state.accept_which = svn_cl__accept_unspecified;
-  opt_state.show_revs = svn_cl__show_revs_merged;
+  opt_state.show_revs = svn_cl__show_revs_invalid;
 
   /* No args?  Show usage. */
   if (argc <= 1)
@@ -2172,16 +2162,10 @@ sub_main(int argc, const char *argv[], a
         opt_state.diff.properties_only = TRUE;
         break;
       case opt_search:
-        add_search_pattern_group(&opt_state, opt_arg, FALSE, pool);
-        break;
-      case opt_isearch:
-        add_search_pattern_group(&opt_state, opt_arg, TRUE, pool);
+        add_search_pattern_group(&opt_state, opt_arg, pool);
         break;
       case opt_search_and:
-        add_search_pattern_to_latest_group(&opt_state, opt_arg, FALSE, pool);
-      case opt_isearch_and:
-        add_search_pattern_to_latest_group(&opt_state, opt_arg, TRUE, pool);
-        break;
+        add_search_pattern_to_latest_group(&opt_state, opt_arg, pool);
       default:
         /* Hmmm. Perhaps this would be a good place to squirrel away
            opts that commands like svn diff might need. Hmmm indeed. */
@@ -2666,60 +2650,53 @@ sub_main(int argc, const char *argv[], a
 
   ctx->auth_baton = ab;
 
-  /* Set up conflict resolution callback. */
-  SVN_INT_ERR(svn_config_get_bool(cfg_config, &interactive_conflicts,
-                                  SVN_CONFIG_SECTION_MISCELLANY,
-                                  SVN_CONFIG_OPTION_INTERACTIVE_CONFLICTS,
-                                  TRUE));  /* ### interactivity on by default.
-                                                  we can change this. */
-
-  /* The new svn behavior is to postpone everything until after the operation
-     completed */
+  /* Install the default conflict handler which postpones all conflicts
+   * and remembers the list of conflicted paths to be resolved later.
+   * This is overridden only within the 'resolve' subcommand. */
   ctx->conflict_func = NULL;
   ctx->conflict_baton = NULL;
-  ctx->conflict_func2 = NULL;
-  ctx->conflict_baton2 = NULL;
+  ctx->conflict_func2 = svn_cl__conflict_func_postpone;
+  ctx->conflict_baton2 = svn_cl__get_conflict_func_postpone_baton(pool);
 
-  if ((opt_state.accept_which == svn_cl__accept_unspecified
-       && (!interactive_conflicts || opt_state.non_interactive))
-      || opt_state.accept_which == svn_cl__accept_postpone)
-    {
-      /* If no --accept option at all and we're non-interactive, we're
-         leaving the conflicts behind, so don't need the callback.  Same if
-         the user said to postpone. */
-      opt_state.conflict_func = NULL;
-      opt_state.conflict_baton = NULL;
-    }
-  else
+  if (opt_state.non_interactive)
     {
-      svn_cl__conflict_baton_t * conflict_baton2;
-      svn_cmdline_prompt_baton_t *pb = apr_palloc(pool, sizeof(*pb));
-      pb->cancel_func = ctx->cancel_func;
-      pb->cancel_baton = ctx->cancel_baton;
-
-      if (opt_state.non_interactive)
-        {
-          if (opt_state.accept_which == svn_cl__accept_edit)
-            return EXIT_ERROR
-              (svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
-                                 _("--accept=%s incompatible with"
-                                   " --non-interactive"), SVN_CL__ACCEPT_EDIT));
-          if (opt_state.accept_which == svn_cl__accept_launch)
-            return EXIT_ERROR
-              (svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
-                                 _("--accept=%s incompatible with"
-                                   " --non-interactive"),
-                                 SVN_CL__ACCEPT_LAUNCH));
-        }
+      if (opt_state.accept_which == svn_cl__accept_edit)
+        return EXIT_ERROR(
+                 svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                                   _("--accept=%s incompatible with"
+                                     " --non-interactive"),
+                                   SVN_CL__ACCEPT_EDIT));
+
+      if (opt_state.accept_which == svn_cl__accept_launch)
+        return EXIT_ERROR(
+                 svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                                   _("--accept=%s incompatible with"
+                                     " --non-interactive"),
+                                   SVN_CL__ACCEPT_LAUNCH));
+
+      /* The default action when we're non-interactive is to postpone
+       * conflict resolution. */
+      if (opt_state.accept_which == svn_cl__accept_unspecified)
+        opt_state.accept_which = svn_cl__accept_postpone;
+    }
+
+  /* Check whether interactive conflict resolution is disabled by
+   * the configuration file. If no --accept option was specified
+   * we postpone all conflicts in this case. */
+  SVN_INT_ERR(svn_config_get_bool(cfg_config, &interactive_conflicts,
+                                  SVN_CONFIG_SECTION_MISCELLANY,
+                                  SVN_CONFIG_OPTION_INTERACTIVE_CONFLICTS,
+                                  TRUE));
+  if (!interactive_conflicts)
+    {
+      /* Make 'svn resolve' non-interactive. */
+      if (subcommand->cmd_func == svn_cl__resolve)
+        opt_state.non_interactive = TRUE;
 
-      opt_state.conflict_func = svn_cl__conflict_handler;
-      SVN_INT_ERR(svn_cl__conflict_baton_make(&conflict_baton2,
-                                              opt_state.accept_which,
-                                              ctx->config,
-                                              opt_state.editor_cmd,
-                                              pb,
-                                              pool));
-      opt_state.conflict_baton = conflict_baton2;
+      /* We're not resolving conflicts interactively. If no --accept option
+       * was provided the default behaviour is to postpone all conflicts. */
+      if (opt_state.accept_which == svn_cl__accept_unspecified)
+        opt_state.accept_which = svn_cl__accept_postpone;
     }
 
   /* And now we finally run the subcommand. */

Modified: subversion/branches/10Gb/subversion/svn/merge-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/10Gb/subversion/svn/merge-cmd.c?rev=1390960&r1=1390959&r2=1390960&view=diff
==============================================================================
--- subversion/branches/10Gb/subversion/svn/merge-cmd.c (original)
+++ subversion/branches/10Gb/subversion/svn/merge-cmd.c Thu Sep 27 12:13:36 2012
@@ -121,7 +121,6 @@ symmetric_merge(const char *source_path_
                 apr_pool_t *scratch_pool)
 {
   svn_client__symmetric_merge_t *merge;
-  svn_boolean_t reintegrate_like;
 
   /* Find the 3-way merges needed (and check suitability of the WC). */
   SVN_ERR(svn_client__find_symmetric_merge(&merge,
@@ -130,9 +129,7 @@ symmetric_merge(const char *source_path_
                                            allow_local_mods, allow_switched_subtrees,
                                            ctx, scratch_pool, scratch_pool));
 
-  reintegrate_like = (merge->mid != NULL);
-
-  if (reintegrate_like)
+  if (svn_client__symmetric_merge_is_reintegrate_like(merge))
     {
       if (record_only)
         return svn_error_create(SVN_ERR_CL_MUTUALLY_EXCLUSIVE_ARGS, NULL,
@@ -524,15 +521,12 @@ svn_cl__merge(apr_getopt_t *os,
   if (! opt_state->quiet)
     err = svn_cl__print_conflict_stats(ctx->notify_baton2, pool);
 
-  if (!err
-      && opt_state->conflict_func
-      && svn_cl__notifier_check_conflicts(ctx->notify_baton2))
-    {
-      err = svn_cl__resolve_conflicts(
-              svn_cl__notifier_get_conflicted_paths(ctx->notify_baton2, pool),
-              opt_state->depth, opt_state, ctx, pool);
-    }
-
+  if (!err)
+    err = svn_cl__resolve_postponed_conflicts(ctx->conflict_baton2,
+                                              opt_state->depth,
+                                              opt_state->accept_which,
+                                              opt_state->editor_cmd,
+                                              ctx, pool);
   if (merge_err)
     {
       if (merge_err->apr_err ==

Modified: subversion/branches/10Gb/subversion/svn/mergeinfo-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/10Gb/subversion/svn/mergeinfo-cmd.c?rev=1390960&r1=1390959&r2=1390960&view=diff
==============================================================================
--- subversion/branches/10Gb/subversion/svn/mergeinfo-cmd.c (original)
+++ subversion/branches/10Gb/subversion/svn/mergeinfo-cmd.c Thu Sep 27 12:13:36 2012
@@ -37,6 +37,7 @@
 #include "cl.h"
 
 #include "svn_private_config.h"
+#include "private/svn_client_private.h"
 
 
 /*** Code. ***/
@@ -55,6 +56,194 @@ print_log_rev(void *baton,
   return SVN_NO_ERROR;
 }
 
+/* Draw a diagram (by printing text to the console) summarizing the state
+ * of merging between two branches, given the merge description
+ * indicated by YCA, BASE, RIGHT, TARGET, REINTEGRATE_LIKE. */
+static svn_error_t *
+mergeinfo_diagram(svn_client__pathrev_t *yca,
+                  svn_client__pathrev_t *base,
+                  svn_client__pathrev_t *right,
+                  svn_client__pathrev_t *target,
+                  svn_boolean_t target_is_wc,
+                  svn_boolean_t reintegrate_like,
+                  apr_pool_t *pool)
+{
+  /* The graph occupies 4 rows of text, and the annotations occupy
+   * another 2 rows above and 2 rows below.  The graph is constructed
+   * from left to right in discrete sections ("columns"), each of which
+   * can have a different width (measured in characters).  Each element in
+   * the array is either a text string of the appropriate width, or can
+   * be NULL to draw a blank cell. */
+#define ROWS 8
+#define COLS 4
+  const char *g[ROWS][COLS] = {{0}};
+  int col_width[COLS];
+  int row, col;
+
+  /* The YCA (that is, the branching point) */
+  g[0][0] = apr_psprintf(pool, "  %-8ld", yca->rev);
+  g[1][0] =     "  |       ";
+  if (strcmp(yca->url, right->url) == 0)
+    {
+      g[2][0] = "----------";
+      g[3][0] = "   \\      ";
+      g[4][0] = "    \\     ";
+      g[5][0] = "     -----";
+    }
+  else if (strcmp(yca->url, target->url) == 0)
+    {
+      g[2][0] = "     -----";
+      g[3][0] = "    /     ";
+      g[4][0] = "   /      ";
+      g[5][0] = "----------";
+    }
+  else
+    {
+      g[2][0] = "     -----";
+      g[3][0] = "... /     ";
+      g[4][0] = "    \\     ";
+      g[5][0] = "     -----";
+    }
+
+  /* An ellipsis, because we don't show information about earlier merges */
+    {
+      g[2][1] = "| ... |---";
+      g[3][1] = "          ";
+      g[4][1] = "          ";
+      g[5][1] = "| ... |---";
+    }
+
+  /* The last full merge */
+  if ((base->rev > yca->rev) && reintegrate_like)
+    {
+      g[2][2] = "---------";
+      g[3][2] = "  /      ";
+      g[4][2] = " /       ";
+      g[5][2] = "---------";
+      g[6][2] = "|        ";
+      g[7][2] = apr_psprintf(pool, "%-8ld ", base->rev);
+    }
+  else if (base->rev > yca->rev)
+    {
+      g[0][2] = apr_psprintf(pool, "%-8ld ", base->rev);
+      g[1][2] = "|        ";
+      g[2][2] = "---------";
+      g[3][2] = " \\       ";
+      g[4][2] = "  \\      ";
+      g[5][2] = "---------";
+    }
+  else
+    {
+      g[2][2] = "---------";
+      g[3][2] = "         ";
+      g[4][2] = "         ";
+      g[5][2] = "---------";
+    }
+
+  /* The tips of the branches */
+    {
+      g[0][3] = apr_psprintf(pool, "%-8ld", right->rev);
+      g[1][3] = "|       ";
+      g[2][3] = "-       ";
+      g[3][3] = "        ";
+      g[4][3] = "        ";
+      g[5][3] = "-       ";
+      g[6][3] = "|       ";
+      g[7][3] = target_is_wc ? apr_psprintf(pool, "%-8ld", target->rev)
+                             : "WC      ";
+    }
+
+  /* Find the width of each column, so we know how to print blank cells */
+  for (col = 0; col < COLS; col++)
+    {
+      col_width[col] = 0;
+      for (row = 0; row < ROWS; row++)
+        {
+          if (g[row][col] && (strlen(g[row][col]) > col_width[col]))
+            col_width[col] = strlen(g[row][col]);
+        }
+    }
+
+  /* Column headings */
+  SVN_ERR(svn_cmdline_fputs(
+            _("    youngest          last               repos.\n"
+              "    common            full     tip of    path of\n"
+              "    ancestor          merge    branch    branch\n"
+              "\n"),
+            stdout, pool));
+
+  /* Print the diagram, row by row */
+  for (row = 0; row < ROWS; row++)
+    {
+      SVN_ERR(svn_cmdline_fputs("  ", stdout, pool));
+      for (col = 0; col < COLS; col++)
+        {
+          if (g[row][col])
+            {
+              SVN_ERR(svn_cmdline_fputs(g[row][col], stdout, pool));
+            }
+          else
+            {
+              /* Print <column-width> spaces */
+              SVN_ERR(svn_cmdline_printf(pool, "%*s", col_width[col], ""));
+            }
+        }
+      if (row == 2)
+        SVN_ERR(svn_cmdline_printf(pool, "  %s",
+                svn_client__pathrev_relpath(right, pool)));
+      if (row == 5)
+        SVN_ERR(svn_cmdline_printf(pool, "  %s",
+                svn_client__pathrev_relpath(target, pool)));
+      SVN_ERR(svn_cmdline_fputs("\n", stdout, pool));
+    }
+
+  return SVN_NO_ERROR;
+}
+
+/* Display a summary of the state of merging between the two branches
+ * SOURCE_PATH_OR_URL@SOURCE_REVISION and
+ * TARGET_PATH_OR_URL@TARGET_REVISION. */
+static svn_error_t *
+mergeinfo_summary(
+                  const char *source_path_or_url,
+                  const svn_opt_revision_t *source_revision,
+                  const char *target_path_or_url,
+                  const svn_opt_revision_t *target_revision,
+                  svn_client_ctx_t *ctx,
+                  apr_pool_t *pool)
+{
+  svn_client__symmetric_merge_t *the_merge;
+  svn_client__pathrev_t *yca, *base, *right, *target;
+  svn_boolean_t target_is_wc, reintegrate_like;
+
+  target_is_wc = svn_path_is_url(target_path_or_url)
+                 && (target_revision->kind == svn_opt_revision_unspecified
+                     || target_revision->kind == svn_opt_revision_working);
+  if (target_is_wc)
+    SVN_ERR(svn_client__find_symmetric_merge(
+              &the_merge,
+              source_path_or_url, source_revision,
+              target_path_or_url,
+              TRUE, TRUE, TRUE,  /* allow_* */
+              ctx, pool, pool));
+  else
+    SVN_ERR(svn_client__find_symmetric_merge_no_wc(
+              &the_merge,
+              source_path_or_url, source_revision,
+              target_path_or_url, target_revision,
+              ctx, pool, pool));
+
+  SVN_ERR(svn_client__symmetric_merge_get_locations(
+            &yca, &base, &right, &target, the_merge, pool));
+  reintegrate_like = svn_client__symmetric_merge_is_reintegrate_like(the_merge);
+
+  SVN_ERR(mergeinfo_diagram(yca, base, right, target,
+                            target_is_wc, reintegrate_like,
+                            pool));
+
+  return SVN_NO_ERROR;
+}
+
 /* This implements the `svn_opt_subcommand_t' interface. */
 svn_error_t *
 svn_cl__mergeinfo(apr_getopt_t *os,
@@ -140,5 +329,11 @@ svn_cl__mergeinfo(apr_getopt_t *os,
                                         TRUE, depth, NULL, ctx,
                                         pool));
     }
+  else
+    {
+      SVN_ERR(mergeinfo_summary(source, &src_peg_revision,
+                                target, &tgt_peg_revision,
+                                ctx, pool));
+    }
   return SVN_NO_ERROR;
 }

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

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

Modified: subversion/branches/10Gb/subversion/svn/status-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/10Gb/subversion/svn/status-cmd.c?rev=1390960&r1=1390959&r2=1390960&view=diff
==============================================================================
--- subversion/branches/10Gb/subversion/svn/status-cmd.c (original)
+++ subversion/branches/10Gb/subversion/svn/status-cmd.c Thu Sep 27 12:13:36 2012
@@ -377,7 +377,7 @@ svn_cl__status(apr_getopt_t *os,
              ### non-changelist entries. */
           if (opt_state->xml)
             {
-              svn_stringbuf_set(buf, "");
+              svn_stringbuf_setempty(buf);
               svn_xml_make_open_tag(&buf, scratch_pool, svn_xml_normal,
                                     "changelist", "name", changelist_name,
                                     NULL);
@@ -398,7 +398,7 @@ svn_cl__status(apr_getopt_t *os,
 
           if (opt_state->xml)
             {
-              svn_stringbuf_set(buf, "");
+              svn_stringbuf_setempty(buf);
               svn_xml_make_close_tag(&buf, scratch_pool, "changelist");
               SVN_ERR(svn_cl__error_checked_fputs(buf->data, stdout));
             }

Modified: subversion/branches/10Gb/subversion/svn/switch-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/10Gb/subversion/svn/switch-cmd.c?rev=1390960&r1=1390959&r2=1390960&view=diff
==============================================================================
--- subversion/branches/10Gb/subversion/svn/switch-cmd.c (original)
+++ subversion/branches/10Gb/subversion/svn/switch-cmd.c Thu Sep 27 12:13:36 2012
@@ -192,16 +192,11 @@ svn_cl__switch(apr_getopt_t *os,
         return svn_error_compose_create(externals_err, err);
     }
 
-  if (opt_state->conflict_func
-      && svn_cl__notifier_check_conflicts(nwb.wrapped_baton))
-    {
-      err = svn_cl__resolve_conflicts(
-              svn_cl__notifier_get_conflicted_paths(nwb.wrapped_baton,
-                                                    scratch_pool),
-              depth, opt_state, ctx, scratch_pool);
-      if (err)
-        return svn_error_compose_create(externals_err, err);
-    }
+  err = svn_cl__resolve_postponed_conflicts(ctx->conflict_baton2,
+                                            opt_state->depth,
+                                            opt_state->accept_which,
+                                            opt_state->editor_cmd,
+                                            ctx, scratch_pool);
 
   return svn_error_compose_create(externals_err, err);
 }

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

Modified: subversion/branches/10Gb/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout
URL: http://svn.apache.org/viewvc/subversion/branches/10Gb/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout?rev=1390960&r1=1390959&r2=1390960&view=diff
==============================================================================
--- subversion/branches/10Gb/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout (original)
+++ subversion/branches/10Gb/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout Thu Sep 27 12:13:36 2012
@@ -111,8 +111,6 @@ Valid options:
                                -p, --show-c-function: Show C function name
   --search ARG             : use ARG as search pattern (glob syntax)
   --search-and ARG         : combine ARG with the previous search pattern
-  --isearch ARG            : like --search, but case-insensitive
-  --isearch-and ARG        : like --search-and, but case-insensitive
 
 Global options:
   --username ARG           : specify a username ARG

Modified: subversion/branches/10Gb/subversion/tests/cmdline/log_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/10Gb/subversion/tests/cmdline/log_tests.py?rev=1390960&r1=1390959&r2=1390960&view=diff
==============================================================================
--- subversion/branches/10Gb/subversion/tests/cmdline/log_tests.py (original)
+++ subversion/branches/10Gb/subversion/tests/cmdline/log_tests.py Thu Sep 27 12:13:36 2012
@@ -2296,9 +2296,9 @@ def log_search(sbox):
   log_chain = parse_log_output(output)
   check_log_chain(log_chain, [7, 6, 3])
 
-  # case-insensitive search
+  # search is case-insensitive
   exit_code, output, err = svntest.actions.run_and_verify_svn(
-                             None, None, [], 'log', '--isearch',
+                             None, None, [], 'log', '--search',
                              'FOR REVISION [367]')
 
   log_chain = parse_log_output(output)

Modified: subversion/branches/10Gb/subversion/tests/cmdline/mergeinfo_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/10Gb/subversion/tests/cmdline/mergeinfo_tests.py?rev=1390960&r1=1390959&r2=1390960&view=diff
==============================================================================
--- subversion/branches/10Gb/subversion/tests/cmdline/mergeinfo_tests.py (original)
+++ subversion/branches/10Gb/subversion/tests/cmdline/mergeinfo_tests.py Thu Sep 27 12:13:36 2012
@@ -70,7 +70,21 @@ def no_mergeinfo(sbox):
   sbox.build(create_wc=False)
   sbox.simple_repo_copy('A', 'A2')
   svntest.actions.run_and_verify_mergeinfo(adjust_error_for_server_version(""),
-                                           [],
+                                           "\n".join(
+["    youngest          last               repos."] +
+["    common            full     tip of    path of"] +
+["    ancestor          merge    branch    branch"] +
+[""] +
+["    1                          2       "] +
+["    |                          |       "] +
+["  ----------| ... |-------------         A"] +
+["     \                                 "] +
+["      \                                "] +
+["       -----| ... |-------------         A2"] +
+["                               |       "] +
+["                               WC      "] +
+[""]
+                                           ),
                                            sbox.repo_url + '/A',
                                            sbox.repo_url + '/A2')
 
@@ -94,7 +108,8 @@ def mergeinfo(sbox):
   svntest.actions.run_and_verify_mergeinfo(adjust_error_for_server_version(""),
                                            ['3'],
                                            sbox.repo_url + '/A',
-                                           sbox.ospath('A2'))
+                                           sbox.ospath('A2'),
+                                           "--show-revs=merged")
 
 @SkipUnless(server_has_mergeinfo)
 def explicit_mergeinfo_source(sbox):
@@ -132,13 +147,17 @@ def explicit_mergeinfo_source(sbox):
 
   # Check using each of our recorded merge sources (as paths and URLs).
   svntest.actions.run_and_verify_mergeinfo(adjust_error_for_server_version(""),
-                                           ['2', '4'], url(B2), path(B))
+                                           ['2', '4'], url(B2), path(B),
+                                           "--show-revs=merged")
   svntest.actions.run_and_verify_mergeinfo(adjust_error_for_server_version(""),
-                                           ['2', '4'], path(B2), path(B))
+                                           ['2', '4'], path(B2), path(B),
+                                           "--show-revs=merged")
   svntest.actions.run_and_verify_mergeinfo(adjust_error_for_server_version(""),
-                                           ['3', '5'], url(B3), path(B))
+                                           ['3', '5'], url(B3), path(B),
+                                           "--show-revs=merged")
   svntest.actions.run_and_verify_mergeinfo(adjust_error_for_server_version(""),
-                                           ['3', '5'], path(B3), path(B))
+                                           ['3', '5'], path(B3), path(B),
+                                           "--show-revs=merged")
 
 @SkipUnless(server_has_mergeinfo)
 def mergeinfo_non_source(sbox):
@@ -162,7 +181,8 @@ def mergeinfo_non_source(sbox):
 
   # Check on a source we haven't "merged" from.
   svntest.actions.run_and_verify_mergeinfo(adjust_error_for_server_version(""),
-                                           [], H2_url, H_path)
+                                           [], H2_url, H_path,
+                                           "--show-revs=merged")
 
 #----------------------------------------------------------------------
 # Issue #3138
@@ -238,7 +258,8 @@ def non_inheritable_mergeinfo(sbox):
   svntest.actions.run_and_verify_mergeinfo(adjust_error_for_server_version(""),
                                            ['4','6*'],
                                            sbox.repo_url + '/A',
-                                           A_COPY_path)
+                                           A_COPY_path,
+                                           '--show-revs', 'merged')
   svntest.actions.run_and_verify_mergeinfo(adjust_error_for_server_version(""),
                                            ['3','5','6*'],
                                            sbox.repo_url + '/A',
@@ -249,7 +270,8 @@ def non_inheritable_mergeinfo(sbox):
   svntest.actions.run_and_verify_mergeinfo(adjust_error_for_server_version(""),
                                            ['4'],
                                            sbox.repo_url + '/A/D',
-                                           D_COPY_path)
+                                           D_COPY_path,
+                                           '--show-revs', 'merged')
   svntest.actions.run_and_verify_mergeinfo(adjust_error_for_server_version(""),
                                            ['3','6'],
                                            sbox.repo_url + '/A/D',

Modified: subversion/branches/10Gb/subversion/tests/cmdline/patch_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/10Gb/subversion/tests/cmdline/patch_tests.py?rev=1390960&r1=1390959&r2=1390960&view=diff
==============================================================================
--- subversion/branches/10Gb/subversion/tests/cmdline/patch_tests.py (original)
+++ subversion/branches/10Gb/subversion/tests/cmdline/patch_tests.py Thu Sep 27 12:13:36 2012
@@ -4099,6 +4099,61 @@ def patch_add_and_delete(sbox):
                                        1, # check-props
                                        1) # dry-run
 
+
+def patch_git_with_index_line(sbox):
+  "apply git patch with 'index' line"
+
+  sbox.build(read_only = True)
+  wc_dir = sbox.wc_dir
+  patch_file_path = make_patch_path(sbox)
+
+  unidiff_patch = [
+    "diff --git a/src/tools/ConsoleRunner/hi.txt b/src/tools/ConsoleRunner/hi.txt\n",
+    "new file mode 100644\n",
+    "index 0000000..c82a38f\n",
+    "--- /dev/null\n",
+    "+++ b/src/tools/ConsoleRunner/hi.txt\n",
+    "@@ -0,0 +1 @@\n",
+    "+hihihihihihi\n",
+    "\ No newline at end of file\n",
+  ]
+
+  svntest.main.file_write(patch_file_path, ''.join(unidiff_patch))
+
+  expected_output = [
+    'A         %s\n' % sbox.ospath('src'),
+    'A         %s\n' % sbox.ospath('src/tools'),
+    'A         %s\n' % sbox.ospath('src/tools/ConsoleRunner'),
+    'A         %s\n' % sbox.ospath('src/tools/ConsoleRunner/hi.txt'),
+  ]
+
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+  expected_status.add({
+      'src/'                            : Item(status='A ', wc_rev=0),
+      'src/tools'                       : Item(status='A ', wc_rev=0),
+      'src/tools/ConsoleRunner/'        : Item(status='A ', wc_rev=0),
+      'src/tools/ConsoleRunner/hi.txt'  : Item(status='A ', wc_rev=0),
+  })
+
+  expected_disk = svntest.main.greek_state.copy()
+  expected_disk.add({'src'                            : Item(),
+                     'src/tools'                      : Item(),
+                     'src/tools/ConsoleRunner'        : Item(),
+                     'src/tools/ConsoleRunner/hi.txt' :
+                        Item(contents="hihihihihihi")
+                   })
+
+  expected_skip = wc.State('', { })
+
+  svntest.actions.run_and_verify_patch(wc_dir, os.path.abspath(patch_file_path),
+                                       expected_output,
+                                       expected_disk,
+                                       expected_status,
+                                       expected_skip,
+                                       None, # expected err
+                                       1, # check-props
+                                       1) # dry-run
+
 ########################################################################
 #Run the tests
 
@@ -4143,6 +4198,7 @@ test_list = [ None,
               patch_delete_and_skip,
               patch_target_no_eol_at_eof,
               patch_add_and_delete,
+              patch_git_with_index_line,
             ]
 
 if __name__ == '__main__':

Modified: subversion/branches/10Gb/subversion/tests/cmdline/stat_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/10Gb/subversion/tests/cmdline/stat_tests.py?rev=1390960&r1=1390959&r2=1390960&view=diff
==============================================================================
--- subversion/branches/10Gb/subversion/tests/cmdline/stat_tests.py (original)
+++ subversion/branches/10Gb/subversion/tests/cmdline/stat_tests.py Thu Sep 27 12:13:36 2012
@@ -986,25 +986,19 @@ def status_ignored_dir(sbox):
 
 #----------------------------------------------------------------------
 
-@Issue(2030)
-def status_unversioned_dir(sbox):
-  "status on unversioned dir"
-  sbox.build(read_only = True, create_wc = False)
-  dir = sbox.wc_dir
-  svntest.main.safe_rmtree(sbox.wc_dir)
-  os.mkdir(dir)
-
-  # Depending on whether you run the tests below a working copy
-  # or not, the error message might either be something like
-  # svn: warning: W155007: '...copies/stat_tests-19' is not a working copy
-  # or
-  # svn: warning: W155010: The node '...copies/stat_tests-19' was not found.
+def status_unversioned_dir_in_wc(sbox):
+  "status on unversioned dir in working copy"
+  sbox.build(read_only = True)
+
+  # Create two unversioned directories within the test working copy
+  path = sbox.ospath('1/2')
+  os.makedirs(path)
 
   expected_err = "svn: warning: W1550(07|10): .*'.*(/|\\\\)" + \
-                 os.path.basename(dir) + \
-                 "' (is not a working copy|was not found)"
+                 os.path.basename(path) + \
+                 "' was not found"
   svntest.actions.run_and_verify_svn2(None, [], expected_err, 0,
-                                      "status", dir, dir)
+                                      "status", path)
 
 #----------------------------------------------------------------------
 
@@ -1883,14 +1877,6 @@ def status_nested_wc_old_format(sbox):
   os.chdir(wc_dir)
   svntest.actions.run_and_verify_svn(None, [ "?       subdir\n" ], [], 'st')
 
-########################################################################
-# Run the tests
-
-
-def simple_lock(sbox, relpath):
-  path = os.path.join(sbox.wc_dir, relpath)
-  svntest.actions.run_and_verify_svn(None, None, [], 'lock', path)
-
 #----------------------------------------------------------------------
 # Regression test for issue #3855 "status doesn't show 'K' on a locked
 # deleted node".
@@ -1902,7 +1888,8 @@ def status_locked_deleted(sbox):
   iota_path = sbox.ospath('iota')
 
   sbox.simple_rm('iota')
-  simple_lock(sbox, 'iota')
+  svntest.actions.run_and_verify_svn(None, None, [], 'lock',
+                                     os.path.join(sbox.wc_dir, 'iota'))
   svntest.actions.run_and_verify_svn(None, ['D    K  %s\n' % iota_path], [],
                                      'status', iota_path)
 
@@ -2036,6 +2023,19 @@ def status_not_present(sbox):
                                      sbox.ospath('A/mu'),
                                      sbox.ospath('no-file'))
 
+# Skip this test is a .svn dir exists in the root directory
+@Skip(lambda: os.path.exists("/%s" % svntest.main.get_admin_name())) 
+def status_unversioned_dir(sbox):
+  "status on unversioned dir"
+  sbox.build(read_only = True, create_wc = False)
+
+  # Run svn status on "/", which we assume exists and isn't a WC.
+  # This should work on UNIX-like systems and Windows systems
+  expected_err = "svn: warning: W1550(07|10): .*'.*(/|\\\\)" + \
+                 "' is not a working copy"
+  svntest.actions.run_and_verify_svn2(None, [], expected_err, 0,
+                                      "status", "/")
+
 ########################################################################
 # Run the tests
 
@@ -2060,7 +2060,7 @@ test_list = [ None,
               missing_dir_in_anchor,
               status_in_xml,
               status_ignored_dir,
-              status_unversioned_dir,
+              status_unversioned_dir_in_wc,
               status_missing_dir,
               status_nonrecursive_update_different_cwd,
               status_add_plus_conflict,
@@ -2080,6 +2080,7 @@ test_list = [ None,
               wclock_status,
               modified_modulo_translation,
               status_not_present,
+              status_unversioned_dir,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/10Gb/subversion/tests/cmdline/svntest/actions.py
URL: http://svn.apache.org/viewvc/subversion/branches/10Gb/subversion/tests/cmdline/svntest/actions.py?rev=1390960&r1=1390959&r2=1390960&view=diff
==============================================================================
--- subversion/branches/10Gb/subversion/tests/cmdline/svntest/actions.py (original)
+++ subversion/branches/10Gb/subversion/tests/cmdline/svntest/actions.py Thu Sep 27 12:13:36 2012
@@ -1266,9 +1266,9 @@ def run_and_verify_mergeinfo(error_re_st
                              expected_output = [],
                              *args):
   """Run 'svn mergeinfo ARGS', and compare the result against
-  EXPECTED_OUTPUT, a list of string representations of revisions
-  expected in the output.  Raise an exception if an unexpected
-  output is encountered."""
+  EXPECTED_OUTPUT, which is either a list of string representations
+  of revisions expected in the output, or a plain string.
+  Raise an exception if an unexpected output is encountered."""
 
   mergeinfo_command = ["mergeinfo"]
   mergeinfo_command.extend(args)
@@ -1281,23 +1281,36 @@ def run_and_verify_mergeinfo(error_re_st
     verify.verify_outputs(None, None, err, None, expected_err)
     return
 
-  out = [_f for _f in [x.rstrip()[1:] for x in out] if _f]
-  expected_output.sort()
-  extra_out = []
-  if out != expected_output:
-    exp_hash = dict.fromkeys(expected_output)
-    for rev in out:
-      if rev in exp_hash:
-        del(exp_hash[rev])
-      else:
-        extra_out.append(rev)
-    extra_exp = list(exp_hash.keys())
-    raise Exception("Unexpected 'svn mergeinfo' output:\n"
-                    "  expected but not found: %s\n"
-                    "  found but not expected: %s"
-                    % (', '.join([str(x) for x in extra_exp]),
-                       ', '.join([str(x) for x in extra_out])))
-
+  if isinstance(expected_output, list):
+    out = [_f for _f in [x.rstrip()[1:] for x in out] if _f]
+    expected_output.sort()
+    extra_out = []
+    if out != expected_output:
+      exp_hash = dict.fromkeys(expected_output)
+      for rev in out:
+        if rev in exp_hash:
+          del(exp_hash[rev])
+        else:
+          extra_out.append(rev)
+      extra_exp = list(exp_hash.keys())
+      raise Exception("Unexpected 'svn mergeinfo' output:\n"
+                      "  expected but not found: %s\n"
+                      "  found but not expected: %s"
+                      % (', '.join([str(x) for x in extra_exp]),
+                         ', '.join([str(x) for x in extra_out])))
+  elif isinstance(expected_output, str):
+    out = "".join(out)
+    if out != expected_output:
+      raise Exception("Unexpected 'svn mergeinfo' output:\n"
+                      "  expected:\n%s\n"
+                      "  found:\n%s\n"
+                      "  diff:\n%s\n"
+                      % (expected_output, out,
+                         '\n'.join(difflib.unified_diff(
+                                     expected_output.splitlines(),
+                                     out.splitlines()))))
+  else:
+    raise Exception("expected_output has unexpected type")
 
 def run_and_verify_switch(wc_dir_name,
                           wc_target,

Modified: subversion/branches/10Gb/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/branches/10Gb/subversion/tests/cmdline/svntest/main.py?rev=1390960&r1=1390959&r2=1390960&view=diff
==============================================================================
--- subversion/branches/10Gb/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/branches/10Gb/subversion/tests/cmdline/svntest/main.py Thu Sep 27 12:13:36 2012
@@ -1232,7 +1232,6 @@ class TestSpawningThread(threading.Threa
   def __init__(self, queue, progress_func, tests_total):
     threading.Thread.__init__(self)
     self.queue = queue
-    self.lock = threading.Lock()
     self.results = []
     self.progress_func = progress_func
     self.tests_total = tests_total
@@ -1240,21 +1239,16 @@ class TestSpawningThread(threading.Threa
   def run(self):
     while True:
       try:
-        self.lock.acquire()
         next_index = self.queue.get_nowait()
       except queue.Empty:
         return
-      finally:
-        self.lock.release()
 
       self.run_one(next_index)
 
       # signal progress
       if self.progress_func:
-        self.lock.acquire()
         self.progress_func(self.tests_total - self.queue.qsize(),
                            self.tests_total)
-        self.lock.release()
 
   def run_one(self, index):
     command = os.path.abspath(sys.argv[0])

Modified: subversion/branches/10Gb/tools/dev/unix-build/Makefile.svn
URL: http://svn.apache.org/viewvc/subversion/branches/10Gb/tools/dev/unix-build/Makefile.svn?rev=1390960&r1=1390959&r2=1390960&view=diff
==============================================================================
--- subversion/branches/10Gb/tools/dev/unix-build/Makefile.svn (original)
+++ subversion/branches/10Gb/tools/dev/unix-build/Makefile.svn Thu Sep 27 12:13:36 2012
@@ -1362,10 +1362,17 @@ endif
 libpath:
 	@echo export LD_LIBRARY_PATH="$(LD_LIBRARY_PATH):$$LD_LIBRARY_PATH" \
 		"PYTHONPATH=$(SVN_PREFIX)/lib/svn-python"
+#
+# OpenBSD requires an LD_PRELOAD hack to dlopen() libraries linked to
+# libpthread (e.g. libsvn_auth_gnome_keyring.so) into executables that
+# aren't linked to libpthread.
+ifeq ($(UNAME),OpenBSD)
+LIB_PTHREAD_HACK=LD_PRELOAD=libpthread.so
+endif
 
 .PHONY: start-svnserve stop-svnserve start-httpd stop-httpd
 
-HTTPD_CMD = env LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) \
+HTTPD_CMD = env LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) $(LIB_PTHREAD_HACK) \
 		$(PREFIX)/httpd/bin/apachectl -f $(HTTPD_CHECK_CONF)
 HTTPD_START_CMD = $(HTTPD_CMD) -k start
 HTTPD_START_CMD_DEBUG = $(HTTPD_START_CMD) -X
@@ -1408,13 +1415,6 @@ start-svnserve: $(SVN_OBJDIR)/.compiled
 stop-svnserve:
 	$(SVNSERVE_STOP_CMD)
 
-# OpenBSD requires an LD_PRELOAD hack to dlopen() libraries linked to
-# libpthread (e.g. libsvn_auth_gnome_keyring.so) into executables that
-# aren't linked to libpthread.
-ifeq ($(UNAME),OpenBSD)
-LIB_PTHREAD_HACK=LD_PRELOAD=libpthread.so
-endif
-
 define do_check
 -cd $(svn_builddir) && for fs in fsfs bdb; do \
     echo "Begin test: $(subst svn-check-,,$@) x $$fs"; \

Propchange: subversion/branches/10Gb/tools/dist/make-deps-tarball.sh
------------------------------------------------------------------------------
  Merged /subversion/trunk/tools/dist/make-deps-tarball.sh:r1387980-1390956

Propchange: subversion/branches/10Gb/tools/server-side/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Thu Sep 27 12:13:36 2012
@@ -2,3 +2,4 @@
 svn-populate-node-origins-index
 svnauthz-validate
 svn-rep-sharing-stats
+fsfs-reorg

Modified: subversion/branches/10Gb/tools/server-side/svnpubsub/svnwcsub.py
URL: http://svn.apache.org/viewvc/subversion/branches/10Gb/tools/server-side/svnpubsub/svnwcsub.py?rev=1390960&r1=1390959&r2=1390960&view=diff
==============================================================================
--- subversion/branches/10Gb/tools/server-side/svnpubsub/svnwcsub.py (original)
+++ subversion/branches/10Gb/tools/server-side/svnpubsub/svnwcsub.py Thu Sep 27 12:13:36 2012
@@ -226,8 +226,11 @@ class BackgroundWorker(threading.Thread)
             operation, wc = self.q.get()
 
             # Warn if the queue is too long.
-            if operation != OP_BOOT and self.q.qsize() > BACKLOG_TOO_HIGH:
-                logging.warn('worker backlog is at %d', self.q.qsize())
+            # (Note: the other thread might have added entries to self.q
+            # after the .get() and before the .qsize().)
+            qsize = self.q.qsize()+1
+            if operation != OP_BOOT and qsize > BACKLOG_TOO_HIGH:
+                logging.warn('worker backlog is at %d', qsize)
 
             try:
                 if operation == OP_UPDATE: