subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bre...@apache.org
Subject svn commit: r1417569 [3/4] - in /subversion/branches/in-repo-authz: ./ subversion/bindings/swig/perl/native/ subversion/include/ subversion/include/private/ subversion/libsvn_client/ subversion/libsvn_delta/ subversion/libsvn_ra_local/ subversion/libsv...
Date Wed, 05 Dec 2012 18:27:54 GMT
Modified: subversion/branches/in-repo-authz/subversion/svn/conflict-callbacks.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/svn/conflict-callbacks.c?rev=1417569&r1=1417568&r2=1417569&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/svn/conflict-callbacks.c (original)
+++ subversion/branches/in-repo-authz/subversion/svn/conflict-callbacks.c Wed Dec  5 18:27:47 2012
@@ -281,6 +281,160 @@ launch_resolver(svn_boolean_t *performed
   return SVN_NO_ERROR;
 }
 
+
+/* Maximum line length for the prompt string. */
+#define MAX_PROMPT_WIDTH 70
+
+/* Description of a resolver option */
+typedef struct resolver_option_t
+{
+  const char *code;        /* one or two characters */
+  const char *short_desc;  /* short description */
+  const char *long_desc;   /* longer description */
+} resolver_option_t;
+
+/* Resolver options for a text conflict */
+static const resolver_option_t text_conflict_options[] =
+{
+  { "e",  "edit",             N_("change merged file in an editor") },
+  { "df", "diff-full",        N_("show all changes made to merged file") },
+  { "r",  "resolved",         N_("accept merged version of file") },
+  { "" },
+  { "dc", "display-conflict", N_("show all conflicts (ignoring merged version)") },
+  { "mc", "mine-conflict",    N_("accept my version for all conflicts (same)") },
+  { "tc", "theirs-conflict",  N_("accept their version for all conflicts (same)") },
+  { "" },
+  { "mf", "mine-full",        N_("accept my version of entire file (even "
+                                 "non-conflicts)") },
+  { "tf", "theirs-full",      N_("accept their version of entire file (same)") },
+  { "" },
+  { "p",  "postpone",         N_("mark the conflict to be resolved later") },
+  { "m",  "merge",            N_("use internal merge tool to resolve conflict") },
+  { "l",  "launch",           N_("launch external tool to resolve conflict") },
+  { "s",  "show all options", N_("show this list") },
+  { NULL }
+};
+
+/* Resolver options for a property conflict */
+static const resolver_option_t prop_conflict_options[] =
+{
+  { "p",  "postpone",         N_("mark the conflict to be resolved later") },
+  { "mf", "mine-full",        N_("accept my version of entire file (even "
+                                "non-conflicts)") },
+  { "tf", "theirs-full",      N_("accept their version of entire file (same)") },
+  { NULL }
+};
+
+/* Resolver options for an obstructued addition */
+static const resolver_option_t obstructed_add_options[] =
+{
+  { "p",  "postpone",         N_("resolve the conflict later") },
+  { "mf", "mine-full",        N_("accept pre-existing item (ignore upstream addition)") },
+  { "tf", "theirs-full",      N_("accept incoming item (overwrite pre-existing item)") },
+  { "h",  "help",             N_("show this help") },
+  { NULL }
+};
+
+/* Resolver options for a tree conflict */
+static const resolver_option_t tree_conflict_options[] =
+{
+  { "p",  "postpone",         N_("resolve the conflict later") },
+  { "r",  "resolved",         N_("accept current working copy state") },
+  { "mc", "mine-conflict",    N_("prefer local change") },
+  { "tc", "theirs-conflict",  N_("prefer incoming change") },
+  { "h",  "show help",        N_("show this help") },
+  { NULL }
+};
+
+/* Return a pointer to the option description in OPTIONS matching the
+ * one- or two-character OPTION_CODE.  Return NULL if not found. */
+static const resolver_option_t *
+find_option(const resolver_option_t *options,
+            const char *option_code)
+{
+  const resolver_option_t *opt;
+
+  for (opt = options; opt->code; opt++)
+    {
+      if (strcmp(opt->code, option_code) == 0)
+        return opt;
+    }
+  return NULL;
+}
+
+/* Return a prompt string listing the options OPTIONS. If OPTION_CODES is
+ * non-null, select only the options whose codes are mentioned in it. */
+static const char *
+prompt_string(const resolver_option_t *options,
+              const char *const *option_codes,
+              apr_pool_t *pool)
+{
+  const char *result = "Select:";
+  int this_line_len = strlen(result);
+  svn_boolean_t first = TRUE;
+
+  while (1)
+    {
+      const resolver_option_t *opt;
+      const char *s;
+
+      if (option_codes)
+        {
+          if (! *option_codes)
+            break;
+          opt = find_option(options, *option_codes++);
+        }
+      else
+        {
+          opt = options++;
+          if (! opt->code)
+            break;
+        }
+
+      if (! first)
+        result = apr_pstrcat(pool, result, ",", (char *)NULL);
+      /* Break the line if adding the next option would make it too long */
+      if ((this_line_len + strlen(opt->short_desc) + 6) > MAX_PROMPT_WIDTH)
+        {
+          result = apr_pstrcat(pool, result, "\n       ", (char *)NULL);
+          this_line_len = 7;
+        }
+      s = apr_psprintf(pool, " (%s) %s",
+                       opt->code, opt->short_desc);
+      result = apr_pstrcat(pool, result, s, (char *)NULL);
+      this_line_len += strlen(s);
+      first = FALSE;
+    }
+  return apr_pstrcat(pool, result, ": ", (char *)NULL);
+}
+
+/* Return a help string listing the OPTIONS. */
+static const char *
+help_string(const resolver_option_t *options,
+            apr_pool_t *pool)
+{
+  const char *result = "";
+  const resolver_option_t *opt;
+
+  for (opt = options; opt->code; opt++)
+    {
+      /* Append a line describing OPT, or a blank line if its code is "". */
+      if (opt->code[0])
+        {
+          const char *s = apr_psprintf(pool, "  (%s)", opt->code);
+
+          result = apr_psprintf(pool, "%s%-6s %-16s - %s\n",
+                                result, s, opt->short_desc, opt->long_desc);
+        }
+      else
+        {
+          result = apr_pstrcat(pool, result, "\n", (char *)NULL);
+        }
+    }
+  return result;
+}
+
+
 /* Ask the user what to do about the text conflict described by DESC.
  * Return the answer in RESULT. B is the conflict baton for this
  * conflict resolution session.
@@ -291,8 +445,7 @@ handle_text_conflict(svn_wc_conflict_res
                      svn_cl__interactive_conflict_baton_t *b,
                      apr_pool_t *scratch_pool)
 {
-  const char *answer;
-  char *prompt;
+  apr_pool_t *iterpool = svn_pool_create(scratch_pool);
   svn_boolean_t diff_allowed = FALSE;
   /* Have they done something that might have affected the merged
      file (so that we need to save a .edited copy)? */
@@ -319,73 +472,45 @@ handle_text_conflict(svn_wc_conflict_res
 
   while (TRUE)
     {
-      svn_pool_clear(scratch_pool);
+      const char *options[12];  /* size of array must be big enough */
+      const char **next_option = options;
+      const char *prompt;
+      const char *answer;
 
-      prompt = apr_pstrdup(scratch_pool, _("Select: (p) postpone"));
+      svn_pool_clear(iterpool);
 
+      *next_option++ = "p";
       if (diff_allowed)
         {
-          prompt = apr_pstrcat(scratch_pool, prompt,
-                               _(", (df) diff-full, (e) edit, (m) merge"),
-                               (char *)NULL);
+          *next_option++ = "df";
+          *next_option++ = "e";
+          *next_option++ = "m";
 
           if (knows_something)
-            prompt = apr_pstrcat(scratch_pool, prompt, _(", (r) resolved"),
-                                 (char *)NULL);
+            *next_option++ = "r";
 
           if (! desc->is_binary)
-            prompt = apr_pstrcat(scratch_pool, prompt,
-                                 _(",\n        (mc) mine-conflict, "
-                                   "(tc) theirs-conflict"),
-                                 (char *)NULL);
+            *next_option++ = "mc";
+            *next_option++ = "tc";
         }
       else
         {
           if (knows_something)
-            prompt = apr_pstrcat(scratch_pool, prompt, _(", (r) resolved"),
-                                 (char *)NULL);
-          prompt = apr_pstrcat(scratch_pool, prompt,
-                               _(",\n        "
-                                 "(mf) mine-full, (tf) theirs-full"),
-                               (char *)NULL);
-        }
-
-      prompt = apr_pstrcat(scratch_pool, prompt, ",\n        ", (char *)NULL);
-      prompt = apr_pstrcat(scratch_pool, prompt,
-                           _("(s) show all options: "),
-                           (char *)NULL);
+            *next_option++ = "r";
+          *next_option++ = "mf";
+          *next_option++ = "tf";
+        }
+      *next_option++ = "s";
+      *next_option++ = NULL;
+      prompt = prompt_string(text_conflict_options, options, iterpool);
 
-      SVN_ERR(svn_cmdline_prompt_user2(&answer, prompt, b->pb, scratch_pool));
+      SVN_ERR(svn_cmdline_prompt_user2(&answer, prompt, b->pb, iterpool));
 
       if (strcmp(answer, "s") == 0)
         {
-          /* These are used in svn_cl__accept_from_word(). */
-          SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool,
-          _("\n"
-            "  (e)  edit             - change merged file in an editor\n"
-            "  (df) diff-full        - show all changes made to merged "
-                                      "file\n"
-            "  (r)  resolved         - accept merged version of file\n"
-            "\n"
-            "  (dc) display-conflict - show all conflicts "
-                                      "(ignoring merged version)\n"
-            "  (mc) mine-conflict    - accept my version for all "
-                                      "conflicts (same)\n"
-            "  (tc) theirs-conflict  - accept their version for all "
-                                      "conflicts (same)\n"
-            "\n"
-            "  (mf) mine-full        - accept my version of entire file "
-                                      "(even non-conflicts)\n"
-            "  (tf) theirs-full      - accept their version of entire "
-                                      "file (same)\n"
-            "\n"
-            "  (p)  postpone         - mark the conflict to be "
-                                      "resolved later\n"
-            "  (m)  merge            - use internal merge tool to "
-                                      "resolve conflict\n"
-            "  (l)  launch           - launch external tool to "
-                                      "resolve conflict\n"
-            "  (s)  show all         - show this list\n\n")));
+          SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool, "\n%s\n",
+                                      help_string(text_conflict_options,
+                                                  iterpool)));
         }
       else if (strcmp(answer, "p") == 0 || strcmp(answer, ":-P") == 0)
         {
@@ -397,7 +522,7 @@ handle_text_conflict(svn_wc_conflict_res
         {
           if (desc->is_binary)
             {
-              SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool,
+              SVN_ERR(svn_cmdline_fprintf(stderr, iterpool,
                                           _("Invalid option; cannot choose "
                                             "based on conflicts in a "
                                             "binary file.\n\n")));
@@ -412,7 +537,7 @@ handle_text_conflict(svn_wc_conflict_res
         {
           if (desc->is_binary)
             {
-              SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool,
+              SVN_ERR(svn_cmdline_fprintf(stderr, iterpool,
                                           _("Invalid option; cannot choose "
                                             "based on conflicts in a "
                                             "binary file.\n\n")));
@@ -441,7 +566,7 @@ handle_text_conflict(svn_wc_conflict_res
         {
           if (desc->is_binary)
             {
-              SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool,
+              SVN_ERR(svn_cmdline_fprintf(stderr, iterpool,
                                           _("Invalid option; cannot "
                                             "display conflicts for a "
                                             "binary file.\n\n")));
@@ -450,30 +575,30 @@ handle_text_conflict(svn_wc_conflict_res
           else if (! (desc->my_abspath && desc->base_abspath &&
                       desc->their_abspath))
             {
-              SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool,
+              SVN_ERR(svn_cmdline_fprintf(stderr, iterpool,
                                           _("Invalid option; original "
                                             "files not available.\n\n")));
               continue;
             }
-          SVN_ERR(show_conflicts(desc, scratch_pool));
+          SVN_ERR(show_conflicts(desc, iterpool));
           knows_something = TRUE;
         }
       else if (strcmp(answer, "df") == 0)
         {
           if (! diff_allowed)
             {
-              SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool,
+              SVN_ERR(svn_cmdline_fprintf(stderr, iterpool,
                              _("Invalid option; there's no "
                                 "merged version to diff.\n\n")));
               continue;
             }
 
-          SVN_ERR(show_diff(desc, scratch_pool));
+          SVN_ERR(show_diff(desc, iterpool));
           knows_something = TRUE;
         }
       else if (strcmp(answer, "e") == 0 || strcmp(answer, ":-E") == 0)
         {
-          SVN_ERR(open_editor(&performed_edit, desc, b, scratch_pool));
+          SVN_ERR(open_editor(&performed_edit, desc, b, iterpool));
           if (performed_edit)
             knows_something = TRUE;
         }
@@ -482,7 +607,7 @@ handle_text_conflict(svn_wc_conflict_res
         {
           if (desc->kind != svn_wc_conflict_kind_text)
             {
-              SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool,
+              SVN_ERR(svn_cmdline_fprintf(stderr, iterpool,
                                           _("Invalid option; can only "
                                             "resolve text conflicts with "
                                             "the internal merge tool."
@@ -504,11 +629,11 @@ handle_text_conflict(svn_wc_conflict_res
                                          b->editor_cmd,
                                          b->config,
                                          &remains_in_conflict,
-                                         scratch_pool));
+                                         iterpool));
               knows_something = !remains_in_conflict;
             }
           else
-            SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool,
+            SVN_ERR(svn_cmdline_fprintf(stderr, iterpool,
                                         _("Invalid option.\n\n")));
         }
       else if (strcmp(answer, "l") == 0 || strcmp(answer, ":-l") == 0)
@@ -516,12 +641,12 @@ handle_text_conflict(svn_wc_conflict_res
           if (desc->base_abspath && desc->their_abspath &&
               desc->my_abspath && desc->merged_file)
             {
-              SVN_ERR(launch_resolver(&performed_edit, desc, b, scratch_pool));
+              SVN_ERR(launch_resolver(&performed_edit, desc, b, iterpool));
               if (performed_edit)
                 knows_something = TRUE;
             }
           else
-            SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool,
+            SVN_ERR(svn_cmdline_fprintf(stderr, iterpool,
                                         _("Invalid option.\n\n")));
         }
       else if (strcmp(answer, "r") == 0)
@@ -535,10 +660,11 @@ handle_text_conflict(svn_wc_conflict_res
               break;
             }
           else
-            SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool,
+            SVN_ERR(svn_cmdline_fprintf(stderr, iterpool,
                                         _("Invalid option.\n\n")));
         }
     }
+  svn_pool_destroy(iterpool);
 
   return SVN_NO_ERROR;
 }
@@ -553,9 +679,8 @@ handle_prop_conflict(svn_wc_conflict_res
                      svn_cl__interactive_conflict_baton_t *b,
                      apr_pool_t *scratch_pool)
 {
-  const char *answer;
-  const char *prompt;
-  svn_stringbuf_t *prop_reject;
+  const char *prompt
+    = prompt_string(prop_conflict_options, NULL, scratch_pool);
   apr_pool_t *iterpool;
 
   SVN_ERR_ASSERT(desc->kind == svn_wc_conflict_kind_property);
@@ -575,6 +700,8 @@ handle_prop_conflict(svn_wc_conflict_res
    * ### This needs to be fixed so we can present better options here. */
   if (desc->their_abspath)
     {
+      svn_stringbuf_t *prop_reject;
+
       /* ### The library dumps an svn_string_t into a temp file, and
        * ### we read it back from the file into an svn_stringbuf_t here.
        * ### That's rather silly. We should be passed svn_string_t's
@@ -596,9 +723,9 @@ handle_prop_conflict(svn_wc_conflict_res
   iterpool = svn_pool_create(scratch_pool);
   while (TRUE)
     {
-      svn_pool_clear(iterpool);
+      const char *answer;
 
-      prompt = _("Select: (p) postpone, (mf) mine-full, (tf) theirs-full: ");
+      svn_pool_clear(iterpool);
 
       SVN_ERR(svn_cmdline_prompt_user2(&answer, prompt, b->pb, iterpool));
 
@@ -794,7 +921,8 @@ svn_cl__conflict_func_interactive(svn_wc
            && (desc->reason == svn_wc_conflict_reason_obstructed))
     {
       const char *answer;
-      const char *prompt;
+      const char *prompt
+        = prompt_string(obstructed_add_options, NULL, scratch_pool);
 
       SVN_ERR(svn_cmdline_fprintf(
                    stderr, subpool,
@@ -803,8 +931,6 @@ svn_cl__conflict_func_interactive(svn_wc
                    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: ");
 
       while (1)
         {
@@ -814,13 +940,9 @@ svn_cl__conflict_func_interactive(svn_wc
 
           if (strcmp(answer, "h") == 0 || strcmp(answer, "?") == 0)
             {
-              SVN_ERR(svn_cmdline_fprintf(stderr, subpool,
-              _("  (p)  postpone    - resolve the conflict later\n"
-                "  (mf) mine-full   - accept pre-existing item "
-                "(ignore upstream addition)\n"
-                "  (tf) theirs-full - accept incoming item "
-                "(overwrite pre-existing item)\n"
-                "  (h)  help        - show this help\n\n")));
+              SVN_ERR(svn_cmdline_fprintf(stderr, subpool, "%s\n",
+                                          help_string(obstructed_add_options,
+                                                      subpool)));
             }
           if (strcmp(answer, "p") == 0 || strcmp(answer, ":-P") == 0)
             {
@@ -843,7 +965,8 @@ svn_cl__conflict_func_interactive(svn_wc
   else if (desc->kind == svn_wc_conflict_kind_tree)
     {
       const char *answer;
-      const char *prompt;
+      const char *prompt
+        = prompt_string(tree_conflict_options, NULL, scratch_pool);
       const char *readable_desc;
 
       SVN_ERR(svn_cl__get_human_readable_tree_conflict_description(
@@ -856,10 +979,6 @@ svn_cl__conflict_func_interactive(svn_wc
                                                      scratch_pool),
                    readable_desc));
 
-      prompt = _("Select: (p) postpone, (r) mark-resolved, "
-                 "(mc) mine-conflict,\n"
-                 "        (tc) theirs-conflict, (h) help: ");
-
       while (1)
         {
           svn_pool_clear(subpool);
@@ -868,11 +987,9 @@ svn_cl__conflict_func_interactive(svn_wc
 
           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 copy state\n"
-                "  (mc) mine-conflict   - prefer local change\n"
-                "  (tc) theirs-conflict - prefer incoming change\n")));
+              SVN_ERR(svn_cmdline_fprintf(stderr, subpool, "%s",
+                                          help_string(tree_conflict_options,
+                                                      subpool)));
             }
           if (strcmp(answer, "p") == 0 || strcmp(answer, ":-p") == 0)
             {

Modified: subversion/branches/in-repo-authz/subversion/svn/log-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/svn/log-cmd.c?rev=1417569&r1=1417568&r2=1417569&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/svn/log-cmd.c (original)
+++ subversion/branches/in-repo-authz/subversion/svn/log-cmd.c Wed Dec  5 18:27:47 2012
@@ -39,6 +39,8 @@
 #include "svn_props.h"
 #include "svn_pools.h"
 
+#include "private/svn_cmdline_private.h"
+
 #include "cl.h"
 
 #include "svn_private_config.h"
@@ -653,9 +655,9 @@ log_entry_receiver_xml(void *baton,
   if (log_entry->revprops && apr_hash_count(log_entry->revprops) > 0)
     {
       svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "revprops", NULL);
-      SVN_ERR(svn_cl__print_xml_prop_hash(&sb, log_entry->revprops,
-                                          FALSE, /* name_only */
-                                          FALSE, pool));
+      SVN_ERR(svn_cmdline__print_xml_prop_hash(&sb, log_entry->revprops,
+                                               FALSE, /* name_only */
+                                               FALSE, pool));
       svn_xml_make_close_tag(&sb, pool, "revprops");
     }
 

Modified: subversion/branches/in-repo-authz/subversion/svn/merge-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/svn/merge-cmd.c?rev=1417569&r1=1417568&r2=1417569&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/svn/merge-cmd.c (original)
+++ subversion/branches/in-repo-authz/subversion/svn/merge-cmd.c Wed Dec  5 18:27:47 2012
@@ -37,6 +37,10 @@
 
 #include "svn_private_config.h"
 
+/* A handy constant */
+static const svn_opt_revision_t unspecified_revision
+  = { svn_opt_revision_unspecified, { 0 } };
+
 
 /*** Code. ***/
 
@@ -47,6 +51,7 @@ merge_reintegrate(const char *source_pat
                   const svn_opt_revision_t *source_peg_revision,
                   const char *target_wcpath,
                   svn_boolean_t dry_run,
+                  svn_boolean_t verbose,
                   const apr_array_header_t *merge_options,
                   svn_client_ctx_t *ctx,
                   apr_pool_t *scratch_pool)
@@ -54,6 +59,15 @@ merge_reintegrate(const char *source_pat
   const char *url1, *url2;
   svn_revnum_t rev1, rev2;
 
+  if (verbose)
+    SVN_ERR(svn_cmdline_printf(scratch_pool, _("checking branch relationship...\n")));
+  SVN_ERR_W(svn_cl__check_related_source_and_target(
+              source_path_or_url, source_peg_revision,
+              target_wcpath, &unspecified_revision, ctx, scratch_pool),
+            _("Source and target must be different but related branches"));
+
+  if (verbose)
+    SVN_ERR(svn_cmdline_printf(scratch_pool, _("calculating reintegrate merge...\n")));
   SVN_ERR(svn_client_find_reintegrate_merge(
             &url1, &rev1, &url2, &rev2,
             source_path_or_url, source_peg_revision, target_wcpath,
@@ -70,6 +84,9 @@ merge_reintegrate(const char *source_pat
       revision2.kind = svn_opt_revision_number;
       revision2.value.number = rev2;
 
+      if (verbose)
+        SVN_ERR(svn_cmdline_printf(scratch_pool, _("merging...\n")));
+
       /* 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
        * already checked in svn_client_find_reintegrate_merge(). */
@@ -116,12 +133,23 @@ automatic_merge(const char *source_path_
                 svn_boolean_t allow_mixed_rev,
                 svn_boolean_t allow_local_mods,
                 svn_boolean_t allow_switched_subtrees,
+                svn_boolean_t verbose,
                 const apr_array_header_t *merge_options,
                 svn_client_ctx_t *ctx,
                 apr_pool_t *scratch_pool)
 {
   svn_client_automatic_merge_t *merge;
 
+  if (verbose)
+    SVN_ERR(svn_cmdline_printf(scratch_pool, _("checking branch relationship...\n")));
+  SVN_ERR_W(svn_cl__check_related_source_and_target(
+              source_path_or_url, source_revision,
+              target_wcpath, &unspecified_revision, ctx, scratch_pool),
+            _("Source and target must be different but related branches"));
+
+  if (verbose)
+    SVN_ERR(svn_cmdline_printf(scratch_pool, _("calculating automatic merge...\n")));
+
   /* Find the 3-way merges needed (and check suitability of the WC). */
   SVN_ERR(svn_client_find_automatic_merge(&merge,
                                           source_path_or_url, source_revision,
@@ -156,6 +184,9 @@ automatic_merge(const char *source_path_
                                   "cannot be used with this kind of merge"));
     }
 
+  if (verbose)
+    SVN_ERR(svn_cmdline_printf(scratch_pool, _("merging...\n")));
+
   /* Perform the 3-way merges */
   SVN_ERR(svn_client_do_automatic_merge(merge, target_wcpath, depth,
                                         force, record_only,
@@ -181,7 +212,6 @@ svn_cl__merge(apr_getopt_t *os,
   svn_opt_revision_t first_range_start, first_range_end, peg_revision1,
     peg_revision2;
   apr_array_header_t *options, *ranges_to_merge = opt_state->revision_ranges;
-  svn_opt_revision_t unspecified = { svn_opt_revision_unspecified, { 0 } };
 
   /* Merge doesn't support specifying a revision or revision range
      when using --reintegrate. */
@@ -435,11 +465,6 @@ svn_cl__merge(apr_getopt_t *os,
       && first_range_start.kind == svn_opt_revision_unspecified
       && first_range_end.kind == svn_opt_revision_unspecified)
     {
-      SVN_ERR_W(svn_cl__check_related_source_and_target(
-                  sourcepath1, &peg_revision1, targetpath, &unspecified,
-                  ctx, pool),
-                _("Source and target must be different but related branches"));
-
       merge_err = automatic_merge(sourcepath1, &peg_revision1, targetpath,
                                   opt_state->depth,
                                   opt_state->force,
@@ -448,17 +473,14 @@ svn_cl__merge(apr_getopt_t *os,
                                   opt_state->allow_mixed_rev,
                                   TRUE /*allow_local_mods*/,
                                   TRUE /*allow_switched_subtrees*/,
+                                  opt_state->verbose,
                                   options, ctx, pool);
     }
   else if (opt_state->reintegrate)
     {
-      SVN_ERR_W(svn_cl__check_related_source_and_target(
-                  sourcepath1, &peg_revision1, targetpath, &unspecified,
-                  ctx, pool),
-                _("Source and target must be different but related branches"));
-
       merge_err = merge_reintegrate(sourcepath1, &peg_revision1, targetpath,
-                                    opt_state->dry_run, options, ctx, pool);
+                                    opt_state->dry_run, opt_state->verbose,
+                                    options, ctx, pool);
     }
   else if (! two_sources_specified)
     {
@@ -476,12 +498,16 @@ svn_cl__merge(apr_getopt_t *os,
           APR_ARRAY_PUSH(ranges_to_merge, svn_opt_revision_range_t *) = range;
 
           /* This must be a 'sync' merge so check branch relationship. */
+          if (opt_state->verbose)
+            SVN_ERR(svn_cmdline_printf(pool, _("checking branch relationship...\n")));
           SVN_ERR_W(svn_cl__check_related_source_and_target(
-                      sourcepath1, &peg_revision1, targetpath, &unspecified,
-                      ctx, pool),
+                      sourcepath1, &peg_revision1,
+                      targetpath, &unspecified_revision, ctx, pool),
                 _("Source and target must be different but related branches"));
         }
 
+      if (opt_state->verbose)
+        SVN_ERR(svn_cmdline_printf(pool, _("merging...\n")));
       merge_err = svn_client_merge_peg4(sourcepath1,
                                         ranges_to_merge,
                                         &peg_revision1,
@@ -502,6 +528,9 @@ svn_cl__merge(apr_getopt_t *os,
         return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
                                 _("Merge sources must both be "
                                   "either paths or URLs"));
+
+      if (opt_state->verbose)
+        SVN_ERR(svn_cmdline_printf(pool, _("merging...\n")));
       merge_err = svn_client_merge4(sourcepath1,
                                     &first_range_start,
                                     sourcepath2,

Modified: subversion/branches/in-repo-authz/subversion/svn/propget-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/svn/propget-cmd.c?rev=1417569&r1=1417568&r2=1417569&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/svn/propget-cmd.c (original)
+++ subversion/branches/in-repo-authz/subversion/svn/propget-cmd.c Wed Dec  5 18:27:47 2012
@@ -210,7 +210,7 @@ print_single_prop(svn_string_t *propval,
       apr_hash_t *hash = apr_hash_make(scratch_pool);
 
       apr_hash_set(hash, pname_utf8, APR_HASH_KEY_STRING, propval);
-      SVN_ERR(svn_cl__print_prop_hash(out, hash, FALSE, scratch_pool));
+      SVN_ERR(svn_cmdline__print_prop_hash(out, hash, FALSE, scratch_pool));
     }
   else
     {

Modified: subversion/branches/in-repo-authz/subversion/svn/proplist-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/svn/proplist-cmd.c?rev=1417569&r1=1417568&r2=1417569&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/svn/proplist-cmd.c (original)
+++ subversion/branches/in-repo-authz/subversion/svn/proplist-cmd.c Wed Dec  5 18:27:47 2012
@@ -38,6 +38,8 @@
 #include "svn_props.h"
 #include "cl.h"
 
+#include "private/svn_cmdline_private.h"
+
 #include "svn_private_config.h"
 
 typedef struct proplist_baton_t
@@ -82,9 +84,9 @@ proplist_receiver_xml(void *baton,
 
           svn_xml_make_open_tag(&sb, iterpool, svn_xml_normal, "target",
                             "path", name_local, NULL);
-          SVN_ERR(svn_cl__print_xml_prop_hash(&sb, iprop->prop_hash,
-                                              (! opt_state->verbose),
-                                              TRUE, iterpool));
+          SVN_ERR(svn_cmdline__print_xml_prop_hash(&sb, iprop->prop_hash,
+                                                   (! opt_state->verbose),
+                                                   TRUE, iterpool));
           svn_xml_make_close_tag(&sb, iterpool, "target");
           SVN_ERR(svn_cl__error_checked_fputs(sb->data, stdout));
         }
@@ -105,9 +107,9 @@ proplist_receiver_xml(void *baton,
         svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "target",
                               "path", name_local, NULL);
 
-        SVN_ERR(svn_cl__print_xml_prop_hash(&sb, prop_hash,
-                                            (! opt_state->verbose),
-                                            FALSE, pool));
+        SVN_ERR(svn_cmdline__print_xml_prop_hash(&sb, prop_hash,
+                                                 (! opt_state->verbose),
+                                                 FALSE, pool));
 
         /* "</target>" */
         svn_xml_make_close_tag(&sb, pool, "target");
@@ -160,8 +162,9 @@ proplist_receiver(void *baton,
                                                      iterpool)));
             }
 
-          SVN_ERR(svn_cl__print_prop_hash(NULL, iprop->prop_hash,
-                                          (! opt_state->verbose), iterpool));
+          SVN_ERR(svn_cmdline__print_prop_hash(NULL, iprop->prop_hash,
+                                               (! opt_state->verbose),
+                                               iterpool));
         }
       svn_pool_destroy(iterpool);
     }
@@ -171,8 +174,8 @@ proplist_receiver(void *baton,
       if (!opt_state->quiet)
         SVN_ERR(svn_cmdline_printf(pool, _("Properties on '%s':\n"),
                                    name_local));
-      SVN_ERR(svn_cl__print_prop_hash(NULL, prop_hash, (! opt_state->verbose),
-                                      pool));
+      SVN_ERR(svn_cmdline__print_prop_hash(NULL, prop_hash,
+                                           (! opt_state->verbose), pool));
     }
 
   return SVN_NO_ERROR;
@@ -228,9 +231,9 @@ svn_cl__proplist(apr_getopt_t *os,
           svn_xml_make_open_tag(&sb, scratch_pool, svn_xml_normal,
                                 "revprops",
                                 "rev", revstr, NULL);
-          SVN_ERR(svn_cl__print_xml_prop_hash(&sb, proplist,
-                                              (! opt_state->verbose), FALSE,
-                                              scratch_pool));
+          SVN_ERR(svn_cmdline__print_xml_prop_hash(&sb, proplist,
+                                                   (! opt_state->verbose),
+                                                   FALSE, scratch_pool));
           svn_xml_make_close_tag(&sb, scratch_pool, "revprops");
 
           SVN_ERR(svn_cl__error_checked_fputs(sb->data, stdout));
@@ -243,8 +246,9 @@ svn_cl__proplist(apr_getopt_t *os,
                                 _("Unversioned properties on revision %ld:\n"),
                                 rev));
 
-          SVN_ERR(svn_cl__print_prop_hash
-                  (NULL, proplist, (! opt_state->verbose), scratch_pool));
+          SVN_ERR(svn_cmdline__print_prop_hash(NULL, proplist,
+                                               (! opt_state->verbose),
+                                               scratch_pool));
         }
     }
   else  /* operate on normal, versioned properties (not revprops) */

Modified: subversion/branches/in-repo-authz/subversion/svn/props.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/svn/props.c?rev=1417569&r1=1417568&r2=1417569&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/svn/props.c (original)
+++ subversion/branches/in-repo-authz/subversion/svn/props.c Wed Dec  5 18:27:47 2012
@@ -83,121 +83,6 @@ svn_cl__revprop_prepare(const svn_opt_re
   return SVN_NO_ERROR;
 }
 
-
-svn_error_t *
-svn_cl__print_prop_hash(svn_stream_t *out,
-                        apr_hash_t *prop_hash,
-                        svn_boolean_t names_only,
-                        apr_pool_t *pool)
-{
-  apr_array_header_t *sorted_props;
-  int i;
-
-  sorted_props = svn_sort__hash(prop_hash, svn_sort_compare_items_lexically,
-                                pool);
-  for (i = 0; i < sorted_props->nelts; i++)
-    {
-      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;
-
-      if (svn_prop_needs_translation(pname))
-        SVN_ERR(svn_subst_detranslate_string(&propval, propval,
-                                             TRUE, pool));
-
-      SVN_ERR(svn_cmdline_cstring_from_utf8(&pname_stdout, pname, pool));
-
-      if (out)
-        {
-          pname_stdout = apr_psprintf(pool, "  %s\n", pname_stdout);
-          SVN_ERR(svn_subst_translate_cstring2(pname_stdout, &pname_stdout,
-                                              APR_EOL_STR,  /* 'native' eol */
-                                              FALSE, /* no repair */
-                                              NULL,  /* no keywords */
-                                              FALSE, /* no expansion */
-                                              pool));
-
-          SVN_ERR(svn_stream_puts(out, pname_stdout));
-        }
-      else
-        {
-          /* ### We leave these printfs for now, since if propval wasn't
-             translated above, we don't know anything about its encoding.
-             In fact, it might be binary data... */
-          printf("  %s\n", pname_stdout);
-        }
-
-      if (!names_only)
-        {
-          /* Add an extra newline to the value before indenting, so that
-           * every line of output has the indentation whether the value
-           * already ended in a newline or not. */
-          const char *newval = apr_psprintf(pool, "%s\n", propval->data);
-          const char *indented_newval = svn_cl__indent_string(newval,
-                                                              "    ",
-                                                              pool);
-          if (out)
-            {
-              SVN_ERR(svn_stream_puts(out, indented_newval));
-            }
-          else
-            {
-              printf("%s", indented_newval);
-            }
-        }
-    }
-
-  return SVN_NO_ERROR;
-}
-
-svn_error_t *
-svn_cl__print_xml_prop_hash(svn_stringbuf_t **outstr,
-                            apr_hash_t *prop_hash,
-                            svn_boolean_t names_only,
-                            svn_boolean_t inherited_props,
-                            apr_pool_t *pool)
-{
-  apr_array_header_t *sorted_props;
-  int i;
-
-  if (*outstr == NULL)
-    *outstr = svn_stringbuf_create_empty(pool);
-
-  sorted_props = svn_sort__hash(prop_hash, svn_sort_compare_items_lexically,
-                                pool);
-  for (i = 0; i < sorted_props->nelts; i++)
-    {
-      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)
-        {
-          svn_xml_make_open_tag(
-            outstr, pool, svn_xml_self_closing,
-            inherited_props ? "inherited_property" : "property",
-            "name", pname, NULL);
-        }
-      else
-        {
-          const char *pname_out;
-
-          if (svn_prop_needs_translation(pname))
-            SVN_ERR(svn_subst_detranslate_string(&propval, propval,
-                                                 TRUE, pool));
-
-          SVN_ERR(svn_cmdline_cstring_from_utf8(&pname_out, pname, pool));
-
-          svn_cmdline__print_xml_prop(outstr, pname_out, propval,
-                                      inherited_props, pool);
-        }
-    }
-
-    return SVN_NO_ERROR;
-}
-
-
 void
 svn_cl__check_boolean_prop_val(const char *propname, const char *propval,
                                apr_pool_t *pool)

Modified: subversion/branches/in-repo-authz/subversion/svn/schema/info.rnc
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/svn/schema/info.rnc?rev=1417569&r1=1417568&r2=1417569&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/svn/schema/info.rnc (original)
+++ subversion/branches/in-repo-authz/subversion/svn/schema/info.rnc Wed Dec  5 18:27:47 2012
@@ -27,8 +27,8 @@ info = element info { entry* }
 
 entry =
   element entry {
-    attlist.entry, url?, repository?, wc-info?, commit?, conflict?, lock?,
-    tree-conflict?
+    attlist.entry, url?, relative-url?, repository?, wc-info?,
+    commit?, conflict?, lock?, tree-conflict?
   }
 attlist.entry &=
   ## Local path.
@@ -41,6 +41,9 @@ attlist.entry &=
 ## URL of this item in the repository.
 url = element url { xsd:anyURI }
 
+## Repository relative URL (^/...) of this item in the repository.
+relative-url = element relative-url { string }
+
 ## Information of this item's repository.
 repository = element repository { root?, uuid? }
 

Modified: subversion/branches/in-repo-authz/subversion/svn/svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/svn/svn.c?rev=1417569&r1=1417568&r2=1417569&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/svn/svn.c (original)
+++ subversion/branches/in-repo-authz/subversion/svn/svn.c Wed Dec  5 18:27:47 2012
@@ -1036,7 +1036,7 @@ const svn_opt_subcommand_desc2_t svn_cl_
 "  repositories.\n"),
     {'r', 'c', 'N', opt_depth, 'q', opt_force, opt_dry_run, opt_merge_cmd,
      opt_record_only, 'x', opt_ignore_ancestry, opt_accept, opt_reintegrate,
-     opt_allow_mixed_revisions} },
+     opt_allow_mixed_revisions, 'v'} },
 
   { "mergeinfo", svn_cl__mergeinfo, {0}, N_
     ("Display merge-related information.\n"

Modified: subversion/branches/in-repo-authz/subversion/svn/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/svn/util.c?rev=1417569&r1=1417568&r2=1417569&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/svn/util.c (original)
+++ subversion/branches/in-repo-authz/subversion/svn/util.c Wed Dec  5 18:27:47 2012
@@ -1264,56 +1264,6 @@ svn_cl__time_cstring_to_human_cstring(co
   return SVN_NO_ERROR;
 }
 
-
-/* Return a copy, allocated in POOL, of the next line of text from *STR
- * up to and including a CR and/or an LF. Change *STR to point to the
- * remainder of the string after the returned part. If there are no
- * characters to be returned, return NULL; never return an empty string.
- */
-static const char *
-next_line(const char **str, apr_pool_t *pool)
-{
-  const char *start = *str;
-  const char *p = *str;
-
-  /* n.b. Throughout this fn, we never read any character after a '\0'. */
-  /* Skip over all non-EOL characters, if any. */
-  while (*p != '\r' && *p != '\n' && *p != '\0')
-    p++;
-  /* Skip over \r\n or \n\r or \r or \n, if any. */
-  if (*p == '\r' || *p == '\n')
-    {
-      char c = *p++;
-
-      if ((c == '\r' && *p == '\n') || (c == '\n' && *p == '\r'))
-        p++;
-    }
-
-  /* Now p points after at most one '\n' and/or '\r'. */
-  *str = p;
-
-  if (p == start)
-    return NULL;
-
-  return svn_string_ncreate(start, p - start, pool)->data;
-}
-
-const char *
-svn_cl__indent_string(const char *str,
-                      const char *indent,
-                      apr_pool_t *pool)
-{
-  svn_stringbuf_t *out = svn_stringbuf_create_empty(pool);
-  const char *line;
-
-  while ((line = next_line(&str, pool)))
-    {
-      svn_stringbuf_appendcstr(out, indent);
-      svn_stringbuf_appendcstr(out, line);
-    }
-  return out->data;
-}
-
 const char *
 svn_cl__node_description(const svn_wc_conflict_version_t *node,
                          const char *wc_repos_root_URL,

Modified: subversion/branches/in-repo-authz/subversion/svnlook/svnlook.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/svnlook/svnlook.c?rev=1417569&r1=1417568&r2=1417569&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/svnlook/svnlook.c (original)
+++ subversion/branches/in-repo-authz/subversion/svnlook/svnlook.c Wed Dec  5 18:27:47 2012
@@ -97,7 +97,8 @@ enum
     svnlook__xml_opt,
     svnlook__ignore_properties,
     svnlook__properties_only,
-    svnlook__diff_cmd
+    svnlook__diff_cmd,
+    svnlook__show_inherited_props
   };
 
 /*
@@ -150,6 +151,9 @@ static const apr_getopt_option_t options
   {"show-ids",          svnlook__show_ids, 0,
    N_("show node revision ids for each path")},
 
+  {"show-inherited-props", svnlook__show_inherited_props, 0,
+   N_("show path's inherited properties")},
+
   {"transaction",       't', 1,
    N_("specify transaction name ARG")},
 
@@ -265,7 +269,7 @@ static const svn_opt_subcommand_desc2_t 
       "       2. svnlook propget --revprop REPOS_PATH PROPNAME\n\n"
       "Print the raw value of a property on a path in the repository.\n"
       "With --revprop, print the raw value of a revision property.\n"),
-   {'r', 't', svnlook__revprop_opt} },
+   {'r', 't', 'v', svnlook__revprop_opt, svnlook__show_inherited_props} },
 
   {"proplist", subcommand_plist, {"plist", "pl"},
    N_("usage: 1. svnlook proplist REPOS_PATH PATH_IN_REPOS\n"
@@ -275,7 +279,8 @@ static const svn_opt_subcommand_desc2_t 
       "List the properties of a path in the repository, or\n"
       "with the --revprop option, revision properties.\n"
       "With -v, show the property values too.\n"),
-   {'r', 't', 'v', svnlook__revprop_opt, svnlook__xml_opt} },
+   {'r', 't', 'v', svnlook__revprop_opt, svnlook__xml_opt,
+    svnlook__show_inherited_props} },
 
   {"tree", subcommand_tree, {0},
    N_("usage: svnlook tree REPOS_PATH [PATH_IN_REPOS]\n\n"
@@ -323,6 +328,7 @@ struct svnlook_opt_state
   svn_boolean_t ignore_properties;  /* --ignore_properties */
   svn_boolean_t properties_only;    /* --properties-only */
   const char *diff_cmd;           /* --diff-cmd */
+  svn_boolean_t show_inherited_props; /*  --show-inherited-props */
 };
 
 
@@ -1628,13 +1634,23 @@ do_history(svnlook_ctxt_t *c,
 
 
 /* Print the value of property PROPNAME on PATH in the repository.
-   Error with SVN_ERR_FS_NOT_FOUND if PATH does not exist, or with
-   SVN_ERR_PROPERTY_NOT_FOUND if no such property on PATH.
+
+   If VERBOSE, print their values too.  If SHOW_INHERITED_PROPS, print
+   PATH's inherited props too.
+
+   Error with SVN_ERR_FS_NOT_FOUND if PATH does not exist. If
+   SHOW_INHERITED_PROPS is FALSE,then error with SVN_ERR_PROPERTY_NOT_FOUND
+   if there is no such property on PATH.  If SHOW_INHERITED_PROPS is TRUE,
+   then error with SVN_ERR_PROPERTY_NOT_FOUND only if there is no such
+   property on PATH nor inherited by path.
+
    If PATH is NULL, operate on a revision property. */
 static svn_error_t *
 do_pget(svnlook_ctxt_t *c,
         const char *propname,
         const char *path,
+        svn_boolean_t verbose,
+        svn_boolean_t show_inherited_props,
         apr_pool_t *pool)
 {
   svn_fs_root_t *root;
@@ -1642,17 +1658,30 @@ do_pget(svnlook_ctxt_t *c,
   svn_node_kind_t kind;
   svn_stream_t *stdout_stream;
   apr_size_t len;
+  apr_array_header_t *inherited_props = NULL;
 
   SVN_ERR(get_root(&root, c, pool));
   if (path != NULL)
     {
+      path = svn_fspath__canonicalize(path, pool);
       SVN_ERR(verify_path(&kind, root, path, pool));
       SVN_ERR(svn_fs_node_prop(&prop, root, path, propname, pool));
+
+      if (show_inherited_props)
+        {
+          SVN_ERR(svn_repos_fs_get_inherited_props(&inherited_props, root,
+                                                   path, propname, NULL,
+                                                   NULL, pool, pool));
+        }
+    }
+  else /* --revprop */
+    {
+      SVN_ERR(get_property(&prop, c, propname, pool));
     }
-  else
-    SVN_ERR(get_property(&prop, c, propname, pool));
 
-  if (prop == NULL)
+  /* Did we find nothing? */
+  if (prop == NULL
+      && (!show_inherited_props || inherited_props->nelts == 0))
     {
        const char *err_msg;
        if (path == NULL)
@@ -1665,61 +1694,162 @@ do_pget(svnlook_ctxt_t *c,
        else
          {
            if (SVN_IS_VALID_REVNUM(c->rev_id))
-             err_msg = apr_psprintf(pool,
-                                    _("Property '%s' not found on path '%s' "
-                                      "in revision %ld"),
-                                    propname, path, c->rev_id);
+             {
+               if (show_inherited_props)
+                 err_msg = apr_psprintf(pool,
+                                        _("Property '%s' not found on path '%s' "
+                                          "or inherited from a parent "
+                                          "in revision %ld"),
+                                        propname, path, c->rev_id);
+               else
+                 err_msg = apr_psprintf(pool,
+                                        _("Property '%s' not found on path '%s' "
+                                          "in revision %ld"),
+                                        propname, path, c->rev_id);
+             }
            else
-             err_msg = apr_psprintf(pool,
-                                    _("Property '%s' not found on path '%s' "
-                                      "in transaction %s"),
-                                    propname, path, c->txn_name);
+             {
+               if (show_inherited_props)
+                 err_msg = apr_psprintf(pool,
+                                        _("Property '%s' not found on path '%s' "
+                                          "or inherited from a parent "
+                                          "in transaction %s"),
+                                        propname, path, c->txn_name);
+               else
+                 err_msg = apr_psprintf(pool,
+                                        _("Property '%s' not found on path '%s' "
+                                          "in transaction %s"),
+                                        propname, path, c->txn_name);
+             }
          }
        return svn_error_create(SVN_ERR_PROPERTY_NOT_FOUND, NULL, err_msg);
     }
 
-  /* Else. */
-
   SVN_ERR(svn_stream_for_stdout(&stdout_stream, pool));
 
-  /* Unlike the command line client, we don't translate the property
-     value or print a trailing newline here.  We just output the raw
-     bytes of whatever's in the repository, as svnlook is more likely
-     to be used for automated inspections. */
-  len = prop->len;
-  SVN_ERR(svn_stream_write(stdout_stream, prop->data, &len));
+  if (verbose || show_inherited_props)
+    {
+      if (inherited_props)
+        {
+          int i;
+
+          for (i = 0; i < inherited_props->nelts; i++)
+            {
+              svn_prop_inherited_item_t *elt =
+                APR_ARRAY_IDX(inherited_props, i,
+                              svn_prop_inherited_item_t *);
+
+              if (verbose)
+                {
+                  SVN_ERR(svn_stream_printf(stdout_stream, pool,
+                          _("Inherited properties on '%s',\nfrom '%s':\n"),
+                          path, svn_fspath__canonicalize(elt->path_or_url,
+                                                         pool)));
+                  SVN_ERR(svn_cmdline__print_prop_hash(stdout_stream,
+                                                       elt->prop_hash,
+                                                       !verbose, pool));
+                }
+              else
+                {
+                  svn_string_t *propval =
+                    svn__apr_hash_index_val(apr_hash_first(pool,
+                                                           elt->prop_hash));
+
+                  SVN_ERR(svn_stream_printf(
+                    stdout_stream, pool, "%s - ",
+                    svn_fspath__canonicalize(elt->path_or_url, pool)));
+                  len = propval->len;
+                  SVN_ERR(svn_stream_write(stdout_stream, propval->data, &len));
+                  /* If we have more than one property to write, then add a newline*/
+                  if (inherited_props->nelts > 1 || prop)
+                    {
+                      len = strlen(APR_EOL_STR);
+                      SVN_ERR(svn_stream_write(stdout_stream, APR_EOL_STR, &len));
+                    }
+                }
+            }
+        }
+
+      if (prop)
+        {
+          if (verbose)
+            {
+              apr_hash_t *hash = apr_hash_make(pool);
+
+              apr_hash_set(hash, propname, APR_HASH_KEY_STRING, prop);
+              SVN_ERR(svn_stream_printf(stdout_stream, pool,
+                      _("Properties on '%s':\n"), path));
+              SVN_ERR(svn_cmdline__print_prop_hash(stdout_stream, hash,
+                                                   FALSE, pool));
+            }
+          else
+            {
+              SVN_ERR(svn_stream_printf(stdout_stream, pool, "%s - ", path));
+              len = prop->len;
+              SVN_ERR(svn_stream_write(stdout_stream, prop->data, &len));
+            }
+        }
+    }
+  else /* Raw single prop output, i.e. non-verbose output with no
+          inherited props. */
+    {
+      /* Unlike the command line client, we don't translate the property
+         value or print a trailing newline here.  We just output the raw
+         bytes of whatever's in the repository, as svnlook is more likely
+         to be used for automated inspections. */
+      len = prop->len;
+      SVN_ERR(svn_stream_write(stdout_stream, prop->data, &len));
+    }
 
   return SVN_NO_ERROR;
 }
 
 
 /* Print the property names of all properties on PATH in the repository.
-   If VERBOSE, print their values too.
-   If XML, print as XML rather than as plain text.
-   Error with SVN_ERR_FS_NOT_FOUND if PATH does not exist, or with
-   SVN_ERR_PROPERTY_NOT_FOUND if no such property on PATH.
+
+   If VERBOSE, print their values too.  If XML, print as XML rather than as
+   plain text.  If SHOW_INHERITED_PROPS, print PATH's inherited props too.
+
+   Error with SVN_ERR_FS_NOT_FOUND if PATH does not exist.
+
    If PATH is NULL, operate on a revision properties. */
 static svn_error_t *
 do_plist(svnlook_ctxt_t *c,
          const char *path,
          svn_boolean_t verbose,
          svn_boolean_t xml,
+         svn_boolean_t show_inherited_props,
          apr_pool_t *pool)
 {
-  svn_stream_t *stdout_stream;
   svn_fs_root_t *root;
   apr_hash_t *props;
   apr_hash_index_t *hi;
   svn_node_kind_t kind;
   svn_stringbuf_t *sb = NULL;
   svn_boolean_t revprop = FALSE;
+  apr_array_header_t *inherited_props = NULL;
 
-  SVN_ERR(svn_stream_for_stdout(&stdout_stream, pool));
   if (path != NULL)
     {
+      /* PATH might be the root of the repsository and we accept both
+         "" and "/".  But to avoid the somewhat cryptic output like this:
+
+           >svnlook pl repos-path ""
+           Properties on '':
+             svn:auto-props
+             svn:global-ignores
+
+         We canonicalize PATH so that is has a leading slash. */
+      path = svn_fspath__canonicalize(path, pool);
+
       SVN_ERR(get_root(&root, c, pool));
       SVN_ERR(verify_path(&kind, root, path, pool));
       SVN_ERR(svn_fs_node_proplist(&props, root, path, pool));
+
+      if (show_inherited_props)
+        SVN_ERR(svn_repos_fs_get_inherited_props(&inherited_props, root,
+                                                 path, NULL, NULL, NULL,
+                                                 pool, pool));
     }
   else if (c->is_revision)
     {
@@ -1734,18 +1864,55 @@ do_plist(svnlook_ctxt_t *c,
 
   if (xml)
     {
-      char *revstr = apr_psprintf(pool, "%ld", c->rev_id);
       /* <?xml version="1.0" encoding="UTF-8"?> */
       svn_xml_make_header2(&sb, "UTF-8", pool);
 
       /* "<properties>" */
       svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "properties", NULL);
+    }
 
+  if (inherited_props)
+    {
+      int i;
+
+      for (i = 0; i < inherited_props->nelts; i++)
+        {
+          svn_prop_inherited_item_t *elt =
+            APR_ARRAY_IDX(inherited_props, i, svn_prop_inherited_item_t *);
+
+          /* Canonicalize the inherited parent paths for consistency
+             with PATH. */
+          if (xml)
+            {
+              svn_xml_make_open_tag(
+                &sb, pool, svn_xml_normal, "target", "path",
+                svn_fspath__canonicalize(elt->path_or_url, pool),
+                NULL);
+              SVN_ERR(svn_cmdline__print_xml_prop_hash(&sb, elt->prop_hash,
+                                                       !verbose, TRUE,
+                                                       pool));
+              svn_xml_make_close_tag(&sb, pool, "target");
+            }
+          else
+            {
+              SVN_ERR(svn_cmdline_printf(
+                pool, _("Inherited properties on '%s',\nfrom '%s':\n"),
+                path, svn_fspath__canonicalize(elt->path_or_url, pool)));
+               SVN_ERR(svn_cmdline__print_prop_hash(NULL, elt->prop_hash,
+                                                    !verbose, pool));
+            }
+        }
+    }
+
+  if (xml)
+    {
       if (revprop)
         {
           /* "<revprops ...>" */
           if (c->is_revision)
             {
+              char *revstr = apr_psprintf(pool, "%ld", c->rev_id);
+
               svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "revprops",
                                     "rev", revstr, NULL);
             }
@@ -1763,6 +1930,9 @@ do_plist(svnlook_ctxt_t *c,
         }
     }
 
+  if (!xml && path /* Not a --revprop */)
+    SVN_ERR(svn_cmdline_printf(pool, _("Properties on '%s':\n"), path));
+
   for (hi = apr_hash_first(pool, props); hi; hi = apr_hash_next(hi))
     {
       const char *pname = svn__apr_hash_index_key(hi);
@@ -1786,10 +1956,19 @@ do_plist(svnlook_ctxt_t *c,
           else
             {
               const char *pname_stdout;
+              const char *indented_newval;
 
               SVN_ERR(svn_cmdline_cstring_from_utf8(&pname_stdout, pname,
                                                     pool));
-              printf("  %s : %s\n", pname_stdout, propval->data);
+              printf("  %s\n", pname_stdout);
+              /* Add an extra newline to the value before indenting, so that
+                 every line of output has the indentation whether the value
+                 already ended in a newline or not. */
+              indented_newval =
+                svn_cmdline__indent_string(apr_psprintf(pool, "%s\n",
+                                                        propval->data),
+                                           "    ", pool);
+              printf("%s", indented_newval);
             }
         }
       else if (xml)
@@ -2171,7 +2350,9 @@ subcommand_pget(apr_getopt_t *os, void *
 
   SVN_ERR(get_ctxt_baton(&c, opt_state, pool));
   SVN_ERR(do_pget(c, opt_state->arg1,
-                  opt_state->revprop ? NULL : opt_state->arg2, pool));
+                  opt_state->revprop ? NULL : opt_state->arg2,
+                  opt_state->verbose, opt_state->show_inherited_props,
+                  pool));
   return SVN_NO_ERROR;
 }
 
@@ -2186,7 +2367,8 @@ subcommand_plist(apr_getopt_t *os, void 
 
   SVN_ERR(get_ctxt_baton(&c, opt_state, pool));
   SVN_ERR(do_plist(c, opt_state->revprop ? NULL : opt_state->arg1,
-                   opt_state->verbose, opt_state->xml, pool));
+                   opt_state->verbose, opt_state->xml,
+                   opt_state->show_inherited_props, pool));
   return SVN_NO_ERROR;
 }
 
@@ -2419,6 +2601,10 @@ main(int argc, const char *argv[])
           opt_state.diff_cmd = opt_arg;
           break;
 
+        case svnlook__show_inherited_props:
+          opt_state.show_inherited_props = TRUE;
+          break;
+
         default:
           SVN_INT_ERR(subcommand_help(NULL, NULL, pool));
           svn_pool_destroy(pool);
@@ -2434,6 +2620,13 @@ main(int argc, const char *argv[])
                  _("The '--transaction' (-t) and '--revision' (-r) arguments "
                    "cannot co-exist")));
 
+  /* The --show-inherited-props and --revprop options may not co-exist. */
+  if (opt_state.show_inherited_props && opt_state.revprop)
+    SVN_INT_ERR(svn_error_create
+                (SVN_ERR_CL_MUTUALLY_EXCLUSIVE_ARGS, NULL,
+                 _("Cannot use the '--show-inherited-props' option with the "
+                   "'--revprop' option")));
+
   /* If the user asked for help, then the rest of the arguments are
      the names of subcommands to get help on (if any), or else they're
      just typos/mistakes.  Whatever the case, the subcommand to

Modified: subversion/branches/in-repo-authz/subversion/svnserve/serve.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/svnserve/serve.c?rev=1417569&r1=1417568&r2=1417569&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/svnserve/serve.c (original)
+++ subversion/branches/in-repo-authz/subversion/svnserve/serve.c Wed Dec  5 18:27:47 2012
@@ -1005,7 +1005,7 @@ get_props(apr_hash_t **props,
   /* Get any inherited properties the user is authorized to. */
   if (iprops)
     {
-      SVN_ERR(svn_repos_fs_get_inherited_props(iprops, root, path,
+      SVN_ERR(svn_repos_fs_get_inherited_props(iprops, root, path, NULL,
                                                authz_check_access_cb_func(b),
                                                b, pool, pool));
     }

Modified: subversion/branches/in-repo-authz/subversion/tests/cmdline/svnlook_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/tests/cmdline/svnlook_tests.py?rev=1417569&r1=1417568&r2=1417569&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/tests/cmdline/svnlook_tests.py (original)
+++ subversion/branches/in-repo-authz/subversion/tests/cmdline/svnlook_tests.py Wed Dec  5 18:27:47 2012
@@ -696,6 +696,7 @@ fp.close()"""
   # Now check the logfile
   expected_data = [ 'bogus_val\n',
                     'bogus_rev_val\n',
+                    "Properties on '/A':\n",
                     '  bogus_prop\n',
                     '  svn:log\n', '  svn:author\n',
                     '  svn:check-locks\n', # internal prop, not really expected

Modified: subversion/branches/in-repo-authz/subversion/tests/libsvn_repos/repos-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/tests/libsvn_repos/repos-test.c?rev=1417569&r1=1417568&r2=1417569&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/tests/libsvn_repos/repos-test.c (original)
+++ subversion/branches/in-repo-authz/subversion/tests/libsvn_repos/repos-test.c Wed Dec  5 18:27:47 2012
@@ -1720,15 +1720,17 @@ commit_continue_txn(const svn_test_opts_
 }
 
 
+
+/* A baton for check_location_segments(). */
 struct nls_receiver_baton
 {
   int count;
-  svn_location_segment_t *expected_segments;
+  const svn_location_segment_t *expected_segments;
 };
 
-
+/* Return a pretty-printed string representing SEGMENT. */
 static const char *
-format_segment(svn_location_segment_t *segment,
+format_segment(const svn_location_segment_t *segment,
                apr_pool_t *pool)
 {
   return apr_psprintf(pool, "[r%ld-r%ld: /%s]",
@@ -1737,14 +1739,15 @@ format_segment(svn_location_segment_t *s
                       segment->path ? segment->path : "(null)");
 }
 
-
+/* A location segment receiver for check_location_segments().
+ * Implements svn_location_segment_receiver_t. */
 static svn_error_t *
 nls_receiver(svn_location_segment_t *segment,
              void *baton,
              apr_pool_t *pool)
 {
   struct nls_receiver_baton *b = baton;
-  svn_location_segment_t *expected_segment = b->expected_segments + b->count;
+  const svn_location_segment_t *expected_segment = b->expected_segments + b->count;
 
   /* expected_segments->range_end can't be 0, so if we see that, it's
      our end-of-the-list sentry. */
@@ -1766,18 +1769,22 @@ nls_receiver(svn_location_segment_t *seg
   return SVN_NO_ERROR;
 }
 
-
+/* Run a svn_repos_node_location_segments() query with REPOS, PATH, PEG_REV,
+ * START_REV, END_REV.  Check that the result exactly matches the list of
+ * segments EXPECTED_SEGMENTS, which is terminated by an entry with
+ * 'range_end'==0.
+ */
 static svn_error_t *
 check_location_segments(svn_repos_t *repos,
                         const char *path,
                         svn_revnum_t peg_rev,
                         svn_revnum_t start_rev,
                         svn_revnum_t end_rev,
-                        svn_location_segment_t *expected_segments,
+                        const svn_location_segment_t *expected_segments,
                         apr_pool_t *pool)
 {
   struct nls_receiver_baton b;
-  svn_location_segment_t *segment;
+  const svn_location_segment_t *segment;
 
   /* Run svn_repos_node_location_segments() with a receiver that
      validates against EXPECTED_SEGMENTS.  */
@@ -1799,6 +1806,21 @@ check_location_segments(svn_repos_t *rep
   return SVN_NO_ERROR;
 }
 
+/* Inputs and expected outputs for svn_repos_node_location_segments() tests.
+ */
+typedef struct location_segment_test_t
+{
+  /* Path and peg revision to query */
+  const char *path;
+  svn_revnum_t peg;
+  /* Start (youngest) and end (oldest) revisions to query */
+  svn_revnum_t start;
+  svn_revnum_t end;
+
+  /* Expected segments */
+  svn_location_segment_t segments[10];
+
+} location_segment_test_t;
 
 static svn_error_t *
 node_location_segments(const svn_test_opts_t *opts,
@@ -1811,6 +1833,72 @@ node_location_segments(const svn_test_op
   svn_fs_root_t *txn_root, *root;
   svn_revnum_t youngest_rev = 0;
 
+  static const location_segment_test_t subtests[] =
+  {
+    { /* Check locations for /@HEAD. */
+      "", SVN_INVALID_REVNUM, SVN_INVALID_REVNUM, SVN_INVALID_REVNUM,
+      {
+        { 0, 7, "" },
+        { 0 }
+      }
+    },
+    { /* Check locations for A/D@HEAD. */
+      "A/D", SVN_INVALID_REVNUM, SVN_INVALID_REVNUM, SVN_INVALID_REVNUM,
+      {
+        { 7, 7, "A/D" },
+        { 3, 6, "A/D2" },
+        { 1, 2, "A/D" },
+        { 0 }
+      }
+    },
+    { /* Check a subset of the locations for A/D@HEAD. */
+      "A/D", SVN_INVALID_REVNUM, 5, 2,
+      {
+        { 3, 5, "A/D2" },
+        { 2, 2, "A/D" },
+        { 0 }
+      },
+    },
+    { /* Check a subset of locations for A/D2@5. */
+      "A/D2", 5, 3, 2,
+      {
+        { 3, 3, "A/D2" },
+        { 2, 2, "A/D" },
+        { 0 }
+      },
+    },
+    { /* Check locations for A/D@6. */
+      "A/D", 6, 6, SVN_INVALID_REVNUM,
+      {
+        { 1, 6, "A/D" },
+        { 0 }
+      },
+    },
+    { /* Check locations for A/D/G@HEAD. */
+      "A/D/G", SVN_INVALID_REVNUM, SVN_INVALID_REVNUM, SVN_INVALID_REVNUM,
+      {
+        { 7, 7, "A/D/G" },
+        { 6, 6, "A/D2/G" },
+        { 5, 5, NULL },
+        { 3, 4, "A/D2/G" },
+        { 1, 2, "A/D/G" },
+        { 0 }
+      },
+    },
+    { /* Check a subset of the locations for A/D/G@HEAD. */
+      "A/D/G", SVN_INVALID_REVNUM, 3, 2,
+      {
+        { 3, 3, "A/D2/G" },
+        { 2, 2, "A/D/G" },
+        { 0 }
+      },
+    },
+    {
+      NULL
+    },
+  };
+  const location_segment_test_t *subtest;
+
   /* Bail (with success) on known-untestable scenarios */
   if ((strcmp(opts->fs_type, "bdb") == 0)
       && (opts->server_minor_version == 4))
@@ -1884,117 +1972,19 @@ node_location_segments(const svn_test_op
   SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   svn_pool_clear(subpool);
 
-  /* Check locations for /@HEAD. */
-  {
-    svn_location_segment_t expected_segments[] =
-      {
-        { 0, 7, "" },
-        { 0 }
-      };
-    SVN_ERR(check_location_segments(repos, "",
-                                    SVN_INVALID_REVNUM,
-                                    SVN_INVALID_REVNUM,
-                                    SVN_INVALID_REVNUM,
-                                    expected_segments, pool));
-  }
-
-  /* Check locations for A/D@HEAD. */
-  {
-    svn_location_segment_t expected_segments[] =
-      {
-        { 7, 7, "A/D" },
-        { 3, 6, "A/D2" },
-        { 1, 2, "A/D" },
-        { 0 }
-      };
-    SVN_ERR(check_location_segments(repos, "A/D",
-                                    SVN_INVALID_REVNUM,
-                                    SVN_INVALID_REVNUM,
-                                    SVN_INVALID_REVNUM,
-                                    expected_segments, pool));
-  }
-
-  /* Check a subset of the locations for A/D@HEAD. */
-  {
-    svn_location_segment_t expected_segments[] =
-      {
-        { 3, 5, "A/D2" },
-        { 2, 2, "A/D" },
-        { 0 }
-      };
-    SVN_ERR(check_location_segments(repos, "A/D",
-                                    SVN_INVALID_REVNUM,
-                                    5,
-                                    2,
-                                    expected_segments, pool));
-  }
-
-  /* Check a subset of locations for A/D2@5. */
-  {
-    svn_location_segment_t expected_segments[] =
-      {
-        { 3, 3, "A/D2" },
-        { 2, 2, "A/D" },
-        { 0 }
-      };
-    SVN_ERR(check_location_segments(repos, "A/D2",
-                                    5,
-                                    3,
-                                    2,
-                                    expected_segments, pool));
-  }
-
-  /* Check locations for A/D@6. */
-  {
-    svn_location_segment_t expected_segments[] =
-      {
-        { 1, 6, "A/D" },
-        { 0 }
-      };
-    SVN_ERR(check_location_segments(repos, "A/D",
-                                    6,
-                                    6,
-                                    SVN_INVALID_REVNUM,
-                                    expected_segments, pool));
-  }
-
-  /* Check locations for A/D/G@HEAD. */
-  {
-    svn_location_segment_t expected_segments[] =
-      {
-        { 7, 7, "A/D/G" },
-        { 6, 6, "A/D2/G" },
-        { 5, 5, NULL },
-        { 3, 4, "A/D2/G" },
-        { 1, 2, "A/D/G" },
-        { 0 }
-      };
-    SVN_ERR(check_location_segments(repos, "A/D/G",
-                                    SVN_INVALID_REVNUM,
-                                    SVN_INVALID_REVNUM,
-                                    SVN_INVALID_REVNUM,
-                                    expected_segments, pool));
-  }
-
-  /* Check a subset of the locations for A/D/G@HEAD. */
-  {
-    svn_location_segment_t expected_segments[] =
-      {
-        { 3, 3, "A/D2/G" },
-        { 2, 2, "A/D/G" },
-        { 0 }
-      };
-    SVN_ERR(check_location_segments(repos, "A/D/G",
-                                    SVN_INVALID_REVNUM,
-                                    3,
-                                    2,
-                                    expected_segments, pool));
-  }
+  /*  */
+  for (subtest = subtests; subtest->path; subtest++)
+    {
+      SVN_ERR(check_location_segments(repos, subtest->path, subtest->peg,
+                                      subtest->start, subtest->end,
+                                      subtest->segments, pool));
+    }
 
   return SVN_NO_ERROR;
 }
 
 
+
 /* Test that the reporter doesn't send deltas under excluded paths. */
 static svn_error_t *
 reporter_depth_exclude(const svn_test_opts_t *opts,

Modified: subversion/branches/in-repo-authz/subversion/tests/libsvn_wc/db-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/tests/libsvn_wc/db-test.c?rev=1417569&r1=1417568&r2=1417569&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/tests/libsvn_wc/db-test.c (original)
+++ subversion/branches/in-repo-authz/subversion/tests/libsvn_wc/db-test.c Wed Dec  5 18:27:47 2012
@@ -420,6 +420,8 @@ test_getting_info(apr_pool_t *pool)
   SVN_TEST_ASSERT(checksum == NULL);
   SVN_TEST_ASSERT(target == NULL);
   SVN_TEST_ASSERT(lock == NULL);
+  SVN_TEST_ASSERT(had_props == FALSE);
+  /* SVN_TEST_ASSERT(update_root == ???); */
 
   /* Test: file-specific values. */
   SVN_ERR(svn_wc__db_base_get_info(
@@ -574,8 +576,6 @@ validate_node(svn_wc__db_t *db,
   SVN_TEST_ASSERT(kind == expected_kind);
   SVN_TEST_ASSERT(status == expected_status);
 
-  SVN_ERR(svn_wc__db_base_get_props(&props, db, path,
-                                    scratch_pool, scratch_pool));
   switch (status)
     {
     case svn_wc__db_status_server_excluded:
@@ -583,13 +583,18 @@ validate_node(svn_wc__db_t *db,
     case svn_wc__db_status_incomplete:
     case svn_wc__db_status_not_present:
       /* Our tests aren't setting properties on these node types, so
-         short-circuit examination of name/value pairs. */
+         short-circuit examination of name/value pairs, to avoid having
+         to handle the error from svn_wc__db_base_get_props(). */
       return SVN_NO_ERROR;
-
     default:
-      SVN_TEST_ASSERT(props != NULL);
+      break; /* Fall through */
     }
 
+  SVN_ERR(svn_wc__db_base_get_props(&props, db, path,
+                                    scratch_pool, scratch_pool));
+
+  SVN_TEST_ASSERT(props != NULL);
+
   value = apr_hash_get(props, "p1", APR_HASH_KEY_STRING);
   SVN_TEST_STRING_ASSERT(value->data, "v1");
 
@@ -803,10 +808,10 @@ test_working_info(apr_pool_t *pool)
   svn_revnum_t changed_rev;
   apr_time_t changed_date;
   const char *changed_author;
-  apr_time_t last_mod_time;
+  apr_time_t recorded_time;
   svn_depth_t depth;
   const svn_checksum_t *checksum;
-  svn_filesize_t translated_size;
+  svn_filesize_t recorded_size;
   const char *target;
   const char *changelist;
   const char *original_repos_relpath;
@@ -832,7 +837,7 @@ test_working_info(apr_pool_t *pool)
             &changed_rev, &changed_date, &changed_author,
             &depth, &checksum, &target, &original_repos_relpath,
             &original_root_url, &original_uuid, &original_revnum,
-            &lock, &translated_size, &last_mod_time, &changelist,
+            &lock, &recorded_size, &recorded_time, &changelist,
             &conflicted, &op_root, &had_props, &props_mod,
             &have_base, &have_more_work, &have_work,
             db, svn_dirent_join(local_abspath, "I", pool),
@@ -848,18 +853,22 @@ test_working_info(apr_pool_t *pool)
   SVN_TEST_STRING_ASSERT(changed_author, AUTHOR_2);
   SVN_TEST_ASSERT(depth == svn_depth_immediates);
   SVN_TEST_ASSERT(checksum == NULL);
-  SVN_TEST_ASSERT(translated_size == SVN_INVALID_FILESIZE);
+  SVN_TEST_ASSERT(recorded_size == SVN_INVALID_FILESIZE);
   SVN_TEST_ASSERT(target == NULL);
   SVN_TEST_STRING_ASSERT(changelist, "changelist");
   SVN_TEST_STRING_ASSERT(original_repos_relpath, "some/dir");
   SVN_TEST_STRING_ASSERT(original_root_url, ROOT_TWO);
   SVN_TEST_STRING_ASSERT(original_uuid, UUID_TWO);
   SVN_TEST_ASSERT(original_revnum == 2);
+  SVN_TEST_ASSERT(had_props == FALSE);
   SVN_TEST_ASSERT(props_mod == FALSE);
   SVN_TEST_ASSERT(have_base == TRUE);
+  /* SVN_TEST_ASSERT(have_more_work...); */
   SVN_TEST_ASSERT(have_work == TRUE);
   SVN_TEST_ASSERT(conflicted == FALSE);
   SVN_TEST_ASSERT(lock == NULL);
+  /* SVN_TEST_ASSERT(last_mod_time...); */
+  /* SVN_TEST_ASSERT(op_root...); */
 
 
   /* ### we need a hojillion more tests in here. I just want to get this

Modified: subversion/branches/in-repo-authz/subversion/tests/libsvn_wc/entries-compat.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/tests/libsvn_wc/entries-compat.c?rev=1417569&r1=1417568&r2=1417569&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/tests/libsvn_wc/entries-compat.c (original)
+++ subversion/branches/in-repo-authz/subversion/tests/libsvn_wc/entries-compat.c Wed Dec  5 18:27:47 2012
@@ -614,13 +614,13 @@ test_access_baton_like_locking(apr_pool_
                                repos_root_url, 0, svn_depth_infinity,
                                pool));
 
-    SVN_ERR(svn_wc__check_wc_root(&is_root, NULL, NULL, wc_ctx->db, subdir,
-                                  pool));
+    SVN_ERR(svn_wc__db_is_switched(&is_root, NULL, NULL, wc_ctx->db, subdir,
+                                   pool));
 
     SVN_TEST_ASSERT(is_root);
 
-    SVN_ERR(svn_wc__check_wc_root(&is_root, NULL, NULL, wc_ctx2->db, subdir,
-                                  pool));
+    SVN_ERR(svn_wc__db_is_switched(&is_root, NULL, NULL, wc_ctx2->db, subdir,
+                                   pool));
 
     /* This test was added to show a regression where the next check failed,
        but the check above this succeeded */

Modified: subversion/branches/in-repo-authz/subversion/tests/libsvn_wc/op-depth-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/tests/libsvn_wc/op-depth-test.c?rev=1417569&r1=1417568&r2=1417569&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/tests/libsvn_wc/op-depth-test.c (original)
+++ subversion/branches/in-repo-authz/subversion/tests/libsvn_wc/op-depth-test.c Wed Dec  5 18:27:47 2012
@@ -4294,12 +4294,15 @@ move_update(const svn_test_opts_t *opts,
   SVN_ERR(sbox_wc_mkdir(&b, "A"));
   SVN_ERR(sbox_wc_mkdir(&b, "A/B"));
   sbox_file_write(&b, "A/B/f", "r1 content\n");
+  sbox_file_write(&b, "A/B/h", "r1 content\n");
   SVN_ERR(sbox_wc_add(&b, "A/B/f"));
+  SVN_ERR(sbox_wc_add(&b, "A/B/h"));
   SVN_ERR(sbox_wc_commit(&b, ""));
   sbox_file_write(&b, "A/B/f", "r1 content\nr2 content\n");
   SVN_ERR(sbox_wc_commit(&b, ""));
   sbox_file_write(&b, "A/B/g", "r3 content\n");
   SVN_ERR(sbox_wc_add(&b, "A/B/g"));
+  SVN_ERR(sbox_wc_delete(&b, "A/B/h"));
   SVN_ERR(sbox_wc_commit(&b, ""));
   SVN_ERR(sbox_wc_update(&b, "", 1));
 
@@ -4311,12 +4314,15 @@ move_update(const svn_test_opts_t *opts,
       {0, "A",        "normal",       1, "A"},
       {0, "A/B",      "normal",       1, "A/B"},
       {0, "A/B/f",    "normal",       1, "A/B/f"},
+      {0, "A/B/h",    "normal",       1, "A/B/h"},
       {1, "A",        "base-deleted", NO_COPY_FROM, "A2"},
       {1, "A/B",      "base-deleted", NO_COPY_FROM},
       {1, "A/B/f",    "base-deleted", NO_COPY_FROM},
+      {1, "A/B/h",    "base-deleted", NO_COPY_FROM},
       {1, "A2",       "normal",       1, "A", MOVED_HERE},
       {1, "A2/B",     "normal",       1, "A/B", MOVED_HERE},
       {1, "A2/B/f",   "normal",       1, "A/B/f", MOVED_HERE},
+      {1, "A2/B/h",   "normal",       1, "A/B/h", MOVED_HERE},
       {0}
     };
     SVN_ERR(check_db_rows(&b, "", nodes));
@@ -4330,12 +4336,15 @@ move_update(const svn_test_opts_t *opts,
       {0, "A",        "normal",       2, "A"},
       {0, "A/B",      "normal",       2, "A/B"},
       {0, "A/B/f",    "normal",       2, "A/B/f"},
+      {0, "A/B/h",    "normal",       2, "A/B/h"},
       {1, "A",        "base-deleted", NO_COPY_FROM, "A2"},
       {1, "A/B",      "base-deleted", NO_COPY_FROM},
       {1, "A/B/f",    "base-deleted", NO_COPY_FROM},
+      {1, "A/B/h",    "base-deleted", NO_COPY_FROM},
       {1, "A2",       "normal",       1, "A", MOVED_HERE},
       {1, "A2/B",     "normal",       1, "A/B", MOVED_HERE},
       {1, "A2/B/f",   "normal",       1, "A/B/f", MOVED_HERE},
+      {1, "A2/B/h",   "normal",       1, "A/B/h", MOVED_HERE},
       {0}
     };
     SVN_ERR(check_db_rows(&b, "", nodes));
@@ -4349,12 +4358,15 @@ move_update(const svn_test_opts_t *opts,
       {0, "A",        "normal",       2, "A"},
       {0, "A/B",      "normal",       2, "A/B"},
       {0, "A/B/f",    "normal",       2, "A/B/f"},
+      {0, "A/B/h",    "normal",       2, "A/B/h"},
       {1, "A",        "base-deleted", NO_COPY_FROM, "A2"},
       {1, "A/B",      "base-deleted", NO_COPY_FROM},
       {1, "A/B/f",    "base-deleted", NO_COPY_FROM},
+      {1, "A/B/h",    "base-deleted", NO_COPY_FROM},
       {1, "A2",       "normal",       2, "A", MOVED_HERE},
       {1, "A2/B",     "normal",       2, "A/B", MOVED_HERE},
       {1, "A2/B/f",   "normal",       2, "A/B/f", MOVED_HERE},
+      {1, "A2/B/h",   "normal",       2, "A/B/h", MOVED_HERE},
       {0}
     };
     SVN_ERR(check_db_rows(&b, "", nodes));
@@ -4376,12 +4388,12 @@ move_update(const svn_test_opts_t *opts,
       {1, "A2",       "normal",       2, "A", MOVED_HERE},
       {1, "A2/B",     "normal",       2, "A/B", MOVED_HERE},
       {1, "A2/B/f",   "normal",       2, "A/B/f", MOVED_HERE},
+      {1, "A2/B/h",   "normal",       2, "A/B/h", MOVED_HERE},
       {0}
     };
     SVN_ERR(check_db_rows(&b, "", nodes));
   }
 
-  /* Are we going to handle this case? */
   SVN_ERR(sbox_wc_resolve(&b, "A"));
   {
     nodes_row_t nodes[] = {
@@ -4403,6 +4415,55 @@ move_update(const svn_test_opts_t *opts,
     SVN_ERR(check_db_rows(&b, "", nodes));
   }
 
+  SVN_ERR(sbox_wc_delete(&b, "A2/B"));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",         "normal",       3, ""},
+      {0, "A",        "normal",       3, "A"},
+      {0, "A/B",      "normal",       3, "A/B"},
+      {0, "A/B/f",    "normal",       3, "A/B/f"},
+      {0, "A/B/g",    "normal",       3, "A/B/g"},
+      {1, "A",        "base-deleted", NO_COPY_FROM, "A2"},
+      {1, "A/B",      "base-deleted", NO_COPY_FROM},
+      {1, "A/B/f",    "base-deleted", NO_COPY_FROM},
+      {1, "A/B/g",    "base-deleted", NO_COPY_FROM},
+      {1, "A2",       "normal",       3, "A", MOVED_HERE},
+      {1, "A2/B",     "normal",       3, "A/B", MOVED_HERE},
+      {1, "A2/B/f",   "normal",       3, "A/B/f", MOVED_HERE},
+      {1, "A2/B/g",   "normal",       3, "A/B/g", MOVED_HERE},
+      {2, "A2/B",     "base-deleted", NO_COPY_FROM},
+      {2, "A2/B/f",   "base-deleted", NO_COPY_FROM},
+      {2, "A2/B/g",   "base-deleted", NO_COPY_FROM},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  SVN_ERR(sbox_wc_update(&b, "", 2));
+  SVN_ERR(sbox_wc_resolve(&b, "A"));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",         "normal",       2, ""},
+      {0, "A",        "normal",       2, "A"},
+      {0, "A/B",      "normal",       2, "A/B"},
+      {0, "A/B/f",    "normal",       2, "A/B/f"},
+      {0, "A/B/h",    "normal",       2, "A/B/h"},
+      {1, "A",        "base-deleted", NO_COPY_FROM, "A2"},
+      {1, "A/B",      "base-deleted", NO_COPY_FROM},
+      {1, "A/B/f",    "base-deleted", NO_COPY_FROM},
+      {1, "A/B/h",    "base-deleted", NO_COPY_FROM},
+      {1, "A2",       "normal",       2, "A", MOVED_HERE},
+      {1, "A2/B",     "normal",       2, "A/B", MOVED_HERE},
+      {1, "A2/B/f",   "normal",       2, "A/B/f", MOVED_HERE},
+      {1, "A2/B/h",   "normal",       2, "A/B/h", MOVED_HERE},
+      {2, "A2/B",     "base-deleted", NO_COPY_FROM},
+      {2, "A2/B/f",   "base-deleted", NO_COPY_FROM},
+      {2, "A2/B/h",   "base-deleted", NO_COPY_FROM},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
   return SVN_NO_ERROR;
 }
 
@@ -4894,7 +4955,7 @@ struct svn_test_descriptor_t test_funcs[
                        "move_on_move2"),
     SVN_TEST_OPTS_PASS(move_added,
                        "move_added"),
-    SVN_TEST_OPTS_XFAIL(move_update,
+    SVN_TEST_OPTS_PASS(move_update,
                        "move_update"),
     SVN_TEST_OPTS_PASS(test_scan_delete,
                        "scan_delete"),

Modified: subversion/branches/in-repo-authz/tools/client-side/svn-bench/cl.h
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/tools/client-side/svn-bench/cl.h?rev=1417569&r1=1417568&r2=1417569&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/tools/client-side/svn-bench/cl.h (original)
+++ subversion/branches/in-repo-authz/tools/client-side/svn-bench/cl.h Wed Dec  5 18:27:47 2012
@@ -149,21 +149,6 @@ svn_error_t *
 svn_cl__check_cancel(void *baton);
 
 
-/* Print to stdout a hash that maps property names (char *) to property
-   values (svn_string_t *).  The names are assumed to be in UTF-8 format;
-   the values are either in UTF-8 (the special Subversion props) or
-   plain binary values.
-
-   If OUT is not NULL, then write to it rather than stdout.
-
-   If NAMES_ONLY is true, print just names, else print names and
-   values. */
-svn_error_t *
-svn_cl__print_prop_hash(svn_stream_t *out,
-                        apr_hash_t *prop_hash,
-                        svn_boolean_t names_only,
-                        apr_pool_t *pool);
-
 
 /*** Notification functions to display results on the terminal. */
 



Mime
View raw message