subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1202950 [2/2] - in /subversion/branches/moves-scan-log: ./ notes/ subversion/include/ subversion/include/private/ subversion/libsvn_client/ subversion/libsvn_diff/ subversion/libsvn_fs_fs/ subversion/libsvn_ra/ subversion/libsvn_ra_neon/ s...
Date Thu, 17 Nov 2011 00:29:17 GMT
Modified: subversion/branches/moves-scan-log/subversion/libsvn_client/ra.c
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/libsvn_client/ra.c?rev=1202950&r1=1202949&r2=1202950&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/libsvn_client/ra.c (original)
+++ subversion/branches/moves-scan-log/subversion/libsvn_client/ra.c Thu Nov 17 00:29:16 2011
@@ -387,17 +387,6 @@ svn_client_open_ra_session(svn_ra_sessio
 
 
 
-/* Convert a path or URL for display: if it is a local path, convert it to
- * the local path style; if it is a URL, return it unchanged. */
-static const char *
-path_or_url_local_style(const char *path_or_url,
-                        apr_pool_t *pool)
-{
-  if (svn_path_is_url(path_or_url))
-    return path_or_url;
-  return svn_dirent_local_style(path_or_url, pool);
-}
-
 /* Given PATH_OR_URL, which contains either a working copy path or an
    absolute URL, a peg revision PEG_REVISION, and a desired revision
    REVISION, find the path at which that object exists in REVISION,

Modified: subversion/branches/moves-scan-log/subversion/libsvn_diff/diff_file.c
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/libsvn_diff/diff_file.c?rev=1202950&r1=1202949&r2=1202950&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/libsvn_diff/diff_file.c (original)
+++ subversion/branches/moves-scan-log/subversion/libsvn_diff/diff_file.c Thu Nov 17 00:29:16 2011
@@ -470,8 +470,9 @@ find_identical_prefix(svn_boolean_t *rea
          too many for the \r. */
       svn_boolean_t ended_at_nonmatching_newline = FALSE;
       for (i = 0; i < file_len; i++)
-        ended_at_nonmatching_newline = ended_at_nonmatching_newline
-                                       || *file[i].curp == '\n';
+        if (file[i].curp < file[i].endp)
+          ended_at_nonmatching_newline = ended_at_nonmatching_newline
+                                         || *file[i].curp == '\n';
       if (ended_at_nonmatching_newline)
         {
           lines--;

Modified: subversion/branches/moves-scan-log/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/libsvn_fs_fs/fs_fs.c?rev=1202950&r1=1202949&r2=1202950&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/branches/moves-scan-log/subversion/libsvn_fs_fs/fs_fs.c Thu Nov 17 00:29:16 2011
@@ -5600,7 +5600,7 @@ rep_write_contents_close(void *baton)
           /* Something's wrong with the rep-sharing index.  We can continue
              without rep-sharing, but warn.
            */
-          (b->fs->warning)(b->fs->warning_baton, err);
+          (b->fs->warning)(b->fs->warning_baton, svn_error_root_cause(err));
           svn_error_clear(err);
           old_rep = NULL;
         }

Modified: subversion/branches/moves-scan-log/subversion/libsvn_ra/ra_loader.c
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/libsvn_ra/ra_loader.c?rev=1202950&r1=1202949&r2=1202950&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/libsvn_ra/ra_loader.c (original)
+++ subversion/branches/moves-scan-log/subversion/libsvn_ra/ra_loader.c Thu Nov 17 00:29:16 2011
@@ -876,8 +876,6 @@ svn_error_t *svn_ra_do_diff3(svn_ra_sess
                              void *diff_baton,
                              apr_pool_t *pool)
 {
-  SVN_ERR_ASSERT(svn_path_is_empty(diff_target)
-                 || svn_path_is_single_path_component(diff_target));
   return session->vtable->do_diff(session,
                                   reporter, report_baton,
                                   revision, diff_target,

Modified: subversion/branches/moves-scan-log/subversion/libsvn_ra_neon/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/libsvn_ra_neon/commit.c?rev=1202950&r1=1202949&r2=1202950&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/libsvn_ra_neon/commit.c (original)
+++ subversion/branches/moves-scan-log/subversion/libsvn_ra_neon/commit.c Thu Nov 17 00:29:16 2011
@@ -87,7 +87,7 @@ typedef struct commit_ctx_t
   apr_hash_t *revprop_table;
 
   /* A hash mapping svn_string_t * paths (those which are valid as
-     target in the MERGE response) to svn_node_kind_t kinds. */
+     target in the MERGE response) to (void*)svn_recurse_kind. */
   apr_hash_t *valid_targets;
 
   /* The (potential) author of this commit. */

Modified: subversion/branches/moves-scan-log/subversion/libsvn_repos/authz.c
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/libsvn_repos/authz.c?rev=1202950&r1=1202949&r2=1202950&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/libsvn_repos/authz.c (original)
+++ subversion/branches/moves-scan-log/subversion/libsvn_repos/authz.c Thu Nov 17 00:29:16 2011
@@ -785,6 +785,9 @@ svn_repos_authz_check_access(svn_authz_t
 {
   const char *current_path;
 
+  if (!repos_name)
+    repos_name = "";
+
   /* If PATH is NULL, check if the user has *any* access. */
   if (!path)
     {

Modified: subversion/branches/moves-scan-log/subversion/libsvn_subr/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/libsvn_subr/mergeinfo.c?rev=1202950&r1=1202949&r2=1202950&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/libsvn_subr/mergeinfo.c (original)
+++ subversion/branches/moves-scan-log/subversion/libsvn_subr/mergeinfo.c Thu Nov 17 00:29:16 2011
@@ -2558,25 +2558,6 @@ svn_mergeinfo__is_noninheritable(svn_mer
   return FALSE;
 }
 
-svn_error_t *
-svn_mergeinfo__string_has_noninheritable(svn_boolean_t *is_noninheritable,
-                                         const char *mergeinfo_str,
-                                         apr_pool_t *scratch_pool)
-{
-  *is_noninheritable = FALSE;
-
-  if (mergeinfo_str)
-    {
-      svn_mergeinfo_t mergeinfo;
-
-      SVN_ERR(svn_mergeinfo_parse(&mergeinfo, mergeinfo_str, scratch_pool));
-      *is_noninheritable = svn_mergeinfo__is_noninheritable(mergeinfo,
-                                                            scratch_pool);
-    }
-
-  return SVN_NO_ERROR;
-}
-
 apr_array_header_t *
 svn_rangelist__initialize(svn_revnum_t start,
                           svn_revnum_t end,

Modified: subversion/branches/moves-scan-log/subversion/libsvn_subr/sqlite.c
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/libsvn_subr/sqlite.c?rev=1202950&r1=1202949&r2=1202950&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/libsvn_subr/sqlite.c (original)
+++ subversion/branches/moves-scan-log/subversion/libsvn_subr/sqlite.c Thu Nov 17 00:29:16 2011
@@ -606,12 +606,12 @@ static volatile svn_atomic_t sqlite_init
 static svn_error_t *
 init_sqlite(void *baton, apr_pool_t *pool)
 {
-  if (sqlite3_libversion_number() < SQLITE_VERSION_NUMBER)
+  if (sqlite3_libversion_number() < SVN_SQLITE_MIN_VERSION_NUMBER)
     {
       return svn_error_createf(
                     SVN_ERR_SQLITE_ERROR, NULL,
                     _("SQLite compiled for %s, but running with %s"),
-                    SQLITE_VERSION, sqlite3_libversion());
+                    SVN_SQLITE_MIN_VERSION, sqlite3_libversion());
     }
 
 #if APR_HAS_THREADS

Modified: subversion/branches/moves-scan-log/subversion/libsvn_wc/entries.c
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/libsvn_wc/entries.c?rev=1202950&r1=1202949&r2=1202950&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/libsvn_wc/entries.c (original)
+++ subversion/branches/moves-scan-log/subversion/libsvn_wc/entries.c Thu Nov 17 00:29:16 2011
@@ -1476,8 +1476,20 @@ insert_node(svn_sqlite__db_t *sdb,
                                   svn_node_kind_to_word(node->kind)));
 
   if (node->kind == svn_node_file)
-    SVN_ERR(svn_sqlite__bind_checksum(stmt, 14, node->checksum,
-                                      scratch_pool));
+    {
+      if (!node->checksum
+          && node->op_depth == 0
+          && node->presence != svn_wc__db_status_not_present
+          && node->presence != svn_wc__db_status_excluded
+          && node->presence != svn_wc__db_status_server_excluded)
+        return svn_error_createf(SVN_ERR_WC_CORRUPT, NULL,
+                                 _("The file '%s' has no checksum"),
+                                 svn_dirent_local_style(node->local_relpath,
+                                                        scratch_pool));
+
+      SVN_ERR(svn_sqlite__bind_checksum(stmt, 14, node->checksum,
+                                        scratch_pool));
+    }
 
   if (node->properties) /* ### Never set, props done later */
     SVN_ERR(svn_sqlite__bind_properties(stmt, 15, node->properties,

Modified: subversion/branches/moves-scan-log/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/libsvn_wc/wc_db.c?rev=1202950&r1=1202949&r2=1202950&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/branches/moves-scan-log/subversion/libsvn_wc/wc_db.c Thu Nov 17 00:29:16 2011
@@ -842,6 +842,15 @@ insert_base_node(void *baton,
                             moved_to_relpath /* 21 */));
   if (pibb->kind == svn_kind_file)
     {
+      if (!pibb->checksum
+          && pibb->status != svn_wc__db_status_not_present
+          && pibb->status != svn_wc__db_status_excluded
+          && pibb->status != svn_wc__db_status_server_excluded)
+        return svn_error_createf(SVN_ERR_WC_CORRUPT, svn_sqlite__reset(stmt),
+                                 _("The file '%s' has no checksum."),
+                                 path_for_error_message(wcroot, local_relpath,
+                                                        scratch_pool));
+
       SVN_ERR(svn_sqlite__bind_checksum(stmt, 14, pibb->checksum,
                                         scratch_pool));
 

Modified: subversion/branches/moves-scan-log/subversion/svn/cl.h
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/svn/cl.h?rev=1202950&r1=1202949&r2=1202950&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/svn/cl.h (original)
+++ subversion/branches/moves-scan-log/subversion/svn/cl.h Thu Nov 17 00:29:16 2011
@@ -382,6 +382,9 @@ svn_cl__time_cstring_to_human_cstring(co
 /* Print STATUS for PATH to stdout for human consumption.  Prints in
    abbreviated format by default, or DETAILED format if flag is set.
 
+   When SUPPRESS_EXTERNALS_PLACEHOLDERS is set, avoid printing
+   externals placeholder lines ("X lines").
+
    When DETAILED is set, use SHOW_LAST_COMMITTED to toggle display of
    the last-committed-revision and last-committed-author.
 
@@ -393,10 +396,16 @@ svn_cl__time_cstring_to_human_cstring(co
 
    Increment *TEXT_CONFLICTS, *PROP_CONFLICTS, or *TREE_CONFLICTS if
    a conflict was encountered.
-   */
+
+   Use CWD_ABSPATH -- the absolute path of the current working
+   directory -- to shorten PATH into something relative to that
+   directory as necessary.
+*/
 svn_error_t *
-svn_cl__print_status(const char *path,
+svn_cl__print_status(const char *cwd_abspath,
+                     const char *path,
                      const svn_client_status_t *status,
+                     svn_boolean_t suppress_externals_placeholders,
                      svn_boolean_t detailed,
                      svn_boolean_t show_last_committed,
                      svn_boolean_t skip_unrecognized,
@@ -409,9 +418,15 @@ svn_cl__print_status(const char *path,
 
 
 /* Print STATUS for PATH in XML to stdout.  Use POOL for temporary
-   allocations. */
+   allocations.
+
+   Use CWD_ABSPATH -- the absolute path of the current working
+   directory -- to shorten PATH into something relative to that
+   directory as necessary.
+ */
 svn_error_t *
-svn_cl__print_status_xml(const char *path,
+svn_cl__print_status_xml(const char *cwd_abspath,
+                         const char *path,
                          const svn_client_status_t *status,
                          svn_client_ctx_t *ctx,
                          apr_pool_t *pool);
@@ -553,14 +568,10 @@ svn_cl__merge_file_externally(const char
 
 /* Set *NOTIFY_FUNC_P and *NOTIFY_BATON_P to a notifier/baton for all
  * operations, allocated in POOL.
- *
- * If don't want a summary line at the end of notifications, set
- * SUPPRESS_FINAL_LINE.
  */
 svn_error_t *
 svn_cl__get_notifier(svn_wc_notify_func2_t *notify_func_p,
                      void **notify_baton_p,
-                     svn_boolean_t suppress_final_line,
                      apr_pool_t *pool);
 
 /* Make the notifier for use with BATON print the appropriate summary

Modified: subversion/branches/moves-scan-log/subversion/svn/log-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/svn/log-cmd.c?rev=1202950&r1=1202949&r2=1202950&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/svn/log-cmd.c (original)
+++ subversion/branches/moves-scan-log/subversion/svn/log-cmd.c Thu Nov 17 00:29:16 2011
@@ -281,7 +281,6 @@ log_entry_receiver(void *baton,
       apr_array_header_t *diff_options;
       svn_opt_revision_t start_revision;
       svn_opt_revision_t end_revision;
-      svn_error_t *err;
 
       SVN_ERR(svn_stream_for_stdout(&outstream, pool));
       SVN_ERR(svn_stream_for_stderr(&errstream, pool));
@@ -299,82 +298,23 @@ log_entry_receiver(void *baton,
       end_revision.value.number = log_entry->revision;
 
       SVN_ERR(svn_cmdline_printf(pool, _("\n")));
-      err = svn_client_diff6(diff_options,
-                             lb->target_url,
-                             &start_revision,
-                             lb->target_url,
-                             &end_revision,
-                             NULL,
-                             lb->depth,
-                             FALSE, /* ignore ancestry */
-                             TRUE, /* no diff deleted */
-                             FALSE, /* show copies as adds */
-                             FALSE, /* ignore content type */
-                             FALSE, /* use git diff format */
-                             svn_cmdline_output_encoding(pool),
-                             outstream,
-                             errstream,
-                             NULL,
-                             lb->ctx, pool);
-      if (err)
-        {
-          /* We get a "path not found" error in case the revision created
-           * lb->target_url. Try to show a diff from the parent instead. */
-          if (err->apr_err == SVN_ERR_FS_NOT_FOUND)
-            {
-              const char *parent;
-              apr_pool_t *iterpool;
-
-              svn_error_clear(err);
-
-              parent = svn_uri_dirname(lb->target_url, pool);
-              iterpool = svn_pool_create(pool);
-              while (strcmp(parent, lb->target_url) != 0)
-                {
-                  svn_pool_clear(iterpool);
-                  err = svn_client_diff6(diff_options,
-                                         parent,
-                                         &start_revision,
-                                         parent,
-                                         &end_revision,
-                                         NULL,
-                                         lb->depth,
-                                         FALSE, /* ignore ancestry */
-                                         TRUE, /* no diff deleted */
-                                         FALSE, /* show copies as adds */
-                                         FALSE, /* ignore content type */
-                                         FALSE, /* use git diff format */
-                                         svn_cmdline_output_encoding(iterpool),
-                                         outstream,
-                                         errstream,
-                                         NULL,
-                                         lb->ctx, iterpool);
-                  if (err == SVN_NO_ERROR)
-                    break;
-                  else
-                    {
-                      if (err->apr_err == SVN_ERR_FS_NOT_FOUND)
-                        {
-                          svn_error_clear(err);
-                          parent = svn_uri_dirname(parent, pool);
-                          continue;
-                        }
-                      if (err->apr_err == SVN_ERR_RA_ILLEGAL_URL ||
-                          err->apr_err == SVN_ERR_AUTHZ_UNREADABLE ||
-                          err->apr_err == SVN_ERR_RA_LOCAL_REPOS_OPEN_FAILED)
-                        {
-                          svn_error_clear(err);
-                          break;
-                        }
-                      return svn_error_trace(err);
-                    }
-                }
-              svn_pool_destroy(iterpool);
-            }
-          else
-            return svn_error_trace(err);
-        }
-
+      SVN_ERR(svn_client_diff6(diff_options,
+                               lb->target_url,
+                               &start_revision,
+                               lb->target_url,
+                               &end_revision,
+                               NULL,
+                               lb->depth,
+                               FALSE, /* ignore ancestry */
+                               TRUE, /* no diff deleted */
+                               FALSE, /* show copies as adds */
+                               FALSE, /* ignore content type */
+                               FALSE, /* use git diff format */
+                               svn_cmdline_output_encoding(pool),
+                               outstream,
+                               errstream,
+                               NULL,
+                               lb->ctx, pool));
       SVN_ERR(svn_cmdline_printf(pool, _("\n")));
     }
 

Modified: subversion/branches/moves-scan-log/subversion/svn/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/svn/main.c?rev=1202950&r1=1202949&r2=1202950&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/svn/main.c (original)
+++ subversion/branches/moves-scan-log/subversion/svn/main.c Thu Nov 17 00:29:16 2011
@@ -1501,6 +1501,7 @@ main(int argc, const char *argv[])
   svn_config_t *cfg_config;
   svn_boolean_t descend = TRUE;
   svn_boolean_t interactive_conflicts = FALSE;
+  svn_boolean_t use_notifier = TRUE;
   apr_hash_t *changelists;
 
   /* Initialize the app. */
@@ -2518,12 +2519,21 @@ main(int argc, const char *argv[])
      subcommands will populate the ctx->log_msg_baton3. */
   ctx->log_msg_func3 = svn_cl__get_log_message;
 
-  /* Set up the notifier. */
-  if (((subcommand->cmd_func != svn_cl__status) && !opt_state.quiet)
-        || ((subcommand->cmd_func == svn_cl__status) && !opt_state.xml))
+  /* Set up the notifier.
+
+     In general, we use it any time we aren't in --quiet mode.  'svn
+     status' is unique, though, in that we don't want it in --quiet mode
+     unless we're also in --verbose mode.  When in --xml mode,
+     though, we never want it.  */
+  if (opt_state.quiet)
+    use_notifier = FALSE;
+  if ((subcommand->cmd_func == svn_cl__status) && opt_state.verbose)
+    use_notifier = TRUE;
+  if (opt_state.xml)
+    use_notifier = FALSE;
+  if (use_notifier)
     {
-      err = svn_cl__get_notifier(&ctx->notify_func2, &ctx->notify_baton2,
-                                 FALSE, pool);
+      err = svn_cl__get_notifier(&ctx->notify_func2, &ctx->notify_baton2, pool);
       if (err)
         return svn_cmdline_handle_exit_error(err, pool, "svn: ");
     }

Modified: subversion/branches/moves-scan-log/subversion/svn/notify.c
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/svn/notify.c?rev=1202950&r1=1202949&r2=1202950&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/svn/notify.c (original)
+++ subversion/branches/moves-scan-log/subversion/svn/notify.c Thu Nov 17 00:29:16 2011
@@ -47,7 +47,6 @@ struct notify_baton
   svn_boolean_t is_checkout;
   svn_boolean_t is_export;
   svn_boolean_t is_wc_to_repos_copy;
-  svn_boolean_t suppress_summary_lines;
   svn_boolean_t sent_first_txdelta;
   svn_boolean_t in_external;
   svn_boolean_t had_print_error; /* Used to not keep printing error messages
@@ -583,8 +582,7 @@ notify(void *baton, const svn_wc_notify_
       break;
 
     case svn_wc_notify_update_started:
-      if (! (nb->suppress_summary_lines ||
-             nb->in_external ||
+      if (! (nb->in_external ||
              nb->is_checkout ||
              nb->is_export))
         {
@@ -596,77 +594,74 @@ notify(void *baton, const svn_wc_notify_
 
     case svn_wc_notify_update_completed:
       {
-        if (! nb->suppress_summary_lines)
+        if (SVN_IS_VALID_REVNUM(n->revision))
           {
-            if (SVN_IS_VALID_REVNUM(n->revision))
+            if (nb->is_export)
               {
-                if (nb->is_export)
+                if ((err = svn_cmdline_printf
+                     (pool, nb->in_external
+                      ? _("Exported external at revision %ld.\n")
+                      : _("Exported revision %ld.\n"),
+                      n->revision)))
+                  goto print_error;
+              }
+            else if (nb->is_checkout)
+              {
+                if ((err = svn_cmdline_printf
+                     (pool, nb->in_external
+                      ? _("Checked out external at revision %ld.\n")
+                      : _("Checked out revision %ld.\n"),
+                      n->revision)))
+                  goto print_error;
+              }
+            else
+              {
+                if (nb->received_some_change)
                   {
+                    nb->received_some_change = FALSE;
                     if ((err = svn_cmdline_printf
                          (pool, nb->in_external
-                          ? _("Exported external at revision %ld.\n")
-                          : _("Exported revision %ld.\n"),
+                          ? _("Updated external to revision %ld.\n")
+                          : _("Updated to revision %ld.\n"),
                           n->revision)))
                       goto print_error;
                   }
-                else if (nb->is_checkout)
+                else
                   {
                     if ((err = svn_cmdline_printf
                          (pool, nb->in_external
-                          ? _("Checked out external at revision %ld.\n")
-                          : _("Checked out revision %ld.\n"),
+                          ? _("External at revision %ld.\n")
+                          : _("At revision %ld.\n"),
                           n->revision)))
                       goto print_error;
                   }
-                else
-                  {
-                    if (nb->received_some_change)
-                      {
-                        nb->received_some_change = FALSE;
-                        if ((err = svn_cmdline_printf
-                             (pool, nb->in_external
-                              ? _("Updated external to revision %ld.\n")
-                              : _("Updated to revision %ld.\n"),
-                              n->revision)))
-                          goto print_error;
-                      }
-                    else
-                      {
-                        if ((err = svn_cmdline_printf
-                             (pool, nb->in_external
-                              ? _("External at revision %ld.\n")
-                              : _("At revision %ld.\n"),
-                              n->revision)))
-                          goto print_error;
-                      }
-                  }
               }
-            else  /* no revision */
+          }
+        else  /* no revision */
+          {
+            if (nb->is_export)
               {
-                if (nb->is_export)
-                  {
-                    if ((err = svn_cmdline_printf
-                         (pool, nb->in_external
-                          ? _("External export complete.\n")
-                          : _("Export complete.\n"))))
-                      goto print_error;
-                  }
-                else if (nb->is_checkout)
-                  {
-                    if ((err = svn_cmdline_printf
-                         (pool, nb->in_external
-                          ? _("External checkout complete.\n")
-                          : _("Checkout complete.\n"))))
-                      goto print_error;
-                  }
-                else
-                  {
-                    if ((err = svn_cmdline_printf
-                         (pool, nb->in_external
-                          ? _("External update complete.\n")
-                          : _("Update complete.\n"))))
-                      goto print_error;
-                  }
+                if ((err = svn_cmdline_printf
+                     (pool, nb->in_external
+                      ? _("External export complete.\n")
+                      : _("Export complete.\n"))))
+                  goto print_error;
+              }
+            else if (nb->is_checkout)
+              {
+                if ((err = svn_cmdline_printf
+                     (pool, nb->in_external
+                      ? _("External checkout complete.\n")
+                      : _("Checkout complete.\n"))))
+                  goto print_error;
+              }
+            else
+              {
+                if ((err = svn_cmdline_printf
+                     (pool, nb->in_external
+                      ? _("External update complete.\n")
+                      : _("Update complete.\n"))))
+                  goto print_error;
               }
           }
       }
@@ -1048,7 +1043,6 @@ notify(void *baton, const svn_wc_notify_
 svn_error_t *
 svn_cl__get_notifier(svn_wc_notify_func2_t *notify_func_p,
                      void **notify_baton_p,
-                     svn_boolean_t suppress_summary_lines,
                      apr_pool_t *pool)
 {
   struct notify_baton *nb = apr_pcalloc(pool, sizeof(*nb));
@@ -1058,7 +1052,6 @@ svn_cl__get_notifier(svn_wc_notify_func2
   nb->is_checkout = FALSE;
   nb->is_export = FALSE;
   nb->is_wc_to_repos_copy = FALSE;
-  nb->suppress_summary_lines = suppress_summary_lines;
   nb->in_external = FALSE;
   nb->had_print_error = FALSE;
   nb->text_conflicts = 0;

Modified: subversion/branches/moves-scan-log/subversion/svn/status-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/svn/status-cmd.c?rev=1202950&r1=1202949&r2=1202950&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/svn/status-cmd.c (original)
+++ subversion/branches/moves-scan-log/subversion/svn/status-cmd.c Thu Nov 17 00:29:16 2011
@@ -50,6 +50,8 @@ struct status_baton
 {
   /* These fields all correspond to the ones in the
      svn_cl__print_status() interface. */
+  const char *cwd_abspath;
+  svn_boolean_t suppress_externals_placeholders;
   svn_boolean_t detailed;
   svn_boolean_t show_last_committed;
   svn_boolean_t skip_unrecognized;
@@ -149,9 +151,12 @@ print_status_normal_or_xml(void *baton,
   struct status_baton *sb = baton;
 
   if (sb->xml_mode)
-    return svn_cl__print_status_xml(path, status, sb->ctx, pool);
+    return svn_cl__print_status_xml(sb->cwd_abspath, path, status,
+                                    sb->ctx, pool);
   else
-    return svn_cl__print_status(path, status, sb->detailed,
+    return svn_cl__print_status(sb->cwd_abspath, path, status,
+                                sb->suppress_externals_placeholders,
+                                sb->detailed,
                                 sb->show_last_committed,
                                 sb->skip_unrecognized,
                                 sb->repos_locks,
@@ -298,6 +303,9 @@ svn_cl__status(apr_getopt_t *os,
                                   "mode"));
     }
 
+  SVN_ERR(svn_dirent_get_absolute(&(sb.cwd_abspath), "", scratch_pool));
+  sb.suppress_externals_placeholders = (opt_state->quiet
+                                        && (! opt_state->verbose));
   sb.detailed = (opt_state->verbose || opt_state->update);
   sb.show_last_committed = opt_state->verbose;
   sb.skip_unrecognized = opt_state->quiet;

Modified: subversion/branches/moves-scan-log/subversion/svn/status.c
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/svn/status.c?rev=1202950&r1=1202949&r2=1202950&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/svn/status.c (original)
+++ subversion/branches/moves-scan-log/subversion/svn/status.c Thu Nov 17 00:29:16 2011
@@ -187,7 +187,7 @@ make_relpath(const char *relative_to_pat
 /* Print STATUS and PATH in a format determined by DETAILED and
    SHOW_LAST_COMMITTED. */
 static svn_error_t *
-print_status(const char *path,
+print_status(const char *cwd_abspath, const char *path,
              svn_boolean_t detailed,
              svn_boolean_t show_last_committed,
              svn_boolean_t repos_locks,
@@ -205,6 +205,8 @@ print_status(const char *path,
   const char *moved_from_line = "";
   const char *moved_to_line = "";
 
+  path = make_relpath(cwd_abspath, path, pool, pool);
+
   /* For historic reasons svn ignores the property status for added nodes, even
      if these nodes were copied and have local property changes.
 
@@ -277,13 +279,12 @@ print_status(const char *path,
    * move info for in 'svn status'. See also comments in svn_wc_status3_t. */
   if (status->moved_from_abspath || status->moved_to_abspath)
     {
-      const char *cwd;
       const char *relpath;
-      SVN_ERR(svn_dirent_get_absolute(&cwd, "", pool));
 
       if (status->moved_from_abspath)
         {
-          relpath = make_relpath(cwd, status->moved_from_abspath, pool, pool);
+          relpath = make_relpath(cwd_abspath, status->moved_from_abspath,
+                                 pool, pool);
           relpath = svn_dirent_local_style(relpath, pool);
           moved_from_line = apr_pstrcat(pool, "\n        > ",
                                         apr_psprintf(pool, _("moved from %s"),
@@ -293,7 +294,8 @@ print_status(const char *path,
 
       if (status->moved_to_abspath)
         {
-          relpath = make_relpath(cwd, status->moved_to_abspath, pool, pool);
+          relpath = make_relpath(cwd_abspath, status->moved_to_abspath,
+                                 pool, pool);
           relpath = svn_dirent_local_style(relpath, pool);
           moved_to_line = apr_pstrcat(pool, "\n        > ",
                                       apr_psprintf(pool, _("moved to %s"),
@@ -419,7 +421,8 @@ print_status(const char *path,
 
 
 svn_error_t *
-svn_cl__print_status_xml(const char *path,
+svn_cl__print_status_xml(const char *cwd_abspath,
+                         const char *path,
                          const svn_client_status_t *status,
                          svn_client_ctx_t *ctx,
                          apr_pool_t *pool)
@@ -436,6 +439,8 @@ svn_cl__print_status_xml(const char *pat
     SVN_ERR(svn_wc_conflicted_p3(NULL, NULL, &tree_conflicted,
                                  ctx->wc_ctx, local_abspath, pool));
 
+  path = make_relpath(cwd_abspath, path, pool, pool);
+
   svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "entry",
                         "path", svn_dirent_local_style(path, pool), NULL);
 
@@ -464,18 +469,19 @@ svn_cl__print_status_xml(const char *pat
                  "true");
   if (status->moved_from_abspath || status->moved_to_abspath)
     {
-      const char *cwd;
       const char *relpath;
-      SVN_ERR(svn_dirent_get_absolute(&cwd, "", pool));
+
       if (status->moved_from_abspath)
         {
-          relpath = make_relpath(cwd, status->moved_from_abspath, pool, pool);
+          relpath = make_relpath(cwd_abspath, status->moved_from_abspath,
+                                 pool, pool);
           relpath = svn_dirent_local_style(relpath, pool);
           apr_hash_set(att_hash, "moved-from", APR_HASH_KEY_STRING, relpath);
         }
       if (status->moved_to_abspath)
         {
-          relpath = make_relpath(cwd, status->moved_to_abspath, pool, pool);
+          relpath = make_relpath(cwd_abspath, status->moved_to_abspath,
+                                 pool, pool);
           relpath = svn_dirent_local_style(relpath, pool);
           apr_hash_set(att_hash, "moved-to", APR_HASH_KEY_STRING, relpath);
         }
@@ -519,8 +525,10 @@ svn_cl__print_status_xml(const char *pat
 
 /* Called by status-cmd.c */
 svn_error_t *
-svn_cl__print_status(const char *path,
+svn_cl__print_status(const char *cwd_abspath,
+                     const char *path,
                      const svn_client_status_t *status,
+                     svn_boolean_t suppress_externals_placeholders,
                      svn_boolean_t detailed,
                      svn_boolean_t show_last_committed,
                      svn_boolean_t skip_unrecognized,
@@ -540,7 +548,11 @@ svn_cl__print_status(const char *path,
           && status->repos_node_status == svn_wc_status_none))
     return SVN_NO_ERROR;
 
-  return print_status(svn_dirent_local_style(path, pool),
+  if (suppress_externals_placeholders
+      && status->node_status == svn_wc_status_external)
+    return SVN_NO_ERROR;
+
+  return print_status(cwd_abspath, svn_dirent_local_style(path, pool),
                       detailed, show_last_committed, repos_locks, status,
                       text_conflicts, prop_conflicts, tree_conflicts,
                       ctx, pool);

Modified: subversion/branches/moves-scan-log/subversion/tests/cmdline/commit_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/tests/cmdline/commit_tests.py?rev=1202950&r1=1202949&r2=1202950&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/tests/cmdline/commit_tests.py (original)
+++ subversion/branches/moves-scan-log/subversion/tests/cmdline/commit_tests.py Thu Nov 17 00:29:16 2011
@@ -2825,6 +2825,41 @@ def commit_incomplete(sbox):
                                         None,
                                         wc_dir)
   
+#----------------------------------------------------------------------
+# Reported here:
+#   Message-ID: <4EBF0FC9.300@gmail.com>
+#   Date: Sun, 13 Nov 2011 13:31:05 +1300
+#   From: Fergus Slorach <sugref@gmail.com>
+#   Subject: svn commit --targets behaviour change in 1.7?
+@Issue(4059)
+@XFail()
+def commit_add_subadd(sbox):
+  "committing add with explicit subadd targets"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  A_path = os.path.join(wc_dir, 'A')
+  A2_path = os.path.join(wc_dir, 'A2')
+
+  targets_file = sbox.ospath('targets') # ### better tempdir?
+  targets_file = os.path.abspath(targets_file)
+
+  # prepare targets file
+  targets = "A2/D A2/D/H A2/D/H/chi A2/D/H/omega A2/D/H/psi".split()
+  open(targets_file, 'w').write("\n".join(targets))
+
+  # r2: add some stuff, with specific invocation
+  import shutil
+  shutil.copytree(A_path, A2_path)
+
+  # hack to copy A to A2, without creating .svn dirs when running against 1.6
+  svntest.main.run_svn(None, 'cp', A_path, A2_path)
+  svntest.main.run_svn(None, 'revert', '-R', A2_path)
+
+  os.chdir(wc_dir)
+  svntest.main.run_svn(None, 'commit', '--targets', targets_file, '-mm')
+
 
 ########################################################################
 # Run the tests
@@ -2894,6 +2929,7 @@ test_list = [ None,
               tree_conflicts_resolved,
               commit_multiple_nested_deletes,
               commit_incomplete,
+              commit_add_subadd,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/moves-scan-log/subversion/tests/cmdline/diff_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/tests/cmdline/diff_tests.py?rev=1202950&r1=1202949&r2=1202950&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/tests/cmdline/diff_tests.py (original)
+++ subversion/branches/moves-scan-log/subversion/tests/cmdline/diff_tests.py Thu Nov 17 00:29:16 2011
@@ -1263,30 +1263,20 @@ def diff_targets(sbox):
                                                             update_path,
                                                             add_path)
 
-  regex = 'svn: E195012: Unable to find repository location for \'.*\''
-  for line in err_output:
-    if re.match(regex, line):
-      break
-  else:
+  if check_update_a_file(diff_output) or check_add_a_file(diff_output):
     raise svntest.Failure
 
   exit_code, diff_output, err_output = svntest.main.run_svn(1,
                                                             'diff', '-r1:2',
                                                             add_path)
-  for line in err_output:
-    if re.match(regex, line):
-      break
-  else:
+
+  if not check_update_a_file(diff_output) or check_add_a_file(diff_output):
     raise svntest.Failure
 
   exit_code, diff_output, err_output = svntest.main.run_svn(
     1, 'diff', '-r1:2', '--old', parent_path, 'alpha', 'theta')
 
-  regex = 'svn: E160013: \'.*\' was not found in the repository'
-  for line in err_output:
-    if re.match(regex, line):
-      break
-  else:
+  if check_update_a_file(diff_output) or check_add_a_file(diff_output):
     raise svntest.Failure
 
   exit_code, diff_output, err_output = svntest.main.run_svn(

Modified: subversion/branches/moves-scan-log/subversion/tests/cmdline/merge_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/tests/cmdline/merge_tests.py?rev=1202950&r1=1202949&r2=1202950&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/tests/cmdline/merge_tests.py (original)
+++ subversion/branches/moves-scan-log/subversion/tests/cmdline/merge_tests.py Thu Nov 17 00:29:16 2011
@@ -49,15 +49,31 @@ from svntest.actions import make_conflic
 from svntest.actions import inject_conflict_into_expected_state
 
 def expected_merge_output(rev_ranges, additional_lines=None, foreign=False,
-                          elides=False, two_url=False):
+                          elides=False, two_url=False, target=None,
+                          text_conflicts=0, prop_conflicts=0, tree_conflicts=0):
   """Generate an (inefficient) regex representing the expected merge
-  output and mergeinfo notifications from REV_RANGES (a list of 'range' lists
-  of the form [start, end] or [single_rev] --> [single_rev - 1, single_rev]),
-  and ADDITIONAL_LINES (a list of strings).  If REV_RANGES is None then only
-  the standard notification for a 3-way merge is expected.  If ELIDES is true
-  add to the regex an expression representing elision notification.  If TWO_URL
-  us true tweak the regex to expect the appropriate mergeinfo notification
-  for a 3-way merge."""
+  output and mergeinfo notifications from REV_RANGES and ADDITIONAL_LINES.
+
+  REV_RANGES is a list of revision ranges for which mergeinfo is being
+  recorded.  Each range is of the form [start, end] (where both START and
+  END are inclusive, unlike in '-rX:Y') or the form [single_rev] (which is
+  like '-c SINGLE_REV').  If REV_RANGES is None then only the standard
+  notification for a 3-way merge is expected.
+
+  ADDITIONAL_LINES is a list of strings to match the other lines of output;
+  these are basically regular expressions except that backslashes will be
+  escaped herein.
+
+  If ELIDES is true, add to the regex an expression representing elision
+  notification.  If TWO_URL is true, tweak the regex to expect the
+  appropriate mergeinfo notification for a 3-way merge.
+
+  TARGET is the local path to the target, as it should appear in
+  notifications; if None, it is not checked.
+
+  TEXT_CONFLICTS, PROP_CONFLICTS and TREE_CONFLICTS specify the number of
+  each kind of conflict to expect."""
+
   if rev_ranges is None:
     lines = [svntest.main.merge_notify_line(None, None, False, foreign)]
   else:
@@ -69,8 +85,8 @@ def expected_merge_output(rev_ranges, ad
       else:
         end_rev = None
       lines += [svntest.main.merge_notify_line(start_rev, end_rev,
-                                               True, foreign)]
-      lines += [svntest.main.mergeinfo_notify_line(start_rev, end_rev)]
+                                               True, foreign, target)]
+      lines += [svntest.main.mergeinfo_notify_line(start_rev, end_rev, target)]
 
   if (elides):
     lines += ["--- Eliding mergeinfo from .*\n"]
@@ -94,6 +110,16 @@ def expected_merge_output(rev_ranges, ad
     if sys.platform == 'win32' and additional_lines != None:
       additional_lines = additional_lines.replace("\\", "\\\\")
     lines.append(str(additional_lines))
+
+  if text_conflicts or prop_conflicts or tree_conflicts:
+    lines.append("Summary of conflicts:\n")
+    if text_conflicts:
+      lines.append("  Text conflicts: %d\n" % text_conflicts)
+    if prop_conflicts:
+      lines.append("  Property conflicts: %d\n" % prop_conflicts)
+    if tree_conflicts:
+      lines.append("  Tree conflicts: %d\n" % tree_conflicts)
+
   return "|".join(lines)
 
 def check_mergeinfo_recursively(root_path, subpaths_mergeinfo):
@@ -12509,24 +12535,38 @@ def svn_copy(s_rev, path1, path2):
   svntest.actions.run_and_verify_svn(None, None, [], 'copy', '--parents',
                                      '-r', s_rev, path1, path2)
 
-def svn_merge(rev_spec, source, target, exp_out=None, *args):
-  """Merge a single change from path 'source' to path 'target'.
-  SRC_CHANGE_NUM is either a number (to cherry-pick that specific change)
-  or a command-line option revision range string such as '-r10:20'.
-  *ARGS are additional arguments passed to svn merge."""
+def svn_merge(rev_range, source, target, lines=None,
+              text_conflicts=0, prop_conflicts=0, tree_conflicts=0, args=[]):
+  """Merge a single change from path SOURCE to path TARGET and verify the
+  output and that there is no error.  (The changes made are not verified.)
+
+  REV_RANGE is either a number (to cherry-pick that specific change) or a
+  two-element list [X,Y] to pick the revision range '-r(X-1):Y'.
+
+  LINES is a list of regular expressions to match other lines of output; if
+  LINES is 'None' then match all normal (non-conflicting) merges.
+
+  TEXT_CONFLICTS, PROP_CONFLICTS and TREE_CONFLICTS specify the number of
+  each kind of conflict to expect.
+
+  ARGS are additional arguments passed to svn merge."""
+
   source = local_path(source)
   target = local_path(target)
-  if isinstance(rev_spec, int):
-    rev_spec = '-c' + str(rev_spec)
-  if exp_out is None:
-    target_re = re.escape(target)
-    exp_1 = "--- Merging r.* into '" + target_re + ".*':"
-    exp_2 = "(A |D |[UG] | [UG]|[UG][UG])   " + target_re + ".*"
-    exp_3 = "--- Recording mergeinfo for merge of r.* into '" + \
-            target_re + ".*':"
-    exp_out = svntest.verify.RegexOutput(exp_1 + "|" + exp_2 + "|" + exp_3)
+  if isinstance(rev_range, int):
+    mi_rev_range = [rev_range]
+    rev_arg = '-c' + str(rev_range)
+  else:
+    mi_rev_range = rev_range
+    rev_arg = '-r' + str(rev_range[0] - 1) + ':' + str(rev_range[1])
+  if lines is None:
+    lines = ["(A |D |[UG] | [UG]|[UG][UG])   " + target + ".*\n"]
+  exp_out = expected_merge_output([mi_rev_range], lines, target=target,
+                                  text_conflicts=text_conflicts,
+                                  prop_conflicts=prop_conflicts,
+                                  tree_conflicts=tree_conflicts)
   svntest.actions.run_and_verify_svn(None, exp_out, [],
-                                     'merge', rev_spec, source, target, *args)
+                                     'merge', rev_arg, source, target, *args)
 
 #----------------------------------------------------------------------
 # Tests for merging the deletion of a node, where the node to be deleted
@@ -12558,7 +12598,7 @@ def del_identical_file(sbox):
   svn_copy(s_rev_mod, source, target)
   sbox.simple_commit(target)
   # Should be deleted quietly.
-  svn_merge(s_rev_del, source, target, '--- Merging|D |--- Recording| U')
+  svn_merge(s_rev_del, source, target, ['D ', ' U'])
 
   # Make a differing copy, locally modify it so it's the same,
   # and merge a deletion to it.
@@ -12567,7 +12607,7 @@ def del_identical_file(sbox):
   sbox.simple_commit(target)
   svn_modfile(target+"/tau")
   # Should be deleted quietly.
-  svn_merge(s_rev_del, source, target, '--- Merging|D |--- Recording| U')
+  svn_merge(s_rev_del, source, target, ['D ', ' U'])
 
   os.chdir(saved_cwd)
 
@@ -12594,10 +12634,9 @@ def del_sched_add_hist_file(sbox):
   svn_copy(s_rev_orig, source, target)
   sbox.simple_commit(target)
   s_rev = 3
-  svn_merge(s_rev_add, source, target, '--- Merging|A |--- Recording| U')
+  svn_merge(s_rev_add, source, target, ['A ', ' U'])
   # Should be deleted quietly.
-  svn_merge(-s_rev_add, source, target,
-            '--- Reverse-merging|D |--- Recording| U| G|--- Eliding')
+  svn_merge(-s_rev_add, source, target, ['D ', ' U', ' G', '--- Eliding'])
 
   os.chdir(saved_cwd)
 
@@ -13052,15 +13091,10 @@ def merge_two_edits_to_same_prop(sbox):
   rev4 = initial_rev + 4
 
   # Merge the two changes together to source.
-  svn_merge('-r'+str(rev3-1)+':'+str(rev4), A_COPY_path, A_path, [
-      "--- Merging r9 through r10 into '%s':\n" % A_path,
+  svn_merge([rev3, rev4], A_COPY_path, A_path, [
       " C   %s\n" % mu_path,
-      "--- Recording mergeinfo for merge of r9 through r10 into '%s':\n" \
-      % A_path,
       " U   A\n",
-      "Summary of conflicts:\n",
-      "  Property conflicts: 1\n"],
-      '--allow-mixed-revisions')
+      ], prop_conflicts=1, args=['--allow-mixed-revisions'])
 
   # Revert changes to source wc, to test next scenario of #3250
   svntest.actions.run_and_verify_svn(None, None, [],
@@ -13068,21 +13102,13 @@ def merge_two_edits_to_same_prop(sbox):
 
   # Merge the first change, then the second, to source.
   svn_merge(rev3, A_COPY_path, A_path, [
-      "--- Merging r9 into '%s':\n" % A_path,
       " C   %s\n" % mu_path,
-      "--- Recording mergeinfo for merge of r9 into '%s':\n" % A_path,
       " U   A\n",
-      "Summary of conflicts:\n",
-      "  Property conflicts: 1\n"],
-      '--allow-mixed-revisions')
+      ], prop_conflicts=1, args=['--allow-mixed-revisions'])
   svn_merge(rev4, A_COPY_path, A_path, [
-      "--- Merging r10 into '%s':\n" % A_path,
       " C   %s\n" % mu_path,
-      "--- Recording mergeinfo for merge of r10 into '%s':\n" % A_path,
       " G   A\n",
-      "Summary of conflicts:\n",
-      "  Property conflicts: 1\n"],
-      '--allow-mixed-revisions')
+      ], prop_conflicts=1, args=['--allow-mixed-revisions'])
 
   os.chdir(was_cwd)
 
@@ -13131,8 +13157,8 @@ def merge_an_eol_unification_and_set_svn
   sbox.simple_commit('A_COPY')
 
   # Merge the two changes together to the target branch.
-  svn_merge('-r'+str(rev1)+':'+str(rev3), 'A', 'A_COPY', None,
-            '--allow-mixed-revisions')
+  svn_merge([rev2, rev3], 'A', 'A_COPY',
+            args=['--allow-mixed-revisions'])
 
   # That merge should succeed.
   # Surprise: setting svn:eol-style='LF' instead of 'native' doesn't fail.
@@ -16680,11 +16706,9 @@ def foreign_repos_prop_conflict(sbox):
 
   # Now, merge the propchange to the *second* working copy.
   expected_output = [' C   %s\n' % (os.path.join(other_wc_dir,
-                                                 "A", "D", "G")),
-                     'Summary of conflicts:\n',
-                     '  Property conflicts: 1\n',
-                     ]
-  expected_output = expected_merge_output([[3]], expected_output, True)
+                                                 "A", "D", "G"))]
+  expected_output = expected_merge_output([[3]], expected_output, True,
+                                          prop_conflicts=1)
   svntest.actions.run_and_verify_svn(None,
                                      expected_output,
                                      [], 'merge', '-c3',
@@ -17111,6 +17135,152 @@ def record_only_merge_adds_new_subtree_m
                                        None, None, None, None,
                                        None, 1, False)
 
+#----------------------------------------------------------------------
+# Setup helper for issue #4056 and issue #4057 tests.
+def noninheritable_mergeinfo_test_set_up(sbox):
+  '''Starting with standard greek tree, copy 'A' to 'branch' in r2 and
+  then made a file edit to A/B/lambda in r3.
+  Return (expected_output, expected_mergeinfo_output, expected_elision_output,
+          expected_status, expected_disk, expected_skip) for a merge of
+  r3 from ^/A/B to branch/B.'''
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  lambda_path   = os.path.join(wc_dir, 'A', 'B', 'lambda')
+  B_branch_path = os.path.join(wc_dir, 'branch', 'B')
+
+  # r2 - Branch ^/A to ^/branch.
+  svntest.main.run_svn(None, 'copy', sbox.repo_url + '/A',
+                       sbox.repo_url + '/branch', '-m', 'make a branch')
+
+  # r3 - Make an edit to A/B/lambda.
+  svntest.main.file_write(lambda_path, "trunk edit.\n")
+  svntest.main.run_svn(None, 'commit', '-m', 'file edit', wc_dir)
+  svntest.main.run_svn(None, 'up', wc_dir)
+
+  expected_output = wc.State(B_branch_path, {
+    'lambda' : Item(status='U '),
+    })
+  expected_mergeinfo_output = wc.State(B_branch_path, {
+    ''       : Item(status=' U'),
+    })
+  expected_elision_output = wc.State(B_branch_path, {
+    })
+  expected_status = wc.State(B_branch_path, {
+    ''        : Item(status=' M'),
+    'lambda'  : Item(status='M '),
+    'E'       : Item(status='  '),
+    'E/alpha' : Item(status='  '),
+    'E/beta'  : Item(status='  '),
+    'F'       : Item(status='  '),
+    })
+  expected_status.tweak(wc_rev='3')
+  expected_disk = wc.State('', {
+    ''          : Item(props={SVN_PROP_MERGEINFO : '/A/B:3'}),
+    'lambda'  : Item("trunk edit.\n"),
+    'E'       : Item(),
+    'E/alpha' : Item("This is the file 'alpha'.\n"),
+    'E/beta'  : Item("This is the file 'beta'.\n"),
+    'F'       : Item(),
+    })
+  expected_skip = wc.State(B_branch_path, {})
+
+  return expected_output, expected_mergeinfo_output, expected_elision_output, \
+    expected_status, expected_disk, expected_skip
+
+
+#----------------------------------------------------------------------
+# Test for issue #4056 "don't record non-inheritable mergeinfo if missing
+# subtrees are not touched by the full-depth diff".
+@Issue(4056)
+@XFail()
+@SkipUnless(server_has_mergeinfo)
+def unnecessary_noninheritable_mergeinfo_missing_subtrees(sbox):
+  "missing subtrees untouched by infinite depth merge"
+
+  B_branch_path = os.path.join(sbox.wc_dir, 'branch', 'B')
+
+  # Setup a simple branch to which 
+  expected_output, expected_mergeinfo_output, expected_elision_output, \
+    expected_status, expected_disk, expected_skip = \
+    noninheritable_mergeinfo_test_set_up(sbox)
+
+  # Create a shallow merge target; set depth of branch/B to files.
+  svntest.main.run_svn(None, 'up', '--set-depth=files', B_branch_path)
+  expected_status.remove('E', 'E/alpha', 'E/beta', 'F')
+  expected_disk.remove('E', 'E/alpha', 'E/beta', 'F')
+
+  # Merge r3 from ^/A/B to branch/B
+  #
+  # Currently this fails because merge isn't smart enough to
+  # realize that despite the shallow merge target, the diff can
+  # only affect branch/B/lambda, which is still present, so there
+  # is no need to record non-inheritable mergeinfo on the target
+  # or any subtree mergeinfo whatsoever:
+  #
+  #   >svn pg svn:mergeinfo -vR
+  #   Properties on 'branch\B':
+  #     svn:mergeinfo
+  #       /A/B:3* <-- Should be inheritable
+  #   Properties on 'branch\B\lambda':
+  #     svn:mergeinfo
+  #       /A/B/lambda:3 <-- Not neccessary
+  svntest.actions.run_and_verify_merge(B_branch_path,
+                                       '2', '3',
+                                       sbox.repo_url + '/A/B', None,
+                                       expected_output,
+                                       expected_mergeinfo_output,
+                                       expected_elision_output,
+                                       expected_disk,
+                                       expected_status,
+                                       expected_skip,
+                                       None, None, None, None, None, 1, 1,
+                                       B_branch_path)
+
+#----------------------------------------------------------------------
+# Test for issue #4057 "don't record non-inheritable mergeinfo in shallow
+# merge if entire diff is within requested depth".
+@Issue(4057)
+@XFail()
+@SkipUnless(server_has_mergeinfo)
+def unnecessary_noninheritable_mergeinfo_shallow_merge(sbox):
+  "shallow merge reaches all neccessary subtrees"
+
+  B_branch_path = os.path.join(sbox.wc_dir, 'branch', 'B')
+
+  # Setup a simple branch to which 
+  expected_output, expected_mergeinfo_output, expected_elision_output, \
+    expected_status, expected_disk, expected_skip = \
+    noninheritable_mergeinfo_test_set_up(sbox)
+
+  # Merge r3 from ^/A/B to branch/B at operational depth=files
+  #
+  # Currently this fails because merge isn't smart enough to
+  # realize that despite being a shallow merge, the diff can
+  # only affect branch/B/lambda, which is within the specified
+  # depth, so there is no need to record non-inheritable mergeinfo
+  # or subtree mergeinfo:
+  #
+  #   >svn pg svn:mergeinfo -vR
+  #   Properties on 'branch\B':
+  #     svn:mergeinfo
+  #       /A/B:3* <-- Should be inheritable
+  #   Properties on 'branch\B\lambda':
+  #     svn:mergeinfo
+  #       /A/B/lambda:3 <-- Not neccessary
+  expected_skip = wc.State(B_branch_path, {})
+  svntest.actions.run_and_verify_merge(B_branch_path, '2', '3',
+                                       sbox.repo_url + '/A/B', None,
+                                       expected_output,
+                                       expected_mergeinfo_output,
+                                       expected_elision_output,
+                                       expected_disk,
+                                       expected_status,
+                                       expected_skip,
+                                       None, None, None, None, None, 1, 1,
+                                       '--depth', 'files', B_branch_path)
+
 ########################################################################
 # Run the tests
 
@@ -17239,6 +17409,8 @@ test_list = [ None,
               reverse_merge_adds_subtree,
               merged_deletion_causes_tree_conflict,
               record_only_merge_adds_new_subtree_mergeinfo,
+              unnecessary_noninheritable_mergeinfo_missing_subtrees,
+              unnecessary_noninheritable_mergeinfo_shallow_merge,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/moves-scan-log/subversion/tests/cmdline/merge_tree_conflict_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/tests/cmdline/merge_tree_conflict_tests.py?rev=1202950&r1=1202949&r2=1202950&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/tests/cmdline/merge_tree_conflict_tests.py (original)
+++ subversion/branches/moves-scan-log/subversion/tests/cmdline/merge_tree_conflict_tests.py Thu Nov 17 00:29:16 2011
@@ -46,6 +46,7 @@ from svntest.main import server_has_merg
 from merge_tests import set_up_branch
 from merge_tests import svn_copy
 from merge_tests import svn_merge
+from merge_tests import expected_merge_output
 
 #----------------------------------------------------------------------
 @SkipUnless(server_has_mergeinfo)
@@ -685,20 +686,14 @@ def del_differing_file(sbox):
   pi = os.path.join(dir_D, 'G2', 'pi')
   # Should complain and "skip" it.
   svn_merge(s_rev_tau, source, target, [
-      "--- Merging r2 into '%s':\n" % dir_G2,
-      "   C %s\n" % tau,
-      "--- Recording mergeinfo for merge of r2 into '%s':\n" % (dir_G2),
-      " U   %s\n" % (dir_G2),
-      "Summary of conflicts:\n",
-      "  Tree conflicts: 1\n"])
+      "   C %s\n" % tau,       # merge
+      " U   %s\n" % (dir_G2),  # mergeinfo
+      ], tree_conflicts=1)
 
   svn_merge(s_rev_pi, source, target, [
-      "--- Merging r3 into '%s':\n" % dir_G2,
-      "   C %s\n" % pi,
-      "--- Recording mergeinfo for merge of r3 into '%s':\n" % (dir_G2),
-      " G   %s\n" % (dir_G2),
-      "Summary of conflicts:\n",
-      "  Tree conflicts: 1\n"])
+      "   C %s\n" % pi,        # merge
+      " G   %s\n" % (dir_G2),  # mergeinfo
+      ], tree_conflicts=1)
 
 
   # Copy a file, modify it, commit, and merge a deletion to it.
@@ -716,20 +711,14 @@ def del_differing_file(sbox):
 
   # Should complain and "skip" it.
   svn_merge(s_rev_tau, source, target, [
-      "--- Merging r2 into '%s':\n" % dir_G3,
-      "   C %s\n" % tau,
-      "--- Recording mergeinfo for merge of r2 into '%s':\n" % (dir_G3),
-      " U   %s\n" % (dir_G3),
-      "Summary of conflicts:\n",
-      "  Tree conflicts: 1\n"])
+      "   C %s\n" % tau,       # merge
+      " U   %s\n" % (dir_G3),  # mergeinfo
+      ], tree_conflicts=1)
 
   svn_merge(s_rev_pi, source, target, [
-      "--- Merging r3 into '%s':\n" % dir_G3,
-      "   C %s\n" % pi,
-      "--- Recording mergeinfo for merge of r3 into '%s':\n" % (dir_G3),
-      " G   %s\n" % (dir_G3),
-      "Summary of conflicts:\n",
-      "  Tree conflicts: 1\n"])
+      "   C %s\n" % pi,        # merge
+      " G   %s\n" % (dir_G3),  # mergeinfo
+      ], tree_conflicts=1)
 
   os.chdir(saved_cwd)
 
@@ -1738,18 +1727,15 @@ def merge_replace_causes_tree_conflict(s
     'propname', 'propval', A_D_H)
 
   # svn merge $URL/A $URL/branch A
-  expected_stdout = verify.UnorderedOutput([
-    "--- Merging differences between repository URLs into '" + A + "':\n",
+  expected_stdout = expected_merge_output(None, [
+    # merge
     '   C ' + A_B_E + '\n',
     '   C ' + A_mu + '\n',
     '   C ' + A_D_G_pi + '\n',
     '   C ' + A_D_H + '\n',
-    "--- Recording mergeinfo for merge between repository URLs into '" \
-    + A + "':\n",
+    # mergeinfo
     ' U   ' + A + '\n',
-    'Summary of conflicts:\n',
-    '  Tree conflicts: 4\n',
-  ])
+  ], target=A, two_url=True, tree_conflicts=4)
 
   actions.run_and_verify_svn2('OUTPUT', expected_stdout, [], 0, 'merge',
     url_A, url_branch, A)
@@ -1829,15 +1815,10 @@ def merge_replace_causes_tree_conflict2(
 
   ### A file-with-file replacement onto a deleted file.
   # svn merge $URL/A/mu $URL/branch/mu A/mu
-  expected_stdout = verify.UnorderedOutput([
-    "--- Merging differences between repository URLs into '" + A + "':\n",
-    '   C ' + A_mu + '\n',
-    "--- Recording mergeinfo for merge between repository URLs into '" +
-      A + "':\n",
-    " U   " + A + "\n",
-    'Summary of conflicts:\n',
-    '  Tree conflicts: 1\n',
-  ])
+  expected_stdout = expected_merge_output(None, [
+    '   C ' + A_mu + '\n',  # merge
+    " U   " + A + "\n",     # mergeinfo
+  ], target=A, two_url=True, tree_conflicts=1)
 
   actions.run_and_verify_svn2('OUTPUT', expected_stdout, [], 0, 'merge',
     url_A, url_branch, A, '--depth=files')
@@ -1853,15 +1834,10 @@ def merge_replace_causes_tree_conflict2(
 
   ### A dir-with-dir replacement onto a deleted directory.
   # svn merge $URL/A/B $URL/branch/B A/B
-  expected_stdout = verify.UnorderedOutput([
-    "--- Merging differences between repository URLs into '" + A_B + "':\n",
-    '   C ' + A_B_E + '\n',
-    "--- Recording mergeinfo for merge between repository URLs into '" +
-      A_B + "':\n",
-    " U   " + A_B + "\n",
-    'Summary of conflicts:\n',
-    '  Tree conflicts: 1\n',
-  ])
+  expected_stdout = expected_merge_output(None, [
+    '   C ' + A_B_E + '\n',   # merge
+    " U   " + A_B + "\n",     # mergeinfo
+  ], target=A_B, two_url=True, tree_conflicts=1)
 
   actions.run_and_verify_svn2('OUTPUT', expected_stdout, [], 0, 'merge',
     url_A_B, url_branch_B, A_B)
@@ -1877,16 +1853,11 @@ def merge_replace_causes_tree_conflict2(
 
   ### A dir-with-file replacement onto a deleted directory.
   # svn merge --depth=immediates $URL/A/D $URL/branch/D A/D
-  expected_stdout = verify.UnorderedOutput([
-    "--- Merging differences between repository URLs into '" + A_D + "':\n",
-    '   C ' + A_D_H + '\n',
-    "--- Recording mergeinfo for merge between repository URLs into '" +
-      A_D + "':\n",
-    " U   " + A_D + "\n",
+  expected_stdout = expected_merge_output(None, [
+    '   C ' + A_D_H + '\n',   # merge
+    " U   " + A_D + "\n",     # mergeinfo
     " U   " + A_D_G + "\n",
-    'Summary of conflicts:\n',
-    '  Tree conflicts: 1\n',
-  ])
+  ], target=A_D, two_url=True, tree_conflicts=1)
 
   actions.run_and_verify_svn2('OUTPUT', expected_stdout, [], 0, 'merge',
     '--depth=immediates', url_A_D, url_branch_D, A_D)
@@ -1902,20 +1873,9 @@ def merge_replace_causes_tree_conflict2(
 
   ### A file-with-dir replacement onto a deleted file.
   # svn merge $URL/A/D/G $URL/branch/D/G A/D/G
-  expected_stdout = verify.UnorderedOutput([
-    "--- Merging differences between repository URLs into '" + A_D_G +
-    "':\n",
-    '   C ' + A_D_G_pi + '\n',
-    "--- Recording mergeinfo for merge between repository URLs into '" +
-      A_D_G + "':\n",
-    "--- Eliding mergeinfo from '" + A_D_G_pi + "':\n",
-    " U   " + A_D_G_pi + "\n",
-    "--- Eliding mergeinfo from '" + A_D_G_pi + "':\n",
-    " U   " + A_D_G_pi + "\n",
-    " G   " + A_D_G + "\n",
-    'Summary of conflicts:\n',
-    '  Tree conflicts: 1\n',
-  ])
+  expected_stdout = expected_merge_output(None, [
+    '   C ' + A_D_G_pi + '\n',  # merge
+  ], target=A_D_G, elides=[A_D_G_pi, A_D_G], two_url=True, tree_conflicts=1)
 
   actions.run_and_verify_svn2('OUTPUT', expected_stdout, [], 0, 'merge',
     url_A_D_G, url_branch_D_G, A_D_G)
@@ -1975,15 +1935,10 @@ def merge_replace_on_del_fails(sbox):
 
   # Sync merge ^/A to branch
   svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir)
-  expected_stdout = verify.UnorderedOutput([
-    "--- Merging r2 through r4 into '" + branch_path + "':\n",
-    '   C ' + C_branch_path + '\n',
-    "--- Recording mergeinfo for merge of r2 through r4 into '" \
-    + branch_path + "':\n",
-    ' U   ' + branch_path + '\n',
-    'Summary of conflicts:\n',
-    '  Tree conflicts: 1\n',
-    ])
+  expected_stdout = expected_merge_output([[2,4]], [
+    '   C ' + C_branch_path + '\n',  # merge
+    ' U   ' + branch_path + '\n',    # mergeinfo
+  ], target=branch_path, tree_conflicts=1)
   # This currently fails with:
   #
   #   >svn merge ^/A branch

Modified: subversion/branches/moves-scan-log/subversion/tests/cmdline/mergeinfo_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/tests/cmdline/mergeinfo_tests.py?rev=1202950&r1=1202949&r2=1202950&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/tests/cmdline/mergeinfo_tests.py (original)
+++ subversion/branches/moves-scan-log/subversion/tests/cmdline/mergeinfo_tests.py Thu Nov 17 00:29:16 2011
@@ -679,6 +679,52 @@ def natural_history_is_not_eligible_nor_
     ['3','4','5','6','7','9'], sbox.repo_url + '/A',
     A_COPY_path, '--show-revs', 'merged', '-R')
 
+#----------------------------------------------------------------------
+# A test for issue 4050 "'svn mergeinfo' always considers non-inheritable
+# ranges as partially merged".
+@Issue(4050)
+@XFail()
+@SkipUnless(server_has_mergeinfo)
+def noninheritabled_mergeinfo_not_always_eligible(sbox):
+  "noninheritabled mergeinfo not always eligible"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  A_path      = os.path.join(wc_dir, 'A')
+  branch_path = os.path.join(wc_dir, 'branch')
+  
+  # r2 - Branch ^/A to ^/branch.
+  svntest.main.run_svn(None, 'copy', sbox.repo_url + '/A',
+                       sbox.repo_url + '/branch', '-m', 'make a branch')
+  
+  # r3 - Make prop edit to A.
+  svntest.main.run_svn(None, 'ps', 'prop', 'val', A_path)
+  svntest.main.run_svn(None, 'commit', '-m', 'file edit', wc_dir)
+  svntest.main.run_svn(None, 'up', wc_dir)
+
+  # r4 - Merge r3 from ^/A to branch at depth=empty.
+  svntest.actions.run_and_verify_svn(None, None, [], 'merge',
+                                     sbox.repo_url + '/A', branch_path,
+                                     '-c3', '--depth=empty')
+  svntest.main.run_svn(None, 'commit', '-m', 'shallow merge', wc_dir)
+
+  # Now check that r3 is reported as fully merged from ^/A to ^/branch
+  # and does not show up all when asking for eligible revs.
+  #
+  # Currently this fails because r3 shows up as partially merged, even
+  # though it is fully merged to ^/branch.
+  svntest.actions.run_and_verify_mergeinfo(
+    adjust_error_for_server_version(''),
+    ['3'], sbox.repo_url + '/A', sbox.repo_url + '/branch',
+    '--show-revs', 'merged', '-R')
+  # Likewise r3 shows up as partially eligible when asking about
+  # for --show-revs=eligible.
+  svntest.actions.run_and_verify_mergeinfo(
+    adjust_error_for_server_version(''),
+    [], sbox.repo_url + '/A', sbox.repo_url + '/branch',
+    '--show-revs', 'eligible', '-R')
+
 ########################################################################
 # Run the tests
 
@@ -695,6 +741,7 @@ test_list = [ None,
               mergeinfo_on_pegged_wc_path,
               wc_target_inherits_mergeinfo_from_repos,
               natural_history_is_not_eligible_nor_merged,
+              noninheritabled_mergeinfo_not_always_eligible,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/moves-scan-log/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/tests/cmdline/svntest/main.py?rev=1202950&r1=1202949&r2=1202950&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/branches/moves-scan-log/subversion/tests/cmdline/svntest/main.py Thu Nov 17 00:29:16 2011
@@ -998,51 +998,60 @@ def use_editor(func):
   os.environ['SVNTEST_EDITOR_FUNC'] = func
   os.environ['SVN_TEST_PYTHON'] = sys.executable
 
-def mergeinfo_notify_line(revstart, revend):
+def mergeinfo_notify_line(revstart, revend, target=None):
   """Return an expected output line that describes the beginning of a
   mergeinfo recording notification on revisions REVSTART through REVEND."""
+  if target:
+    target_re = re.escape(target)
+  else:
+    target_re = ".+"
   if (revend is None):
     if (revstart < 0):
       revstart = abs(revstart)
-      return "--- Recording mergeinfo for reverse merge of r%ld .*:\n" \
-             % (revstart)
+      return "--- Recording mergeinfo for reverse merge of r%ld into '%s':\n" \
+             % (revstart, target_re)
     else:
-      return "--- Recording mergeinfo for merge of r%ld .*:\n" % (revstart)
+      return "--- Recording mergeinfo for merge of r%ld into '%s':\n" \
+             % (revstart, target_re)
   elif (revstart < revend):
-    return "--- Recording mergeinfo for merge of r%ld through r%ld .*:\n" \
-           % (revstart, revend)
+    return "--- Recording mergeinfo for merge of r%ld through r%ld into '%s':\n" \
+           % (revstart, revend, target_re)
   else:
     return "--- Recording mergeinfo for reverse merge of r%ld through " \
-           "r%ld .*:\n" % (revstart, revend)
+           "r%ld into '%s':\n" % (revstart, revend, target_re)
 
 def merge_notify_line(revstart=None, revend=None, same_URL=True,
-                      foreign=False):
+                      foreign=False, target=None):
   """Return an expected output line that describes the beginning of a
   merge operation on revisions REVSTART through REVEND.  Omit both
   REVSTART and REVEND for the case where the left and right sides of
   the merge are from different URLs."""
   from_foreign_phrase = foreign and "\(from foreign repository\) " or ""
+  if target:
+    target_re = re.escape(target)
+  else:
+    target_re = ".+"
   if not same_URL:
-    return "--- Merging differences between %srepository URLs into '.+':\n" \
-           % (foreign and "foreign " or "")
+    return "--- Merging differences between %srepository URLs into '%s':\n" \
+           % (foreign and "foreign " or "", target_re)
   if revend is None:
     if revstart is None:
       # The left and right sides of the merge are from different URLs.
-      return "--- Merging differences between %srepository URLs into '.+':\n" \
-             % (foreign and "foreign " or "")
+      return "--- Merging differences between %srepository URLs into '%s':\n" \
+             % (foreign and "foreign " or "", target_re)
     elif revstart < 0:
-      return "--- Reverse-merging %sr%ld into '.+':\n" \
-             % (from_foreign_phrase, abs(revstart))
+      return "--- Reverse-merging %sr%ld into '%s':\n" \
+             % (from_foreign_phrase, abs(revstart), target_re)
     else:
-      return "--- Merging %sr%ld into '.+':\n" \
-             % (from_foreign_phrase, revstart)
+      return "--- Merging %sr%ld into '%s':\n" \
+             % (from_foreign_phrase, revstart, target_re)
   else:
     if revstart > revend:
-      return "--- Reverse-merging %sr%ld through r%ld into '.+':\n" \
-             % (from_foreign_phrase, revstart, revend)
+      return "--- Reverse-merging %sr%ld through r%ld into '%s':\n" \
+             % (from_foreign_phrase, revstart, revend, target_re)
     else:
-      return "--- Merging %sr%ld through r%ld into '.+':\n" \
-             % (from_foreign_phrase, revstart, revend)
+      return "--- Merging %sr%ld through r%ld into '%s':\n" \
+             % (from_foreign_phrase, revstart, revend, target_re)
 
 
 def make_log_msg():

Modified: subversion/branches/moves-scan-log/subversion/tests/libsvn_repos/repos-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/tests/libsvn_repos/repos-test.c?rev=1202950&r1=1202949&r2=1202950&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/tests/libsvn_repos/repos-test.c (original)
+++ subversion/branches/moves-scan-log/subversion/tests/libsvn_repos/repos-test.c Thu Nov 17 00:29:16 2011
@@ -2521,6 +2521,45 @@ test_get_file_revs(const svn_test_opts_t
   return SVN_NO_ERROR;
 }
 
+static svn_error_t *
+issue_4060(const svn_test_opts_t *opts,
+           apr_pool_t *pool)
+{
+  apr_pool_t *subpool = svn_pool_create(pool);
+  svn_authz_t *authz_cfg;
+  svn_boolean_t allowed;
+  const char *authz_contents =
+    "[/A/B]"                                                               NL
+    "ozymandias = rw"                                                      NL
+    "[/]"                                                                  NL
+    "ozymandias = r"                                                       NL
+    ""                                                                     NL;
+
+  SVN_ERR(authz_get_handle(&authz_cfg, authz_contents, subpool));
+
+  SVN_ERR(svn_repos_authz_check_access(authz_cfg, "babylon",
+                                       "/A/B/C", "ozymandias",
+                                       svn_authz_write | svn_authz_recursive,
+                                       &allowed, subpool));
+  SVN_TEST_ASSERT(allowed);
+
+  SVN_ERR(svn_repos_authz_check_access(authz_cfg, "",
+                                       "/A/B/C", "ozymandias",
+                                       svn_authz_write | svn_authz_recursive,
+                                       &allowed, subpool));
+  SVN_TEST_ASSERT(allowed);
+
+  SVN_ERR(svn_repos_authz_check_access(authz_cfg, NULL,
+                                       "/A/B/C", "ozymandias",
+                                       svn_authz_write | svn_authz_recursive,
+                                       &allowed, subpool));
+  SVN_TEST_ASSERT(allowed);
+
+  svn_pool_destroy(subpool);
+
+  return SVN_NO_ERROR;
+}
+
 
 /* The test table.  */
 
@@ -2555,5 +2594,7 @@ struct svn_test_descriptor_t test_funcs[
                        "test svn_repos_get_logs ranges and limits"),
     SVN_TEST_OPTS_PASS(test_get_file_revs,
                        "test svn_repos_get_file_revsN"),
+    SVN_TEST_OPTS_PASS(issue_4060,
+                       "test issue 4060"),
     SVN_TEST_NULL
   };



Mime
View raw message