You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by pb...@apache.org on 2012/06/26 21:28:22 UTC

svn commit: r1354186 [26/33] - in /subversion/branches/inheritable-props: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ build/win32/ contrib/client-side/emacs/ contrib/server-side/ notes/ notes/api-errata/1.8/ notes/directory-i...

Modified: subversion/branches/inheritable-props/subversion/svn/blame-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/svn/blame-cmd.c?rev=1354186&r1=1354185&r2=1354186&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/svn/blame-cmd.c (original)
+++ subversion/branches/inheritable-props/subversion/svn/blame-cmd.c Tue Jun 26 19:26:49 2012
@@ -203,11 +203,11 @@ blame_receiver(void *baton,
          we may need to adjust this. */
       if (merged_revision < revision)
         {
-          SVN_ERR(svn_stream_printf(out, pool, "G "));
+          SVN_ERR(svn_stream_puts(out, "G "));
           use_merged = TRUE;
         }
       else
-        SVN_ERR(svn_stream_printf(out, pool, "  "));
+        SVN_ERR(svn_stream_puts(out, "  "));
     }
 
   if (use_merged)

Modified: subversion/branches/inheritable-props/subversion/svn/cl.h
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/svn/cl.h?rev=1354186&r1=1354185&r2=1354186&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/svn/cl.h (original)
+++ subversion/branches/inheritable-props/subversion/svn/cl.h Tue Jun 26 19:26:49 2012
@@ -163,7 +163,6 @@ typedef struct svn_cl__opt_state_t
   svn_boolean_t no_unlock;
 
   const char *message;           /* log message */
-  const char *ancestor_path;     /* ### todo: who sets this? */
   svn_boolean_t force;           /* be more forceful, as in "svn rm -f ..." */
   svn_boolean_t force_log;       /* force validity of a suspect log msg file */
   svn_boolean_t incremental;     /* yield output suitable for concatenation */
@@ -183,16 +182,24 @@ typedef struct svn_cl__opt_state_t
   svn_boolean_t xml;             /* output in xml, e.g., "svn log --xml" */
   svn_boolean_t no_ignore;       /* disregard default ignores & svn:ignore's */
   svn_boolean_t no_auth_cache;   /* do not cache authentication information */
+  struct
+    {
+  const char *diff_cmd;          /* the external diff command to use */
+  svn_boolean_t internal_diff;    /* override diff_cmd in config file */
   svn_boolean_t no_diff_deleted; /* do not show diffs for deleted files */
-  svn_boolean_t ignore_props;    /* ignore properties */
   svn_boolean_t show_copies_as_adds; /* do not diff copies with their source */
   svn_boolean_t notice_ancestry; /* notice ancestry for diff-y operations */
+  svn_boolean_t summarize;       /* create a summary of a diff */
+  svn_boolean_t use_git_diff_format; /* Use git's extended diff format */
+  svn_boolean_t ignore_properties; /* ignore properties */
+  svn_boolean_t properties_only;   /* Show properties only */
+  svn_boolean_t patch_compatible; /* Output compatible with GNU patch */
+    } diff;
   svn_boolean_t ignore_ancestry; /* ignore ancestry for merge-y operations */
   svn_boolean_t ignore_externals;/* ignore externals definitions */
   svn_boolean_t stop_on_copy;    /* don't cross copies during processing */
   svn_boolean_t dry_run;         /* try operation but make no changes */
   svn_boolean_t revprop;         /* operate on a revision property */
-  const char *diff_cmd;          /* the external diff command to use */
   const char *merge_cmd;         /* the external merge command to use */
   const char *editor_cmd;        /* the external editor command to use */
   svn_boolean_t record_only;     /* whether to record mergeinfo */
@@ -205,7 +212,6 @@ typedef struct svn_cl__opt_state_t
   svn_boolean_t autoprops;       /* enable automatic properties */
   svn_boolean_t no_autoprops;    /* disable automatic properties */
   const char *native_eol;        /* override system standard eol marker */
-  svn_boolean_t summarize;       /* create a summary of a diff */
   svn_boolean_t remove;          /* deassociate a changelist */
   apr_array_header_t *changelists; /* changelist filters */
   const char *changelist;        /* operate on this changelist
@@ -229,9 +235,6 @@ typedef struct svn_cl__opt_state_t
   svn_boolean_t ignore_whitespace; /* don't account for whitespace when
                                       patching */
   svn_boolean_t show_diff;        /* produce diff output (maps to --diff) */
-  svn_boolean_t internal_diff;    /* override diff_cmd in config file */
-  svn_boolean_t use_git_diff_format; /* Use git's extended diff format */
-  svn_boolean_t use_patch_diff_format; /* Output compatible with GNU patch */
   svn_boolean_t allow_mixed_rev; /* Allow operation on mixed-revision WC */
   svn_boolean_t include_externals; /* Recurses (in)to file & dir externals */
   svn_boolean_t show_inherited_props; /* get inherited properties */
@@ -333,13 +336,15 @@ typedef struct svn_cl__conflict_baton_t 
   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, 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_cl__conflict_baton_t *
-svn_cl__conflict_baton_make(svn_cl__accept_t accept_which,
+/* 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,
@@ -351,9 +356,10 @@ svn_cl__conflict_baton_make(svn_cl__acce
    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_description_t *desc,
+                         const svn_wc_conflict_description2_t *desc,
                          void *baton,
-                         apr_pool_t *pool);
+                         apr_pool_t *result_pool,
+                         apr_pool_t *scratch_pool);
 
 
 

Modified: subversion/branches/inheritable-props/subversion/svn/conflict-callbacks.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/svn/conflict-callbacks.c?rev=1354186&r1=1354185&r2=1354186&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/svn/conflict-callbacks.c (original)
+++ subversion/branches/inheritable-props/subversion/svn/conflict-callbacks.c Tue Jun 26 19:26:49 2012
@@ -30,30 +30,34 @@
 
 #include "svn_cmdline.h"
 #include "svn_client.h"
+#include "svn_dirent_uri.h"
 #include "svn_types.h"
 #include "svn_pools.h"
 
 #include "cl.h"
+#include "tree-conflicts.h"
 
 #include "svn_private_config.h"
 
 
 
 
-svn_cl__conflict_baton_t *
-svn_cl__conflict_baton_make(svn_cl__accept_t accept_which,
+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__conflict_baton_t *b = apr_palloc(pool, sizeof(*b));
-  b->accept_which = accept_which;
-  b->config = config;
-  b->editor_cmd = editor_cmd;
-  b->external_failed = FALSE;
-  b->pb = pb;
-  return b;
+  *b = apr_palloc(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));
+  return SVN_NO_ERROR;
 }
 
 svn_cl__accept_t
@@ -95,7 +99,7 @@ svn_cl__accept_from_word(const char *wor
 /* Print on stdout a diff between the 'base' and 'merged' files, if both of
  * those are available, else between 'their' and 'my' files, of DESC. */
 static svn_error_t *
-show_diff(const svn_wc_conflict_description_t *desc,
+show_diff(const svn_wc_conflict_description2_t *desc,
           apr_pool_t *pool)
 {
   const char *path1, *path2;
@@ -103,18 +107,18 @@ show_diff(const svn_wc_conflict_descript
   svn_stream_t *output;
   svn_diff_file_options_t *options;
 
-  if (desc->merged_file && desc->base_file)
+  if (desc->merged_file && desc->base_abspath)
     {
       /* Show the conflict markers to the user */
-      path1 = desc->base_file;
+      path1 = desc->base_abspath;
       path2 = desc->merged_file;
     }
   else
     {
       /* There's no base file, but we can show the
          difference between mine and theirs. */
-      path1 = desc->their_file;
-      path2 = desc->my_file;
+      path1 = desc->their_abspath;
+      path2 = desc->my_abspath;
     }
 
   options = svn_diff_file_options_create(pool);
@@ -134,7 +138,7 @@ show_diff(const svn_wc_conflict_descript
 /* Print on stdout just the conflict hunks of a diff among the 'base', 'their'
  * and 'my' files of DESC. */
 static svn_error_t *
-show_conflicts(const svn_wc_conflict_description_t *desc,
+show_conflicts(const svn_wc_conflict_description2_t *desc,
                apr_pool_t *pool)
 {
   svn_diff_t *diff;
@@ -145,16 +149,16 @@ show_conflicts(const svn_wc_conflict_des
   options->ignore_eol_style = TRUE;
   SVN_ERR(svn_stream_for_stdout(&output, pool));
   SVN_ERR(svn_diff_file_diff3_2(&diff,
-                                desc->base_file,
-                                desc->my_file,
-                                desc->their_file,
+                                desc->base_abspath,
+                                desc->my_abspath,
+                                desc->their_abspath,
                                 options, pool));
   /* ### Consider putting the markers/labels from
      ### svn_wc__merge_internal in the conflict description. */
   return svn_diff_file_output_merge2(output, diff,
-                                     desc->base_file,
-                                     desc->my_file,
-                                     desc->their_file,
+                                     desc->base_abspath,
+                                     desc->my_abspath,
+                                     desc->their_abspath,
                                      _("||||||| ORIGINAL"),
                                      _("<<<<<<< MINE (select with 'mc')"),
                                      _(">>>>>>> THEIRS (select with 'tc')"),
@@ -175,7 +179,7 @@ show_conflicts(const svn_wc_conflict_des
  * return that error. */
 static svn_error_t *
 open_editor(svn_boolean_t *performed_edit,
-            const svn_wc_conflict_description_t *desc,
+            const svn_wc_conflict_description2_t *desc,
             svn_cl__conflict_baton_t *b,
             apr_pool_t *pool)
 {
@@ -223,15 +227,16 @@ open_editor(svn_boolean_t *performed_edi
  * return that error.  */
 static svn_error_t *
 launch_resolver(svn_boolean_t *performed_edit,
-                const svn_wc_conflict_description_t *desc,
+                const svn_wc_conflict_description2_t *desc,
                 svn_cl__conflict_baton_t *b,
                 apr_pool_t *pool)
 {
   svn_error_t *err;
 
-  err = svn_cl__merge_file_externally(desc->base_file, desc->their_file,
-                                      desc->my_file, desc->merged_file,
-                                      desc->path, b->config, NULL, pool);
+  err = svn_cl__merge_file_externally(desc->base_abspath, desc->their_abspath,
+                                      desc->my_abspath, desc->merged_file,
+                                      desc->local_abspath, b->config, NULL,
+                                      pool);
   if (err && err->apr_err == SVN_ERR_CL_NO_EXTERNAL_MERGE_TOOL)
     {
       SVN_ERR(svn_cmdline_fprintf(stderr, pool, "%s\n",
@@ -255,13 +260,14 @@ launch_resolver(svn_boolean_t *performed
 }
 
 
-/* Implement svn_wc_conflict_resolver_func_t; resolves based on
+/* 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_description_t *desc,
+                         const svn_wc_conflict_description2_t *desc,
                          void *baton,
-                         apr_pool_t *pool)
+                         apr_pool_t *result_pool,
+                         apr_pool_t *scratch_pool)
 {
   svn_cl__conflict_baton_t *b = baton;
   svn_error_t *err;
@@ -269,7 +275,7 @@ svn_cl__conflict_handler(svn_wc_conflict
 
   /* Start out assuming we're going to postpone the conflict. */
   *result = svn_wc_create_conflict_result(svn_wc_conflict_choose_postpone,
-                                          NULL, pool);
+                                          NULL, result_pool);
 
   switch (b->accept_which)
     {
@@ -308,10 +314,11 @@ svn_cl__conflict_handler(svn_wc_conflict
             }
 
           err = svn_cl__edit_file_externally(desc->merged_file,
-                                             b->editor_cmd, b->config, pool);
+                                             b->editor_cmd, b->config,
+                                             scratch_pool);
           if (err && (err->apr_err == SVN_ERR_CL_NO_EXTERNAL_EDITOR))
             {
-              SVN_ERR(svn_cmdline_fprintf(stderr, pool, "%s\n",
+              SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool, "%s\n",
                                           err->message ? err->message :
                                           _("No editor found;"
                                             " leaving all conflicts.")));
@@ -320,7 +327,7 @@ svn_cl__conflict_handler(svn_wc_conflict
             }
           else if (err && (err->apr_err == SVN_ERR_EXTERNAL_PROGRAM))
             {
-              SVN_ERR(svn_cmdline_fprintf(stderr, pool, "%s\n",
+              SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool, "%s\n",
                                           err->message ? err->message :
                                           _("Error running editor;"
                                             " leaving all conflicts.")));
@@ -335,8 +342,8 @@ svn_cl__conflict_handler(svn_wc_conflict
       /* else, fall through to prompting. */
       break;
     case svn_cl__accept_launch:
-      if (desc->base_file && desc->their_file
-          && desc->my_file && desc->merged_file)
+      if (desc->base_abspath && desc->their_abspath
+          && desc->my_abspath && desc->merged_file)
         {
           svn_boolean_t remains_in_conflict;
 
@@ -346,17 +353,17 @@ svn_cl__conflict_handler(svn_wc_conflict
               return SVN_NO_ERROR;
             }
 
-          err = svn_cl__merge_file_externally(desc->base_file,
-                                              desc->their_file,
-                                              desc->my_file,
+          err = svn_cl__merge_file_externally(desc->base_abspath,
+                                              desc->their_abspath,
+                                              desc->my_abspath,
                                               desc->merged_file,
-                                              desc->path,
+                                              desc->local_abspath,
                                               b->config,
                                               &remains_in_conflict,
-                                              pool);
+                                              scratch_pool);
           if (err && err->apr_err == SVN_ERR_CL_NO_EXTERNAL_MERGE_TOOL)
             {
-              SVN_ERR(svn_cmdline_fprintf(stderr, pool, "%s\n",
+              SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool, "%s\n",
                                           err->message ? err->message :
                                           _("No merge tool found;"
                                             " leaving all conflicts.")));
@@ -365,7 +372,7 @@ svn_cl__conflict_handler(svn_wc_conflict
             }
           else if (err && err->apr_err == SVN_ERR_EXTERNAL_PROGRAM)
             {
-              SVN_ERR(svn_cmdline_fprintf(stderr, pool, "%s\n",
+              SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool, "%s\n",
                                           err->message ? err->message :
                                           _("Error running merge tool;"
                                             " leaving all conflicts.")));
@@ -387,7 +394,7 @@ svn_cl__conflict_handler(svn_wc_conflict
 
   /* We're in interactive mode and either the user gave no --accept
      option or the option did not apply; let's prompt. */
-  subpool = svn_pool_create(pool);
+  subpool = svn_pool_create(scratch_pool);
 
   /* Handle the most common cases, which is either:
 
@@ -411,26 +418,31 @@ svn_cl__conflict_handler(svn_wc_conflict
 
       if (desc->kind == svn_wc_conflict_kind_text)
         SVN_ERR(svn_cmdline_fprintf(stderr, subpool,
-                                    _("Conflict discovered in '%s'.\n"),
-                                    desc->path));
+                                    _("Conflict discovered in file '%s'.\n"),
+                                    svn_cl__local_style_skip_ancestor(
+                                      b->path_prefix, desc->local_abspath,
+                                      subpool)));
       else if (desc->kind == svn_wc_conflict_kind_property)
         {
           SVN_ERR(svn_cmdline_fprintf(stderr, subpool,
                                       _("Conflict for property '%s' discovered"
                                         " on '%s'.\n"),
-                                      desc->property_name, desc->path));
+                                      desc->property_name,
+                                      svn_cl__local_style_skip_ancestor(
+                                        b->path_prefix, desc->local_abspath,
+                                        subpool)));
 
-          if ((!desc->my_file && desc->their_file)
-              || (desc->my_file && !desc->their_file))
+          if ((!desc->my_abspath && desc->their_abspath)
+              || (desc->my_abspath && !desc->their_abspath))
             {
               /* One agent wants to change the property, one wants to
                  delete it.  This is not something we can diff, so we
                  just tell the user. */
               svn_stringbuf_t *myval = NULL, *theirval = NULL;
 
-              if (desc->my_file)
+              if (desc->my_abspath)
                 {
-                  SVN_ERR(svn_stringbuf_from_file2(&myval, desc->my_file,
+                  SVN_ERR(svn_stringbuf_from_file2(&myval, desc->my_abspath,
                                                    subpool));
                   SVN_ERR(svn_cmdline_fprintf(stderr, subpool,
                         _("They want to delete the property, "
@@ -439,7 +451,8 @@ svn_cl__conflict_handler(svn_wc_conflict
                 }
               else
                 {
-                  SVN_ERR(svn_stringbuf_from_file2(&theirval, desc->their_file,
+                  SVN_ERR(svn_stringbuf_from_file2(&theirval,
+                                                   desc->their_abspath,
                                                    subpool));
                   SVN_ERR(svn_cmdline_fprintf(stderr, subpool,
                         _("They want to change the property value to '%s', "
@@ -456,8 +469,8 @@ svn_cl__conflict_handler(svn_wc_conflict
          markers to the user (this is the typical 3-way merge
          scenario), or if no base is available, we can show a diff
          between mine and theirs. */
-      if ((desc->merged_file && desc->base_file)
-          || (!desc->base_file && desc->my_file && desc->their_file))
+      if ((desc->merged_file && desc->base_abspath)
+          || (!desc->base_abspath && desc->my_abspath && desc->their_abspath))
         diff_allowed = TRUE;
 
       while (TRUE)
@@ -614,7 +627,8 @@ svn_cl__conflict_handler(svn_wc_conflict
                                                 "properties.\n\n")));
                   continue;
                 }
-              else if (! (desc->my_file && desc->base_file && desc->their_file))
+              else if (! (desc->my_abspath && desc->base_abspath &&
+                          desc->their_abspath))
                 {
                   SVN_ERR(svn_cmdline_fprintf(stderr, subpool,
                                               _("Invalid option; original "
@@ -654,8 +668,8 @@ svn_cl__conflict_handler(svn_wc_conflict
                                                 "\n\n")));
                   continue;
                 }
-              if (desc->base_file && desc->their_file && desc->my_file
-                    && desc->merged_file)
+              if (desc->base_abspath && desc->their_abspath &&
+                  desc->my_abspath && desc->merged_file)
                 {
                   SVN_ERR(launch_resolver(&performed_edit, desc, b, subpool));
                   if (performed_edit)
@@ -709,7 +723,9 @@ svn_cl__conflict_handler(svn_wc_conflict
                    stderr, subpool,
                    _("Conflict discovered when trying to add '%s'.\n"
                      "An object of the same name already exists.\n"),
-                   desc->path));
+                   svn_cl__local_style_skip_ancestor(b->path_prefix,
+                                                     desc->local_abspath,
+                                                     subpool)));
       prompt = _("Select: (p) postpone, (mf) mine-full, "
                  "(tf) theirs-full, (h) help:");
 
@@ -747,6 +763,49 @@ svn_cl__conflict_handler(svn_wc_conflict
         }
     }
 
+  else if (desc->kind == svn_wc_conflict_kind_tree)
+    {
+      const char *answer;
+      const char *prompt;
+      const char *readable_desc;
+
+      SVN_ERR(svn_cl__get_human_readable_tree_conflict_description(
+               &readable_desc, desc, scratch_pool));
+      SVN_ERR(svn_cmdline_fprintf(
+                   stderr, subpool,
+                   _("Tree conflict on '%s'\n   > %s\n"),
+                   svn_cl__local_style_skip_ancestor(b->path_prefix,
+                                                     desc->local_abspath,
+                                                     scratch_pool),
+                   readable_desc));
+
+      prompt = _("Select: (p) postpone, (r) mark-resolved, (h) help: ");
+
+      while (1)
+        {
+          svn_pool_clear(subpool);
+
+          SVN_ERR(svn_cmdline_prompt_user2(&answer, prompt, b->pb, subpool));
+
+          if (strcmp(answer, "h") == 0 || strcmp(answer, "?") == 0)
+            {
+              SVN_ERR(svn_cmdline_fprintf(stderr, subpool,
+              _("  (p) postpone      - resolve the conflict later\n"
+                "  (r) resolved      - accept current working tree\n")));
+            }
+          if (strcmp(answer, "p") == 0 || strcmp(answer, ":-p") == 0)
+            {
+              (*result)->choice = svn_wc_conflict_choose_postpone;
+              break;
+            }
+          else if (strcmp(answer, "r") == 0)
+            {
+              (*result)->choice = svn_wc_conflict_choose_merged;
+              break;
+            }
+        }
+    }
+
   else /* other types of conflicts -- do nothing about them. */
     {
       (*result)->choice = svn_wc_conflict_choose_postpone;

Modified: subversion/branches/inheritable-props/subversion/svn/diff-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/svn/diff-cmd.c?rev=1354186&r1=1354185&r2=1354186&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/svn/diff-cmd.c (original)
+++ subversion/branches/inheritable-props/subversion/svn/diff-cmd.c Tue Jun 26 19:26:49 2012
@@ -172,9 +172,9 @@ svn_cl__diff(apr_getopt_t *os,
   apr_pool_t *iterpool;
   svn_boolean_t pegged_diff = FALSE;
   svn_boolean_t show_copies_as_adds =
-    opt_state->use_patch_diff_format ? TRUE : opt_state->show_copies_as_adds;
-  svn_boolean_t ignore_prop_diff =
-    opt_state->use_patch_diff_format ? TRUE : opt_state->ignore_props;
+    opt_state->diff.patch_compatible || opt_state->diff.show_copies_as_adds;
+  svn_boolean_t ignore_properties =
+    opt_state->diff.patch_compatible || opt_state->diff.ignore_properties;
   int i;
   const svn_client_diff_summarize_func_t summarize_func =
     (opt_state->xml ? summarize_xml : summarize_regular);
@@ -194,7 +194,7 @@ svn_cl__diff(apr_getopt_t *os,
       svn_stringbuf_t *sb;
 
       /* Check that the --summarize is passed as well. */
-      if (!opt_state->summarize)
+      if (!opt_state->diff.summarize)
         return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
                                 _("'--xml' option only valid with "
                                   "'--summarize' option"));
@@ -349,14 +349,14 @@ svn_cl__diff(apr_getopt_t *os,
           else
             target2 = svn_dirent_join(new_target, path, iterpool);
 
-          if (opt_state->summarize)
+          if (opt_state->diff.summarize)
             SVN_ERR(svn_client_diff_summarize2
                     (target1,
                      &opt_state->start_revision,
                      target2,
                      &opt_state->end_revision,
                      opt_state->depth,
-                     ! opt_state->notice_ancestry,
+                     ! opt_state->diff.notice_ancestry,
                      opt_state->changelists,
                      summarize_func, &target1,
                      ctx, iterpool));
@@ -369,12 +369,13 @@ svn_cl__diff(apr_getopt_t *os,
                      &(opt_state->end_revision),
                      NULL,
                      opt_state->depth,
-                     ! opt_state->notice_ancestry,
-                     opt_state->no_diff_deleted,
+                     ! opt_state->diff.notice_ancestry,
+                     opt_state->diff.no_diff_deleted,
                      show_copies_as_adds,
                      opt_state->force,
-                     ignore_prop_diff,
-                     opt_state->use_git_diff_format,
+                     ignore_properties,
+                     opt_state->diff.properties_only,
+                     opt_state->diff.use_git_diff_format,
                      svn_cmdline_output_encoding(pool),
                      outstream,
                      errstream,
@@ -395,14 +396,14 @@ svn_cl__diff(apr_getopt_t *os,
             peg_revision.kind = svn_path_is_url(path)
               ? svn_opt_revision_head : svn_opt_revision_working;
 
-          if (opt_state->summarize)
+          if (opt_state->diff.summarize)
             SVN_ERR(svn_client_diff_summarize_peg2
                     (truepath,
                      &peg_revision,
                      &opt_state->start_revision,
                      &opt_state->end_revision,
                      opt_state->depth,
-                     ! opt_state->notice_ancestry,
+                     ! opt_state->diff.notice_ancestry,
                      opt_state->changelists,
                      summarize_func, &truepath,
                      ctx, iterpool));
@@ -415,12 +416,13 @@ svn_cl__diff(apr_getopt_t *os,
                      &opt_state->end_revision,
                      NULL,
                      opt_state->depth,
-                     ! opt_state->notice_ancestry,
-                     opt_state->no_diff_deleted,
+                     ! opt_state->diff.notice_ancestry,
+                     opt_state->diff.no_diff_deleted,
                      show_copies_as_adds,
                      opt_state->force,
-                     ignore_prop_diff,
-                     opt_state->use_git_diff_format,
+                     ignore_properties,
+                     opt_state->diff.properties_only,
+                     opt_state->diff.use_git_diff_format,
                      svn_cmdline_output_encoding(pool),
                      outstream,
                      errstream,

Modified: subversion/branches/inheritable-props/subversion/svn/import-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/svn/import-cmd.c?rev=1354186&r1=1354185&r2=1354186&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/svn/import-cmd.c (original)
+++ subversion/branches/inheritable-props/subversion/svn/import-cmd.c Tue Jun 26 19:26:49 2012
@@ -114,12 +114,13 @@ svn_cl__import(apr_getopt_t *os,
 
   SVN_ERR(svn_cl__cleanup_log_msg
           (ctx->log_msg_baton3,
-           svn_client_import4(path,
+           svn_client_import5(path,
                               url,
                               opt_state->depth,
                               opt_state->no_ignore,
                               opt_state->force,
                               opt_state->revprop_table,
+                              NULL, NULL,  /* filter callback / baton */
                               (opt_state->quiet
                                ? NULL : svn_cl__print_commit_info),
                               NULL,

Modified: subversion/branches/inheritable-props/subversion/svn/log-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/svn/log-cmd.c?rev=1354186&r1=1354185&r2=1354186&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/svn/log-cmd.c (original)
+++ subversion/branches/inheritable-props/subversion/svn/log-cmd.c Tue Jun 26 19:26:49 2012
@@ -80,6 +80,67 @@ struct log_receiver_baton
   "------------------------------------------------------------------------\n"
 
 
+/* Display a diff of the subtree TARGET_PATH_OR_URL@TARGET_PEG_REVISION as
+ * it changed in the revision that LOG_ENTRY describes.
+ *
+ * Restrict the diff to depth DEPTH.  Pass DIFF_EXTENSIONS along to the diff
+ * subroutine.
+ *
+ * Write the diff to OUTSTREAM and write any stderr output to ERRSTREAM.
+ * ### How is exit code handled? 0 and 1 -> SVN_NO_ERROR, else an svn error?
+ * ### Should we get rid of ERRSTREAM and use svn_error_t instead?
+ */
+static svn_error_t *
+display_diff(const svn_log_entry_t *log_entry,
+             const char *target_path_or_url,
+             const svn_opt_revision_t *target_peg_revision,
+             svn_depth_t depth,
+             const char *diff_extensions,
+             svn_stream_t *outstream,
+             svn_stream_t *errstream,
+             svn_client_ctx_t *ctx,
+             apr_pool_t *pool)
+{
+  apr_array_header_t *diff_options;
+  svn_opt_revision_t start_revision;
+  svn_opt_revision_t end_revision;
+
+  /* Fall back to "" to get options initialized either way. */
+  if (diff_extensions)
+    diff_options = svn_cstring_split(diff_extensions, " \t\n\r",
+                                     TRUE, pool);
+  else
+    diff_options = NULL;
+
+  start_revision.kind = svn_opt_revision_number;
+  start_revision.value.number = log_entry->revision - 1;
+  end_revision.kind = svn_opt_revision_number;
+  end_revision.value.number = log_entry->revision;
+
+  SVN_ERR(svn_stream_puts(outstream, _("\n")));
+  SVN_ERR(svn_client_diff_peg6(diff_options,
+                               target_path_or_url,
+                               target_peg_revision,
+                               &start_revision, &end_revision,
+                               NULL,
+                               depth,
+                               FALSE, /* ignore ancestry */
+                               TRUE, /* no diff deleted */
+                               FALSE, /* show copies as adds */
+                               FALSE, /* ignore content type */
+                               FALSE, /* ignore prop diff */
+                               FALSE, /* properties only */
+                               FALSE, /* use git diff format */
+                               svn_cmdline_output_encoding(pool),
+                               outstream,
+                               errstream,
+                               NULL,
+                               ctx, pool));
+  SVN_ERR(svn_stream_puts(outstream, _("\n")));
+  return SVN_NO_ERROR;
+}
+
+
 /* Implement `svn_log_entry_receiver_t', printing the logs in
  * a human-readable and machine-parseable format.
  *
@@ -282,44 +343,16 @@ log_entry_receiver(void *baton,
     {
       svn_stream_t *outstream;
       svn_stream_t *errstream;
-      apr_array_header_t *diff_options;
-      svn_opt_revision_t start_revision;
-      svn_opt_revision_t end_revision;
 
       SVN_ERR(svn_stream_for_stdout(&outstream, pool));
       SVN_ERR(svn_stream_for_stderr(&errstream, pool));
 
-      /* Fall back to "" to get options initialized either way. */
-      if (lb->diff_extensions)
-        diff_options = svn_cstring_split(lb->diff_extensions, " \t\n\r",
-                                         TRUE, pool);
-      else
-        diff_options = NULL;
+      SVN_ERR(display_diff(log_entry,
+                           lb->target_path_or_url, &lb->target_peg_revision,
+                           lb->depth, lb->diff_extensions,
+                           outstream, errstream,
+                           lb->ctx, pool));
 
-      start_revision.kind = svn_opt_revision_number;
-      start_revision.value.number = log_entry->revision - 1;
-      end_revision.kind = svn_opt_revision_number;
-      end_revision.value.number = log_entry->revision;
-
-      SVN_ERR(svn_stream_printf(outstream, pool, _("\n")));
-      SVN_ERR(svn_client_diff_peg6(diff_options,
-                                   lb->target_path_or_url,
-                                   &lb->target_peg_revision,
-                                   &start_revision, &end_revision,
-                                   NULL,
-                                   lb->depth,
-                                   FALSE, /* ignore ancestry */
-                                   TRUE, /* no diff deleted */
-                                   FALSE, /* show copies as adds */
-                                   FALSE, /* ignore content type */
-                                   FALSE, /* ignore prop diff */
-                                   FALSE, /* use git diff format */
-                                   svn_cmdline_output_encoding(pool),
-                                   outstream,
-                                   errstream,
-                                   NULL,
-                                   lb->ctx, pool));
-      SVN_ERR(svn_stream_printf(outstream, pool, _("\n")));
       SVN_ERR(svn_stream_close(outstream));
       SVN_ERR(svn_stream_close(errstream));
     }
@@ -544,11 +577,11 @@ svn_cl__log(apr_getopt_t *os,
     return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
                             _("'quiet' and 'diff' options are "
                               "mutually exclusive"));
-  if (opt_state->diff_cmd && (! opt_state->show_diff))
+  if (opt_state->diff.diff_cmd && (! opt_state->show_diff))
     return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
                             _("'diff-cmd' option requires 'diff' "
                               "option"));
-  if (opt_state->internal_diff && (! opt_state->show_diff))
+  if (opt_state->diff.internal_diff && (! opt_state->show_diff))
     return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
                             _("'internal-diff' option requires "
                               "'diff' option"));

Modified: subversion/branches/inheritable-props/subversion/svn/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/svn/main.c?rev=1354186&r1=1354185&r2=1354186&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/svn/main.c (original)
+++ subversion/branches/inheritable-props/subversion/svn/main.c Tue Jun 26 19:26:49 2012
@@ -66,14 +66,24 @@
    option. Options that have both long and short options should just
    use the short option letter as identifier.  */
 typedef enum svn_cl__longopt_t {
-  opt_ancestor_path = SVN_OPT_FIRST_LONGOPT_ID,
-  opt_auth_password,
+  opt_auth_password = SVN_OPT_FIRST_LONGOPT_ID,
   opt_auth_username,
   opt_autoprops,
   opt_changelist,
   opt_config_dir,
   opt_config_options,
+  /* diff options */
   opt_diff_cmd,
+  opt_internal_diff,
+  opt_no_diff_deleted,
+  opt_show_copies_as_adds,
+  opt_notice_ancestry,
+  opt_summarize,
+  opt_use_git_diff_format,
+  opt_ignore_properties,
+  opt_properties_only,
+  opt_patch_compatible,
+  /* end of diff options */
   opt_dry_run,
   opt_editor_cmd,
   opt_encoding,
@@ -88,12 +98,9 @@ typedef enum svn_cl__longopt_t {
   opt_new_cmd,
   opt_no_auth_cache,
   opt_no_autoprops,
-  opt_no_diff_deleted,
-  opt_ignore_props,
   opt_no_ignore,
   opt_no_unlock,
   opt_non_interactive,
-  opt_notice_ancestry,
   opt_old_cmd,
   opt_record_only,
   opt_relocate,
@@ -101,7 +108,6 @@ typedef enum svn_cl__longopt_t {
   opt_revprop,
   opt_stop_on_copy,
   opt_strict,
-  opt_summarize,
   opt_targets,
   opt_depth,
   opt_set_depth,
@@ -117,14 +123,10 @@ typedef enum svn_cl__longopt_t {
   opt_reintegrate,
   opt_trust_server_cert,
   opt_strip,
-  opt_show_copies_as_adds,
   opt_ignore_keywords,
   opt_reverse_diff,
   opt_ignore_whitespace,
   opt_diff,
-  opt_internal_diff,
-  opt_use_git_diff_format,
-  opt_use_patch_diff_format,
   opt_allow_mixed_revisions,
   opt_include_externals,
   opt_symmetric,
@@ -241,17 +243,10 @@ const apr_getopt_option_t svn_cl__option
                     N_("do no interactive prompting")},
   {"dry-run",       opt_dry_run, 0,
                     N_("try operation but make no changes")},
-  {"no-diff-deleted", opt_no_diff_deleted, 0,
-                    N_("do not print differences for deleted files")},
-  {"ignore-properties", opt_ignore_props, 0,
-                    N_("ignore properties during the operation")},
-  {"notice-ancestry", opt_notice_ancestry, 0,
-                    N_("notice ancestry when calculating differences")},
   {"ignore-ancestry", opt_ignore_ancestry, 0,
                     N_("ignore ancestry when calculating merges")},
   {"ignore-externals", opt_ignore_externals, 0,
                     N_("ignore externals definitions")},
-  {"diff-cmd",      opt_diff_cmd, 1, N_("use ARG as diff command")},
   {"diff3-cmd",     opt_merge_cmd, 1, N_("use ARG as merge command")},
   {"editor-cmd",    opt_editor_cmd, 1, N_("use ARG as external editor")},
   {"record-only",   opt_record_only, 0,
@@ -283,7 +278,6 @@ const apr_getopt_option_t svn_cl__option
                        "ARG may be one of 'LF', 'CR', 'CRLF'")},
   {"limit",         'l', 1, N_("maximum number of log entries")},
   {"no-unlock",     opt_no_unlock, 0, N_("don't unlock the targets")},
-  {"summarize",     opt_summarize, 0, N_("show a summary of the results")},
   {"remove",         opt_remove, 0, N_("remove changelist association")},
   {"changelist",    opt_changelist, 1,
                     N_("operate only on members of changelist ARG")},
@@ -336,8 +330,6 @@ const apr_getopt_option_t svn_cl__option
                        "The expected component separator is '/' on all\n"
                        "                             "
                        "platforms. A leading '/' counts as one component.")},
-  {"show-copies-as-adds", opt_show_copies_as_adds, 0,
-                    N_("don't diff copied or moved files with their source")},
   {"ignore-keywords", opt_ignore_keywords, 0,
                     N_("don't expand keywords")},
   {"reverse-diff", opt_reverse_diff, 0,
@@ -345,17 +337,31 @@ const apr_getopt_option_t svn_cl__option
   {"ignore-whitespace", opt_ignore_whitespace, 0,
                        N_("ignore whitespace during pattern matching")},
   {"diff", opt_diff, 0, N_("produce diff output")}, /* maps to show_diff */
+  /* diff options */
+  {"diff-cmd",      opt_diff_cmd, 1, N_("use ARG as diff command")},
   {"internal-diff", opt_internal_diff, 0,
                        N_("override diff-cmd specified in config file")},
+  {"no-diff-deleted", opt_no_diff_deleted, 0,
+                    N_("do not print differences for deleted files")},
+  {"show-copies-as-adds", opt_show_copies_as_adds, 0,
+                    N_("don't diff copied or moved files with their source")},
+  {"notice-ancestry", opt_notice_ancestry, 0,
+                    N_("notice ancestry when calculating differences")},
+  {"summarize",     opt_summarize, 0, N_("show a summary of the results")},
   {"git", opt_use_git_diff_format, 0,
                        N_("use git's extended diff format")},
-  {"patch-compatible", opt_use_patch_diff_format, 0,
+  {"ignore-properties", opt_ignore_properties, 0,
+                    N_("ignore properties during the operation")},
+  {"properties-only", opt_properties_only, 0,
+                       N_("show only properties during the operation")},
+  {"patch-compatible", opt_patch_compatible, 0,
                        N_("generate diff suitable for generic third-party\n"
                        "                             "
                        "patch tools; currently the same as\n"
                        "                             "
-                       "--show-copies-as-adds --ignore-properties\n"
+                       "--show-copies-as-adds --ignore-properties"
                        )},
+  /* end of diff options */
   {"allow-mixed-revisions", opt_allow_mixed_revisions, 0,
                        N_("Allow merge into mixed-revision working copy.\n"
                        "                             "
@@ -555,9 +561,10 @@ const svn_opt_subcommand_desc2_t svn_cl_
      "\n"
      "  Use just 'svn diff' to display local modifications in a working copy.\n"),
     {'r', 'c', opt_old_cmd, opt_new_cmd, 'N', opt_depth, opt_diff_cmd,
-     opt_internal_diff, 'x', opt_no_diff_deleted, opt_ignore_props,
+     opt_internal_diff, 'x', opt_no_diff_deleted, opt_ignore_properties,
+     opt_properties_only,
      opt_show_copies_as_adds, opt_notice_ancestry, opt_summarize, opt_changelist,
-     opt_force, opt_xml, opt_use_git_diff_format, opt_use_patch_diff_format} },
+     opt_force, opt_xml, opt_use_git_diff_format, opt_patch_compatible} },
   { "export", svn_cl__export, {0}, N_
     ("Create an unversioned copy of a tree.\n"
      "usage: 1. export [-r REV] URL[@PEGREV] [PATH]\n"
@@ -677,15 +684,29 @@ const svn_opt_subcommand_desc2_t svn_cl_
 
      "\n"
      "  Examples:\n"
-     "    svn log\n"
-     "    svn log foo.c\n"
-     "    svn log bar.c@42\n"
-     "    svn log http://www.example.com/repo/project/foo.c\n"
-     "    svn log http://www.example.com/repo/project foo.c bar.c\n"
-     "    svn log http://www.example.com/repo/project@50 foo.c bar.c\n"
      "\n"
-     "    This command shows the log entry for the revision the branch\n"
-     "    ^/branches/foo was created in:\n"
+     "    Show the latest 5 log messages for the current working copy\n"
+     "    directory and display paths changed in each commit:\n"
+     "      svn log -l 5 -v\n"
+     "\n"
+     "    Show the log for bar.c as of revision 42:\n"
+     "      svn log bar.c@42\n"
+     "\n"
+     "    Show log messages and diffs for each commit to foo.c:\n"
+     "      svn log --diff http://www.example.com/repo/project/foo.c\n"
+     "    (Because the above command uses a full URL it does not require\n"
+     "     a working copy.)\n"
+     "\n"
+     "    Show log messages for the children foo.c and bar.c of the directory\n"
+     "    '/trunk' as it appeared in revision 50, using the ^/ URL shortcut:\n"
+     "      svn log ^/trunk@50 foo.c bar.c\n"
+     "\n"
+     "    Show the log messages for any incoming changes to foo.c during the\n"
+     "    next 'svn update':\n"
+     "      svn log -r BASE:HEAD foo.c\n"
+     "\n"
+     "    Show the log message for the revision in which /branches/foo\n"
+     "    was created:\n"
      "      svn log --stop-on-copy --limit 1 -r0:HEAD ^/branches/foo\n"),
     {'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,
@@ -1031,6 +1052,11 @@ const svn_opt_subcommand_desc2_t svn_cl_
      "  specified by the --show-revs option.  If --show-revs isn't passed,\n"
      "  it defaults to --show-revs='merged'.\n"
      "\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"
+     "  valid range values.\n"
+     "\n"
      "  The depth can be 'empty' or 'infinity'; the default is 'empty'.\n"),
     {'r', 'R', opt_depth, opt_show_revs} },
 
@@ -1146,15 +1172,19 @@ const svn_opt_subcommand_desc2_t svn_cl_
      "  2. Prints unversioned remote prop on repos revision.\n"
      "     TARGET only determines which repository to access.\n"
      "\n"
-     "  By default, this subcommand will add an extra newline to the end\n"
-     "  of the property values so that the output looks pretty.  Also,\n"
-     "  whenever there are multiple paths involved, each property value\n"
-     "  is prefixed with the path with which it is associated.  Use the\n"
-     "  --strict option to disable these beautifications (useful when\n"
-     "  redirecting a binary property value to a file, but available only\n"
-     "  if you supply a single TARGET to a non-recursive propget operation).\n"),
+     "  With --verbose, the target path and the property name are printed on\n"
+     "  separate lines before each value, like 'svn proplist --verbose'.\n"
+     "  Otherwise, if there is more than one TARGET or a depth other than\n"
+     "  'empty', the target path is printed on the same line before each value.\n"
+     "\n"
+     "  By default, an extra newline is printed after the property value so that\n"
+     "  the output looks pretty.  With a single TARGET and depth 'empty', you can\n"
+     "  use the --strict option to disable this (useful when redirecting a binary\n"
+     "  property value to a file, for example).\n"),
     {'v', 'R', opt_depth, 'r', opt_revprop, opt_strict, opt_xml,
-     opt_changelist, opt_show_inherited_props } },
+     opt_changelist, opt_show_inherited_props },
+    {{'v', N_("print path, name and value on separate lines")},
+     {opt_strict, N_("don't print an extra newline")}} },
 
   { "proplist", svn_cl__proplist, {"plist", "pl"}, N_
     ("List all properties on files, dirs, or revisions.\n"
@@ -1164,9 +1194,14 @@ const svn_opt_subcommand_desc2_t svn_cl_
      "  1. Lists versioned props. If specified, REV determines in which\n"
      "     revision the target is first looked up.\n"
      "  2. Lists unversioned remote props on repos revision.\n"
-     "     TARGET only determines which repository to access.\n"),
+     "     TARGET only determines which repository to access.\n"
+     "\n"
+     "  With --verbose, the property values are printed as well, like 'svn propget\n"
+     "  --verbose'.  With --quiet, the paths are not printed.\n"),
     {'v', 'R', opt_depth, 'r', 'q', opt_revprop, opt_xml, opt_changelist,
-     opt_show_inherited_props} },
+     opt_show_inherited_props },
+    {{'v', N_("print path, name and value on separate lines")},
+     {'q', N_("don't print the path")}} },
 
   { "propset", svn_cl__propset, {"pset", "ps"}, N_
     ("Set the value of a property on files, dirs, or revisions.\n"
@@ -1264,9 +1299,12 @@ const svn_opt_subcommand_desc2_t svn_cl_
 
   { "resolve", svn_cl__resolve, {0}, N_
     ("Resolve conflicts on working copy files or directories.\n"
-     "usage: resolve --accept=ARG [PATH...]\n"
+     "usage: resolve [PATH...]\n"
      "\n"
-     "  Note:  the --accept option is currently required.\n"),
+     "  If no arguments are given, perform interactive conflict resolution for\n"
+     "  all conflicted paths in the working copy, with default depth 'infinity'.\n"
+     "  The --accept=ARG option prevents prompting and forces conflicts on PATH\n"
+     "  to resolved in the manner specified by ARG, with default depth 'empty'.\n"),
     {opt_targets, 'R', opt_depth, 'q', opt_accept},
     {{opt_accept, N_("specify automatic conflict resolution source\n"
                      "                             "
@@ -1362,20 +1400,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"
@@ -1916,16 +1954,16 @@ main(int argc, const char *argv[])
         opt_state.trust_server_cert = TRUE;
         break;
       case opt_no_diff_deleted:
-        opt_state.no_diff_deleted = TRUE;
+        opt_state.diff.no_diff_deleted = TRUE;
         break;
-      case opt_ignore_props:
-        opt_state.ignore_props = TRUE;
+      case opt_ignore_properties:
+        opt_state.diff.ignore_properties = TRUE;
         break;
       case opt_show_copies_as_adds:
-        opt_state.show_copies_as_adds = TRUE;
+        opt_state.diff.show_copies_as_adds = TRUE;
         break;
       case opt_notice_ancestry:
-        opt_state.notice_ancestry = TRUE;
+        opt_state.diff.notice_ancestry = TRUE;
         break;
       case opt_ignore_ancestry:
         opt_state.ignore_ancestry = TRUE;
@@ -1942,7 +1980,7 @@ main(int argc, const char *argv[])
           return svn_cmdline_handle_exit_error(err, pool, "svn: ");
         break;
       case opt_diff_cmd:
-        opt_state.diff_cmd = apr_pstrdup(pool, opt_arg);
+        opt_state.diff.diff_cmd = apr_pstrdup(pool, opt_arg);
         break;
       case opt_merge_cmd:
         opt_state.merge_cmd = apr_pstrdup(pool, opt_arg);
@@ -2016,7 +2054,7 @@ main(int argc, const char *argv[])
         opt_state.no_unlock = TRUE;
         break;
       case opt_summarize:
-        opt_state.summarize = TRUE;
+        opt_state.diff.summarize = TRUE;
         break;
       case opt_remove:
         opt_state.remove = TRUE;
@@ -2102,13 +2140,13 @@ main(int argc, const char *argv[])
           opt_state.show_diff = TRUE;
           break;
       case opt_internal_diff:
-        opt_state.internal_diff = TRUE;
+        opt_state.diff.internal_diff = TRUE;
         break;
-      case opt_use_patch_diff_format:
-        opt_state.use_patch_diff_format = TRUE;
+      case opt_patch_compatible:
+        opt_state.diff.patch_compatible = TRUE;
         break;
       case opt_use_git_diff_format:
-        opt_state.use_git_diff_format = TRUE;
+        opt_state.diff.use_git_diff_format = TRUE;
         break;
       case opt_allow_mixed_revisions:
         opt_state.allow_mixed_rev = TRUE;
@@ -2119,6 +2157,9 @@ main(int argc, const char *argv[])
       case opt_show_inherited_props:
         opt_state.show_inherited_props = TRUE;
         break;
+      case opt_properties_only:
+        opt_state.diff.properties_only = TRUE;
+        break;
       default:
         /* Hmmm. Perhaps this would be a good place to squirrel away
            opts that commands like svn diff might need. Hmmm indeed. */
@@ -2303,7 +2344,7 @@ main(int argc, const char *argv[])
 
   /* Disallow simultaneous use of both --diff-cmd and
      --internal-diff.  */
-  if (opt_state.diff_cmd && opt_state.internal_diff)
+  if (opt_state.diff.diff_cmd && opt_state.diff.internal_diff)
     {
       err = svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
                              _("--diff-cmd and --internal-diff "
@@ -2434,6 +2475,7 @@ main(int argc, const char *argv[])
   if (subcommand->cmd_func != svn_cl__blame
       && subcommand->cmd_func != svn_cl__diff
       && subcommand->cmd_func != svn_cl__log
+      && subcommand->cmd_func != svn_cl__mergeinfo
       && subcommand->cmd_func != svn_cl__merge)
     {
       if (opt_state.end_revision.kind != svn_opt_revision_unspecified)
@@ -2496,13 +2538,13 @@ main(int argc, const char *argv[])
 
   /* XXX: Only diff_cmd for now, overlay rest later and stop passing
      opt_state altogether? */
-  if (opt_state.diff_cmd)
+  if (opt_state.diff.diff_cmd)
     svn_config_set(cfg_config, SVN_CONFIG_SECTION_HELPERS,
-                   SVN_CONFIG_OPTION_DIFF_CMD, opt_state.diff_cmd);
+                   SVN_CONFIG_OPTION_DIFF_CMD, opt_state.diff.diff_cmd);
   if (opt_state.merge_cmd)
     svn_config_set(cfg_config, SVN_CONFIG_SECTION_HELPERS,
                    SVN_CONFIG_OPTION_DIFF3_CMD, opt_state.merge_cmd);
-  if (opt_state.internal_diff)
+  if (opt_state.diff.internal_diff)
     svn_config_set(cfg_config, SVN_CONFIG_SECTION_HELPERS,
                    SVN_CONFIG_OPTION_DIFF_CMD, NULL);
 
@@ -2661,9 +2703,12 @@ main(int argc, const char *argv[])
          the user said to postpone. */
       ctx->conflict_func = NULL;
       ctx->conflict_baton = NULL;
+      ctx->conflict_func2 = NULL;
+      ctx->conflict_baton2 = NULL;
     }
   else
     {
+      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;
@@ -2685,13 +2730,16 @@ main(int argc, const char *argv[])
                pool, "svn: ");
         }
 
-      ctx->conflict_func = svn_cl__conflict_handler;
-      ctx->conflict_baton = svn_cl__conflict_baton_make(
-          opt_state.accept_which,
-          ctx->config,
-          opt_state.editor_cmd,
-          pb,
-          pool);
+      ctx->conflict_func = NULL;
+      ctx->conflict_baton = NULL;
+      ctx->conflict_func2 = 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));
+      ctx->conflict_baton2 = conflict_baton2;
     }
 
   /* And now we finally run the subcommand. */

Modified: subversion/branches/inheritable-props/subversion/svn/merge-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/svn/merge-cmd.c?rev=1354186&r1=1354185&r2=1354186&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/svn/merge-cmd.c (original)
+++ subversion/branches/inheritable-props/subversion/svn/merge-cmd.c Tue Jun 26 19:26:49 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/inheritable-props/subversion/svn/mergeinfo-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/svn/mergeinfo-cmd.c?rev=1354186&r1=1354185&r2=1354186&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/svn/mergeinfo-cmd.c (original)
+++ subversion/branches/inheritable-props/subversion/svn/mergeinfo-cmd.c Tue Jun 26 19:26:49 2012
@@ -122,19 +122,23 @@ svn_cl__mergeinfo(apr_getopt_t *os,
   /* Do the real work, depending on the requested data flavor. */
   if (opt_state->show_revs == svn_cl__show_revs_merged)
     {
-      SVN_ERR(svn_client_mergeinfo_log(TRUE, target, &tgt_peg_revision,
-                                       source, &src_peg_revision,
-                                       print_log_rev, NULL,
-                                       TRUE, depth, NULL, ctx,
-                                       pool));
+      SVN_ERR(svn_client_mergeinfo_log2(TRUE, target, &tgt_peg_revision,
+                                        source, &src_peg_revision,
+                                        &(opt_state->start_revision),
+                                        &(opt_state->end_revision),
+                                        print_log_rev, NULL,
+                                        TRUE, depth, NULL, ctx,
+                                        pool));
     }
   else if (opt_state->show_revs == svn_cl__show_revs_eligible)
     {
-      SVN_ERR(svn_client_mergeinfo_log(FALSE, target, &tgt_peg_revision,
-                                       source, &src_peg_revision,
-                                       print_log_rev, NULL,
-                                       TRUE, depth, NULL, ctx,
-                                       pool));
+      SVN_ERR(svn_client_mergeinfo_log2(FALSE, target, &tgt_peg_revision,
+                                        source, &src_peg_revision,
+                                        &(opt_state->start_revision),
+                                        &(opt_state->end_revision),
+                                        print_log_rev, NULL,
+                                        TRUE, depth, NULL, ctx,
+                                        pool));
     }
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/inheritable-props/subversion/svn/notify.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/svn/notify.c?rev=1354186&r1=1354185&r2=1354186&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/svn/notify.c (original)
+++ subversion/branches/inheritable-props/subversion/svn/notify.c Tue Jun 26 19:26:49 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/inheritable-props/subversion/svn/propget-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/svn/propget-cmd.c?rev=1354186&r1=1354185&r2=1354186&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/svn/propget-cmd.c (original)
+++ subversion/branches/inheritable-props/subversion/svn/propget-cmd.c Tue Jun 26 19:26:49 2012
@@ -34,6 +34,7 @@
 #include "svn_error_codes.h"
 #include "svn_error.h"
 #include "svn_utf.h"
+#include "svn_sorts.h"
 #include "svn_subst.h"
 #include "svn_dirent_uri.h"
 #include "svn_path.h"
@@ -72,9 +73,9 @@ print_properties_xml(const char *pname,
                      apr_array_header_t *inherited_props,
                      apr_pool_t *pool)
 {
-  apr_hash_index_t *hi;
-  apr_pool_t *iterpool = NULL;
+  apr_array_header_t *sorted_props;
   int i;
+  apr_pool_t *iterpool = NULL;
   svn_stringbuf_t *sb;
 
   if (inherited_props && inherited_props->nelts)
@@ -110,10 +111,12 @@ print_properties_xml(const char *pname,
   if (iterpool == NULL)
     iterpool = svn_pool_create(iterpool);
 
-  for (hi = apr_hash_first(pool, props); hi; hi = apr_hash_next(hi))
+  sorted_props = svn_sort__hash(props, svn_sort_compare_items_as_paths, pool);
+  for (i = 0; i < sorted_props->nelts; i++)
     {
-      const char *filename = svn__apr_hash_index_key(hi);
-      svn_string_t *propval = svn__apr_hash_index_val(hi);
+      svn_sort__item_t item = APR_ARRAY_IDX(sorted_props, i, svn_sort__item_t);
+      const char *filename = item.key;
+      svn_string_t *propval = item.value;
 
       sb = NULL;
       svn_pool_clear(iterpool);
@@ -239,7 +242,8 @@ print_properties(svn_stream_t *out,
                  svn_boolean_t like_proplist,
                  apr_pool_t *pool)
 {
-  apr_hash_index_t *hi;
+  apr_array_header_t *sorted_props;
+  int i;
   apr_pool_t *iterpool = svn_pool_create(pool);
   const char *path_prefix;
 
@@ -265,10 +269,12 @@ print_properties(svn_stream_t *out,
         }
     }
 
-  for (hi = apr_hash_first(pool, props); hi; hi = apr_hash_next(hi))
+  sorted_props = svn_sort__hash(props, svn_sort_compare_items_as_paths, pool);
+  for (i = 0; i < sorted_props->nelts; i++)
     {
-      const char *filename = svn__apr_hash_index_key(hi);
-      svn_string_t *propval = svn__apr_hash_index_val(hi);
+      svn_sort__item_t item = APR_ARRAY_IDX(sorted_props, i, svn_sort__item_t);
+      const char *filename = item.key;
+      svn_string_t *propval = item.value;
 
       svn_pool_clear(iterpool);
 

Modified: subversion/branches/inheritable-props/subversion/svn/props.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/svn/props.c?rev=1354186&r1=1354185&r2=1354186&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/svn/props.c (original)
+++ subversion/branches/inheritable-props/subversion/svn/props.c Tue Jun 26 19:26:49 2012
@@ -31,6 +31,7 @@
 #include "svn_cmdline.h"
 #include "svn_string.h"
 #include "svn_error.h"
+#include "svn_sorts.h"
 #include "svn_subst.h"
 #include "svn_props.h"
 #include "svn_string.h"
@@ -87,14 +88,17 @@ svn_cl__print_prop_hash(svn_stream_t *ou
                         svn_boolean_t names_only,
                         apr_pool_t *pool)
 {
-  apr_hash_index_t *hi;
+  apr_array_header_t *sorted_props;
+  int i;
 
-  for (hi = apr_hash_first(pool, prop_hash); hi; hi = apr_hash_next(hi))
+  sorted_props = svn_sort__hash(prop_hash, svn_sort_compare_items_lexically,
+                                pool);
+  for (i = 0; i < sorted_props->nelts; i++)
     {
-      const char *pname = svn__apr_hash_index_key(hi);
-      svn_string_t *propval = svn__apr_hash_index_val(hi);
+      svn_sort__item_t item = APR_ARRAY_IDX(sorted_props, i, svn_sort__item_t);
+      const char *pname = item.key;
+      svn_string_t *propval = item.value;
       const char *pname_stdout;
-      apr_size_t len;
 
       if (svn_prop_needs_translation(pname))
         SVN_ERR(svn_subst_detranslate_string(&propval, propval,
@@ -112,8 +116,7 @@ svn_cl__print_prop_hash(svn_stream_t *ou
                                               FALSE, /* no expansion */
                                               pool));
 
-          len = strlen(pname_stdout);
-          SVN_ERR(svn_stream_write(out, pname_stdout, &len));
+          SVN_ERR(svn_stream_puts(out, pname_stdout));
         }
       else
         {
@@ -134,8 +137,7 @@ svn_cl__print_prop_hash(svn_stream_t *ou
                                                               pool);
           if (out)
             {
-              len = strlen(indented_newval);
-              SVN_ERR(svn_stream_write(out, indented_newval, &len));
+              SVN_ERR(svn_stream_puts(out, indented_newval));
             }
           else
             {
@@ -154,15 +156,19 @@ svn_cl__print_xml_prop_hash(svn_stringbu
                             svn_boolean_t inherited_props,
                             apr_pool_t *pool)
 {
-  apr_hash_index_t *hi;
+  apr_array_header_t *sorted_props;
+  int i;
 
   if (*outstr == NULL)
     *outstr = svn_stringbuf_create_empty(pool);
 
-  for (hi = apr_hash_first(pool, prop_hash); hi; hi = apr_hash_next(hi))
+  sorted_props = svn_sort__hash(prop_hash, svn_sort_compare_items_lexically,
+                                pool);
+  for (i = 0; i < sorted_props->nelts; i++)
     {
-      const char *pname = svn__apr_hash_index_key(hi);
-      svn_string_t *propval = svn__apr_hash_index_val(hi);
+      svn_sort__item_t item = APR_ARRAY_IDX(sorted_props, i, svn_sort__item_t);
+      const char *pname = item.key;
+      svn_string_t *propval = item.value;
 
       if (names_only)
         {

Modified: subversion/branches/inheritable-props/subversion/svn/resolve-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/svn/resolve-cmd.c?rev=1354186&r1=1354185&r2=1354186&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/svn/resolve-cmd.c (original)
+++ subversion/branches/inheritable-props/subversion/svn/resolve-cmd.c Tue Jun 26 19:26:49 2012
@@ -77,8 +77,11 @@ svn_cl__resolve(apr_getopt_t *os,
       conflict_choice = svn_wc_conflict_choose_mine_full;
       break;
     case svn_cl__accept_unspecified:
-      return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
-                              _("missing --accept option"));
+      if (ctx->conflict_func2 == NULL)
+        return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                                _("missing --accept option"));
+      conflict_choice = svn_wc_conflict_choose_unspecified;
+      break;
     default:
       return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
                               _("invalid 'accept' ARG"));
@@ -89,10 +92,15 @@ svn_cl__resolve(apr_getopt_t *os,
                                                       ctx, FALSE,
                                                       scratch_pool));
   if (! targets->nelts)
-    return svn_error_create(SVN_ERR_CL_INSUFFICIENT_ARGS, 0, NULL);
+    svn_opt_push_implicit_dot_target(targets, scratch_pool);
 
   if (opt_state->depth == svn_depth_unknown)
-    opt_state->depth = svn_depth_empty;
+    {
+      if (opt_state->accept_which == svn_cl__accept_unspecified)
+        opt_state->depth = svn_depth_infinity;
+      else
+        opt_state->depth = svn_depth_empty;
+    }
 
   SVN_ERR(svn_cl__eat_peg_revisions(&targets, targets, scratch_pool));
 

Modified: subversion/branches/inheritable-props/subversion/svn/status-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/svn/status-cmd.c?rev=1354186&r1=1354185&r2=1354186&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/svn/status-cmd.c (original)
+++ subversion/branches/inheritable-props/subversion/svn/status-cmd.c Tue Jun 26 19:26:49 2012
@@ -349,7 +349,7 @@ svn_cl__status(apr_getopt_t *os,
                           NULL, opt_state->quiet,
                           /* not versioned: */
                           SVN_ERR_WC_NOT_WORKING_COPY,
-                          SVN_NO_ERROR));
+                          SVN_ERR_WC_PATH_NOT_FOUND));
 
       if (opt_state->xml)
         SVN_ERR(print_finish_target_xml(repos_rev, iterpool));

Modified: subversion/branches/inheritable-props/subversion/svnadmin/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/svnadmin/main.c?rev=1354186&r1=1354185&r2=1354186&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/svnadmin/main.c (original)
+++ subversion/branches/inheritable-props/subversion/svnadmin/main.c Tue Jun 26 19:26:49 2012
@@ -115,7 +115,7 @@ open_repos(svn_repos_t **repos,
   apr_hash_set(fs_config, SVN_FS_CONFIG_FSFS_CACHE_FULLTEXTS,
                APR_HASH_KEY_STRING, "1");
   apr_hash_set(fs_config, SVN_FS_CONFIG_FSFS_CACHE_REVPROPS,
-               APR_HASH_KEY_STRING, "0");
+               APR_HASH_KEY_STRING, "1");
 
   /* now, open the requested repository */
   SVN_ERR(svn_repos_open2(repos, path, fs_config, pool));
@@ -727,8 +727,7 @@ repos_notify_handler(void *baton,
       return;
 
     case svn_repos_notify_pack_shard_end:
-      svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
-                                        _("done.\n")));
+      svn_error_clear(svn_stream_puts(feedback_stream, _("done.\n")));
       return;
 
     case svn_repos_notify_pack_shard_start_revprop:
@@ -743,8 +742,7 @@ repos_notify_handler(void *baton,
       return;
 
     case svn_repos_notify_pack_shard_end_revprop:
-      svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
-                                        _("done.\n")));
+      svn_error_clear(svn_stream_puts(feedback_stream, _("done.\n")));
       return;
 
     case svn_repos_notify_load_txn_committed:
@@ -838,7 +836,7 @@ repos_notify_handler(void *baton,
       return;
 
     case svn_repos_notify_upgrade_start:
-      svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
+      svn_error_clear(svn_stream_puts(feedback_stream,
                              _("Repository lock acquired.\n"
                                "Please wait; upgrading the"
                                " repository may take some time...\n")));

Modified: subversion/branches/inheritable-props/subversion/svndumpfilter/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/svndumpfilter/main.c?rev=1354186&r1=1354185&r2=1354186&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/svndumpfilter/main.c (original)
+++ subversion/branches/inheritable-props/subversion/svndumpfilter/main.c Tue Jun 26 19:26:49 2012
@@ -110,6 +110,28 @@ write_prop_to_stringbuf(svn_stringbuf_t 
 }
 
 
+/* Writes a property deletion in dumpfile format to given stringbuf. */
+static void
+write_propdel_to_stringbuf(svn_stringbuf_t **strbuf,
+                           const char *name)
+{
+  int bytes_used;
+  size_t namelen;
+  char buf[SVN_KEYLINE_MAXLEN];
+
+  /* Output name length, then name. */
+  namelen = strlen(name);
+  svn_stringbuf_appendbytes(*strbuf, "D ", 2);
+
+  bytes_used = apr_snprintf(buf, sizeof(buf), "%" APR_SIZE_T_FMT, namelen);
+  svn_stringbuf_appendbytes(*strbuf, buf, bytes_used);
+  svn_stringbuf_appendbyte(*strbuf, '\n');
+
+  svn_stringbuf_appendbytes(*strbuf, name, namelen);
+  svn_stringbuf_appendbyte(*strbuf, '\n');
+}
+
+
 /* Compare the node-path PATH with the (const char *) prefixes in PFXLIST.
  * Return TRUE if any prefix is a prefix of PATH (matching whole path
  * components); FALSE otherwise.
@@ -187,6 +209,7 @@ struct parse_baton_t
   svn_boolean_t do_renumber_revs;
   svn_boolean_t preserve_revprops;
   svn_boolean_t skip_missing_merge_sources;
+  svn_boolean_t allow_deltas;
   apr_array_header_t *prefixes;
 
   /* Input and output streams. */
@@ -250,12 +273,36 @@ struct node_baton_t
   /* Pointers to dumpfile data. */
   svn_stringbuf_t *header;
   svn_stringbuf_t *props;
+
+  /* Expect deltas? */
+  svn_boolean_t has_prop_delta;
+  svn_boolean_t has_text_delta;
+
+  /* We might need the node path in a parse error message. */
+  char *node_path;
 };
 
 
 
 /* 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;
+
+  if (version >= SVN_REPOS_DUMPFILE_FORMAT_VERSION_DELTAS)
+    pb->allow_deltas = TRUE;
+
+  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,
@@ -553,10 +600,13 @@ new_node_record(void **node_baton,
 
       nb->has_props = FALSE;
       nb->has_text = FALSE;
+      nb->has_prop_delta = FALSE;
+      nb->has_text_delta = FALSE;
       nb->writing_begun = FALSE;
       nb->tcl = tcl ? svn__atoui64(tcl) : 0;
       nb->header = svn_stringbuf_create_empty(pool);
       nb->props = svn_stringbuf_create_empty(pool);
+      nb->node_path = apr_pstrdup(pool, node_path);
 
       /* Now we know for sure that we have a node that will not be
          skipped, flush the revision if it has not already been done. */
@@ -569,6 +619,14 @@ new_node_record(void **node_baton,
           const char *key = svn__apr_hash_index_key(hi);
           const char *val = svn__apr_hash_index_val(hi);
 
+          if ((!strcmp(key, SVN_REPOS_DUMPFILE_PROP_DELTA))
+              && (!strcmp(val, "true")))
+            nb->has_prop_delta = TRUE;
+
+          if ((!strcmp(key, SVN_REPOS_DUMPFILE_TEXT_DELTA))
+              && (!strcmp(val, "true")))
+            nb->has_text_delta = TRUE;
+
           if ((!strcmp(key, SVN_REPOS_DUMPFILE_CONTENT_LENGTH))
               || (!strcmp(key, SVN_REPOS_DUMPFILE_PROP_CONTENT_LENGTH))
               || (!strcmp(key, SVN_REPOS_DUMPFILE_TEXT_CONTENT_LENGTH)))
@@ -791,10 +849,12 @@ set_node_property(void *node_baton,
   if (nb->do_skip)
     return SVN_NO_ERROR;
 
-  if (!nb->has_props)
-    return svn_error_create(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
-                            _("Delta property block detected - "
-                              "not supported by svndumpfilter"));
+  if (! (nb->has_props || nb->has_prop_delta))
+    return svn_error_createf(SVN_ERR_STREAM_MALFORMED_DATA, NULL,
+                             _("Delta property block detected, but deltas "
+                               "are not enabled for node '%s' in original "
+                               "revision %ld"),
+                             nb->node_path, rb->rev_orig);
 
   if (strcmp(name, SVN_PROP_MERGEINFO) == 0)
     {
@@ -804,6 +864,7 @@ set_node_property(void *node_baton,
       value = filtered_mergeinfo;
     }
 
+  nb->has_props = TRUE;
   write_prop_to_stringbuf(nb->props, name, value);
 
   return SVN_NO_ERROR;
@@ -811,6 +872,29 @@ set_node_property(void *node_baton,
 
 
 static svn_error_t *
+delete_node_property(void *node_baton, const char *name)
+{
+  struct node_baton_t *nb = node_baton;
+  struct revision_baton_t *rb = nb->rb;
+
+  if (nb->do_skip)
+    return SVN_NO_ERROR;
+
+  if (!nb->has_prop_delta)
+    return svn_error_createf(SVN_ERR_STREAM_MALFORMED_DATA, NULL,
+                             _("Delta property block detected, but deltas "
+                               "are not enabled for node '%s' in original"
+                               "revision %ld"),
+                             nb->node_path, rb->rev_orig);
+ 
+  nb->has_props = TRUE;
+  write_propdel_to_stringbuf(&(nb->props), name);
+
+  return SVN_NO_ERROR;
+}
+
+
+static svn_error_t *
 remove_node_props(void *node_baton)
 {
   struct node_baton_t *nb = node_baton;
@@ -878,14 +962,15 @@ 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,
-    NULL,
+    delete_node_property,
     remove_node_props,
     set_fulltext,
     NULL,
@@ -1031,17 +1116,7 @@ parse_baton_initialize(struct parse_bato
   baton->renumber_history = apr_hash_make(pool);
   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));
+  baton->allow_deltas = FALSE;
 
   *pb = baton;
   return SVN_NO_ERROR;
@@ -1144,8 +1219,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/inheritable-props/subversion/svnlook/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/svnlook/main.c?rev=1354186&r1=1354185&r2=1354186&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/svnlook/main.c (original)
+++ subversion/branches/inheritable-props/subversion/svnlook/main.c Tue Jun 26 19:26:49 2012
@@ -900,8 +900,7 @@ display_prop_diffs(const apr_array_heade
         if (!val_has_eol)
           {
             const char *s = "\\ No newline at end of property" APR_EOL_STR;
-            apr_size_t len = strlen(s);
-            SVN_ERR(svn_stream_write(out, s, &len));
+            SVN_ERR(svn_stream_puts(out, s));
           }
       }
     }

Propchange: subversion/branches/inheritable-props/subversion/svnmucc/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Jun 26 19:26:49 2012
@@ -0,0 +1,7 @@
+svnmucc
+svnmucc.exe
+.libs
+*.o
+*~
+.*~
+svnmucc-test-repos

Modified: subversion/branches/inheritable-props/subversion/svnrdump/dump_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/svnrdump/dump_editor.c?rev=1354186&r1=1354185&r2=1354186&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/svnrdump/dump_editor.c (original)
+++ subversion/branches/inheritable-props/subversion/svnrdump/dump_editor.c Tue Jun 26 19:26:49 2012
@@ -31,6 +31,7 @@
 #include "svn_dirent_uri.h"
 
 #include "private/svn_fspath.h"
+#include "private/svn_subr_private.h"
 
 #include "svnrdump.h"
 
@@ -248,7 +249,7 @@ do_dump_props(svn_stringbuf_t **propstri
 
       /* No text is going to be dumped. Write a couple of newlines and
          wait for the next node/ revision. */
-      SVN_ERR(svn_stream_printf(stream, scratch_pool, "\n\n"));
+      SVN_ERR(svn_stream_puts(stream, "\n\n"));
 
       /* Cleanup so that data is never dumped twice. */
       SVN_ERR(svn_hash__clear(props, scratch_pool));
@@ -267,7 +268,7 @@ do_dump_newlines(struct dump_edit_baton 
 {
   if (trigger_var && *trigger_var)
     {
-      SVN_ERR(svn_stream_printf(eb->stream, pool, "\n\n"));
+      SVN_ERR(svn_stream_puts(eb->stream, "\n\n"));
       *trigger_var = FALSE;
     }
   return SVN_NO_ERROR;
@@ -321,18 +322,17 @@ dump_node(struct dump_edit_baton *eb,
       /* We are here after a change_file_prop or change_dir_prop. They
          set up whatever dump_props they needed to- nothing to
          do here but print node action information */
-      SVN_ERR(svn_stream_printf(eb->stream, pool,
-                                SVN_REPOS_DUMPFILE_NODE_ACTION
-                                ": change\n"));
+      SVN_ERR(svn_stream_puts(eb->stream,
+                              SVN_REPOS_DUMPFILE_NODE_ACTION ": change\n"));
       break;
 
     case svn_node_action_replace:
       if (!is_copy)
         {
           /* Node-action: replace */
-          SVN_ERR(svn_stream_printf(eb->stream, pool,
-                                    SVN_REPOS_DUMPFILE_NODE_ACTION
-                                    ": replace\n"));
+          SVN_ERR(svn_stream_puts(eb->stream,
+                                  SVN_REPOS_DUMPFILE_NODE_ACTION
+                                  ": replace\n"));
 
           /* Wait for a change_*_prop to be called before dumping
              anything */
@@ -343,9 +343,8 @@ dump_node(struct dump_edit_baton *eb,
          copyfrom_rev are present: delete the original, and then re-add
          it */
 
-      SVN_ERR(svn_stream_printf(eb->stream, pool,
-                                SVN_REPOS_DUMPFILE_NODE_ACTION
-                                ": delete\n\n"));
+      SVN_ERR(svn_stream_puts(eb->stream,
+                              SVN_REPOS_DUMPFILE_NODE_ACTION ": delete\n\n"));
 
       /* Recurse: Print an additional add-with-history record. */
       SVN_ERR(dump_node(eb, path, kind, svn_node_action_add,
@@ -356,19 +355,18 @@ dump_node(struct dump_edit_baton *eb,
       break;
 
     case svn_node_action_delete:
-      SVN_ERR(svn_stream_printf(eb->stream, pool,
-                                SVN_REPOS_DUMPFILE_NODE_ACTION
-                                ": delete\n"));
+      SVN_ERR(svn_stream_puts(eb->stream,
+                              SVN_REPOS_DUMPFILE_NODE_ACTION ": delete\n"));
 
       /* We can leave this routine quietly now. Nothing more to do-
          print a couple of newlines because we're not dumping props or
          text. */
-      SVN_ERR(svn_stream_printf(eb->stream, pool, "\n\n"));
+      SVN_ERR(svn_stream_puts(eb->stream, "\n\n"));
       break;
 
     case svn_node_action_add:
-      SVN_ERR(svn_stream_printf(eb->stream, pool,
-                                SVN_REPOS_DUMPFILE_NODE_ACTION ": add\n"));
+      SVN_ERR(svn_stream_puts(eb->stream,
+                              SVN_REPOS_DUMPFILE_NODE_ACTION ": add\n"));
 
       if (!is_copy)
         {
@@ -811,9 +809,9 @@ close_file(void *file_baton,
       apr_status_t err;
 
       /* Text-delta: true */
-      SVN_ERR(svn_stream_printf(eb->stream, pool,
-                                SVN_REPOS_DUMPFILE_TEXT_DELTA
-                                ": true\n"));
+      SVN_ERR(svn_stream_puts(eb->stream,
+                              SVN_REPOS_DUMPFILE_TEXT_DELTA
+                              ": true\n"));
 
       err = apr_file_info_get(info, APR_FINFO_SIZE, eb->delta_file);
       if (err)
@@ -887,7 +885,7 @@ close_file(void *file_baton,
 
   /* Write a couple of blank lines for matching output with `svnadmin
      dump` */
-  SVN_ERR(svn_stream_printf(eb->stream, pool, "\n\n"));
+  SVN_ERR(svn_stream_puts(eb->stream, "\n\n"));
 
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/inheritable-props/subversion/svnrdump/load_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/svnrdump/load_editor.c?rev=1354186&r1=1354185&r2=1354186&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/svnrdump/load_editor.c (original)
+++ subversion/branches/inheritable-props/subversion/svnrdump/load_editor.c Tue Jun 26 19:26:49 2012
@@ -567,7 +567,7 @@ new_revision_record(void **revision_bato
      several separate operations. It is highly susceptible to race conditions.
      Calculate the revision 'offset' for finding copyfrom sources.
      It might be positive or negative. */
-  rb->rev_offset = (apr_int32_t) (rb->rev) - (head_rev + 1);
+  rb->rev_offset = (apr_int32_t) ((rb->rev) - (head_rev + 1));
 
   /* Stash the oldest (non-zero) dumpstream revision seen. */
   if ((rb->rev > 0) && (!SVN_IS_VALID_REVNUM(pb->oldest_dumpstream_rev)))
@@ -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/inheritable-props/subversion/svnrdump/svnrdump.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/svnrdump/svnrdump.c?rev=1354186&r1=1354185&r2=1354186&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/svnrdump/svnrdump.c (original)
+++ subversion/branches/inheritable-props/subversion/svnrdump/svnrdump.c Tue Jun 26 19:26:49 2012
@@ -217,7 +217,7 @@ replay_revstart(svn_revnum_t revision,
   SVN_ERR(svn_stream_write(stdout_stream, propstring->data,
                            &(propstring->len)));
 
-  SVN_ERR(svn_stream_printf(stdout_stream, pool, "\n"));
+  SVN_ERR(svn_stream_puts(stdout_stream, "\n"));
   SVN_ERR(svn_stream_close(stdout_stream));
 
   SVN_ERR(svn_rdump__get_dump_editor(editor, edit_baton, revision,
@@ -332,7 +332,7 @@ dump_revision_header(svn_ra_session_t *s
   /* The properties */
   SVN_ERR(svn_stream_write(stdout_stream, propstring->data,
                            &(propstring->len)));
-  SVN_ERR(svn_stream_printf(stdout_stream, pool, "\n"));
+  SVN_ERR(svn_stream_puts(stdout_stream, "\n"));
 
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/inheritable-props/subversion/svnserve/cyrus_auth.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/svnserve/cyrus_auth.c?rev=1354186&r1=1354185&r2=1354186&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/svnserve/cyrus_auth.c (original)
+++ subversion/branches/inheritable-props/subversion/svnserve/cyrus_auth.c Tue Jun 26 19:26:49 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;