You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by pb...@apache.org on 2010/03/25 22:16:40 UTC

svn commit: r927593 [3/3] - in /subversion/branches/1.6.x-issue3390: ./ contrib/cgi/ contrib/client-side/emacs/ contrib/hook-scripts/ contrib/server-side/ doc/user/ notes/ packages/windows-WiX/BuildSubversion/ packages/windows-innosetup/ subversion/bin...

Modified: subversion/branches/1.6.x-issue3390/subversion/libsvn_client/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3390/subversion/libsvn_client/mergeinfo.c?rev=927593&r1=927592&r2=927593&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3390/subversion/libsvn_client/mergeinfo.c (original)
+++ subversion/branches/1.6.x-issue3390/subversion/libsvn_client/mergeinfo.c Thu Mar 25 21:16:37 2010
@@ -304,15 +304,10 @@ svn_client__get_repos_mergeinfo(svn_ra_s
 {
   svn_error_t *err;
   svn_mergeinfo_t repos_mergeinfo;
-  const char *old_session_url;
   apr_array_header_t *rel_paths = apr_array_make(pool, 1, sizeof(rel_path));
 
   APR_ARRAY_PUSH(rel_paths, const char *) = rel_path;
 
-  /* Temporarily point the session at the root of the repository. */
-  SVN_ERR(svn_client__ensure_ra_session_url(&old_session_url, ra_session,
-                                            NULL, pool));
-
   /* Fetch the mergeinfo. */
   err = svn_ra_get_mergeinfo(ra_session, &repos_mergeinfo, rel_paths, rev,
                              inherit, FALSE, pool);
@@ -327,10 +322,6 @@ svn_client__get_repos_mergeinfo(svn_ra_s
         return err;
     }
 
-  /* If we reparented the session, put it back where our caller had it. */
-  if (old_session_url)
-    SVN_ERR(svn_ra_reparent(ra_session, old_session_url, pool));
-
   /* Grab only the mergeinfo provided for REL_PATH. */
   if (repos_mergeinfo)
     *target_mergeinfo = apr_hash_get(repos_mergeinfo, rel_path,
@@ -392,21 +383,28 @@ svn_client__get_wc_or_repos_mergeinfo(sv
                                                NULL, ctx, pool));
           if (apr_hash_get(props, target_wcpath, APR_HASH_KEY_STRING) == NULL)
             {
-              const char *repos_rel_path;
+              const char *session_url = NULL;
+              apr_pool_t *sesspool = NULL;
 
-              if (ra_session == NULL)
-                SVN_ERR(svn_client__open_ra_session_internal(&ra_session, url,
-                                                             NULL, NULL, NULL,
-                                                             FALSE, TRUE, ctx,
-                                                             pool));
-
-              SVN_ERR(svn_client__path_relative_to_root(&repos_rel_path, url,
-                                                        entry->repos, FALSE,
-                                                        ra_session, NULL,
-                                                        pool));
+              if (ra_session)
+                {
+                  SVN_ERR(svn_client__ensure_ra_session_url(&session_url,
+                                                            ra_session,
+                                                            url, pool));
+                }
+              else
+                {
+                  sesspool = svn_pool_create(pool);
+                  SVN_ERR(svn_client__open_ra_session_internal(&ra_session, url,
+                                                               NULL, NULL, NULL,
+                                                               FALSE, TRUE,
+                                                               ctx,
+                                                               sesspool));
+                }
+              
               SVN_ERR(svn_client__get_repos_mergeinfo(ra_session,
                                                       &repos_mergeinfo,
-                                                      repos_rel_path,
+                                                      "",
                                                       target_rev,
                                                       inherit,
                                                       TRUE,
@@ -416,6 +414,18 @@ svn_client__get_wc_or_repos_mergeinfo(sv
                   *target_mergeinfo = repos_mergeinfo;
                   *indirect = TRUE;
                 }
+
+              /* If we created an RA_SESSION above, destroy it.
+                 Otherwise, if reparented an existing session, point
+                 it back where it was when we were called. */
+              if (sesspool)
+                {
+                  svn_pool_destroy(sesspool);
+                }
+              else if (session_url)
+                {
+                  SVN_ERR(svn_ra_reparent(ra_session, session_url, pool));
+                }
             }
         }
     }

Modified: subversion/branches/1.6.x-issue3390/subversion/libsvn_client/mergeinfo.h
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3390/subversion/libsvn_client/mergeinfo.h?rev=927593&r1=927592&r2=927593&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3390/subversion/libsvn_client/mergeinfo.h (original)
+++ subversion/branches/1.6.x-issue3390/subversion/libsvn_client/mergeinfo.h Thu Mar 25 21:16:37 2010
@@ -52,7 +52,7 @@ typedef struct svn_client__merge_path_t
      svn_sort_compare_ranges(), but rather are sorted such that the ranges
      with the youngest start revisions come first.  In both the forward and
      reverse merge cases the ranges should never overlap.  This rangelist
-     may be NULL or empty. */
+     may be empty but should never be NULL. */
   apr_array_header_t *remaining_ranges;
 
   svn_mergeinfo_t pre_merge_mergeinfo;  /* Mergeinfo on PATH prior to a
@@ -103,11 +103,9 @@ svn_client__get_wc_mergeinfo(svn_mergein
                              svn_client_ctx_t *ctx,
                              apr_pool_t *pool);
 
-/* Obtain any mergeinfo for the root-relative repository filesystem path
-   REL_PATH from the repository, and set it in *TARGET_MERGEINFO.
-   RA_SESSION should be an open RA session pointing at the URL that REL_PATH
-   is relative to, or NULL, in which case this function will open its own
-   temporary session.
+/* Obtain any mergeinfo for repository filesystem path REL_PATH
+   (relative to RA_SESSION's session URL) from the repository, and set
+   it in *TARGET_MERGEINFO.
 
    INHERIT indicates whether explicit, explicit or inherited, or only
    inherited mergeinfo for REL_PATH is obtained.
@@ -133,18 +131,18 @@ svn_client__get_repos_mergeinfo(svn_ra_s
    target has no info of its own.
 
    If no mergeinfo can be obtained from the WC or REPOS_ONLY is TRUE,
-   get it from the repository.  RA_SESSION should be an open RA session
-   pointing at ENTRY->URL, or NULL, in which case this function will open
-   its own temporary session.
+   get it from the repository.  RA_SESSION should be an open RA
+   session pointing at ENTRY->URL, or NULL, in which case this
+   function will open its own temporary session.
 
    (opening a new RA session if RA_SESSION
    is NULL).  Store any mergeinfo obtained for TARGET_WCPATH -- which
    is reflected by ENTRY -- in *TARGET_MERGEINFO, if no mergeinfo is
    found *TARGET_MERGEINFO is NULL.
 
-   Like svn_client__get_wc_mergeinfo, this function considers no inherited
-   mergeinfo to be found in the WC when trying to crawl into a parent path
-   with a different working revision.
+   Like svn_client__get_wc_mergeinfo(), this function considers no
+   inherited mergeinfo to be found in the WC when trying to crawl into
+   a parent path with a different working revision.
 
    INHERIT indicates whether explicit, explicit or inherited, or only
    inherited mergeinfo for TARGET_WCPATH is retrieved.

Modified: subversion/branches/1.6.x-issue3390/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3390/subversion/libsvn_fs_fs/fs_fs.c?rev=927593&r1=927592&r2=927593&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3390/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/branches/1.6.x-issue3390/subversion/libsvn_fs_fs/fs_fs.c Thu Mar 25 21:16:37 2010
@@ -1419,6 +1419,9 @@ svn_fs_fs__hotcopy(const char *src_path,
   /* Copy the uuid. */
   SVN_ERR(svn_io_dir_file_copy(src_path, dst_path, PATH_UUID, pool));
 
+  /* Copy the config. */
+  SVN_ERR(svn_io_dir_file_copy(src_path, dst_path, PATH_CONFIG, pool));
+
   /* Copy the min unpacked rev, and read its value. */
   if (format >= SVN_FS_FS__MIN_PACKED_FORMAT)
     {

Modified: subversion/branches/1.6.x-issue3390/subversion/libsvn_ra_serf/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3390/subversion/libsvn_ra_serf/commit.c?rev=927593&r1=927592&r2=927593&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3390/subversion/libsvn_ra_serf/commit.c (original)
+++ subversion/branches/1.6.x-issue3390/subversion/libsvn_ra_serf/commit.c Thu Mar 25 21:16:37 2010
@@ -82,8 +82,8 @@ typedef struct {
   /* The checked-in root to base CHECKOUTs from */
   const char *checked_in_url;
 
-  /* The root baseline collection */
-  const char *baseline_url;
+  /* vcc url */
+  const char *vcc_url;  
 
   /* Deleted files - so we can detect delete+add (replace) ops. */
   apr_hash_t *deleted_entries;
@@ -248,6 +248,7 @@ create_checkout_body(void *baton,
 
   svn_ra_serf__add_close_tag_buckets(body_bkt, alloc, "D:href");
   svn_ra_serf__add_close_tag_buckets(body_bkt, alloc, "D:activity-set");
+  svn_ra_serf__add_tag_buckets(body_bkt, "D:apply-to-version", NULL, alloc);
   svn_ra_serf__add_close_tag_buckets(body_bkt, alloc, "D:checkout");
 
   return body_bkt;
@@ -376,7 +377,7 @@ checkout_dir(dir_context_t *dir)
    */
   if (!dir->parent_dir && !dir->commit->baseline)
     {
-      checkout_ctx->checkout_url = dir->commit->baseline_url;
+      checkout_ctx->checkout_url = dir->commit->vcc_url;
       dir->commit->baseline = checkout_ctx;
     }
   else
@@ -986,14 +987,11 @@ open_root(void *edit_baton,
 {
   commit_context_t *ctx = edit_baton;
   svn_ra_serf__options_context_t *opt_ctx;
-  svn_ra_serf__propfind_context_t *propfind_ctx;
   svn_ra_serf__handler_t *handler;
   svn_ra_serf__simple_request_context_t *mkact_ctx;
   proppatch_context_t *proppatch_ctx;
   dir_context_t *dir;
   const char *activity_str;
-  const char *vcc_url;
-  apr_hash_t *props;
   apr_hash_index_t *hi;
   svn_error_t *err;
 
@@ -1056,31 +1054,11 @@ open_root(void *edit_baton,
                                ctx->session->repos_url.hostinfo);
     }
 
-  SVN_ERR(svn_ra_serf__discover_root(&vcc_url, NULL,
+  SVN_ERR(svn_ra_serf__discover_root(&(ctx->vcc_url), NULL,
                                      ctx->session, ctx->conn,
                                      ctx->session->repos_url.path,
                                      ctx->pool));
 
-  /* Now go fetch our VCC and baseline so we can do a CHECKOUT. */
-  props = apr_hash_make(ctx->pool);
-  propfind_ctx = NULL;
-  svn_ra_serf__deliver_props(&propfind_ctx, props, ctx->session,
-                             ctx->conn, vcc_url, SVN_INVALID_REVNUM, "0",
-                             checked_in_props, FALSE, NULL, ctx->pool);
-
-  SVN_ERR(svn_ra_serf__wait_for_props(propfind_ctx, ctx->session, ctx->pool));
-
-  ctx->baseline_url = svn_ra_serf__get_ver_prop(props, vcc_url,
-                                                SVN_INVALID_REVNUM,
-                                                "DAV:", "checked-in");
-
-  if (!ctx->baseline_url)
-    {
-      return svn_error_create(SVN_ERR_RA_DAV_OPTIONS_REQ_FAILED, NULL,
-                              _("The OPTIONS response did not include the "
-                                "requested checked-in value"));
-    }
-
   dir = apr_pcalloc(dir_pool, sizeof(*dir));
 
   dir->pool = dir_pool;

Modified: subversion/branches/1.6.x-issue3390/subversion/libsvn_ra_svn/client.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3390/subversion/libsvn_ra_svn/client.c?rev=927593&r1=927592&r2=927593&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3390/subversion/libsvn_ra_svn/client.c (original)
+++ subversion/branches/1.6.x-issue3390/subversion/libsvn_ra_svn/client.c Thu Mar 25 21:16:37 2010
@@ -457,6 +457,7 @@ static svn_error_t *make_tunnel(const ch
   apr_status_t status;
   apr_proc_t *proc;
   apr_procattr_t *attr;
+  svn_error_t *err;
 
   status = apr_procattr_create(&attr, pool);
   if (status == APR_SUCCESS)
@@ -510,7 +511,14 @@ static svn_error_t *make_tunnel(const ch
 
   /* Guard against dotfile output to stdout on the server. */
   *conn = svn_ra_svn_create_conn(NULL, proc->out, proc->in, pool);
-  SVN_ERR(svn_ra_svn_skip_leading_garbage(*conn, pool));
+  err = svn_ra_svn_skip_leading_garbage(*conn, pool);
+  if (err)
+    return svn_error_quick_wrap(
+             err,
+             _("To better debug SSH connection problems, remove the -q "
+               "option from 'ssh' in the [tunnels] section of your "
+               "Subversion configuration file."));
+
   return SVN_NO_ERROR;
 }
 

Modified: subversion/branches/1.6.x-issue3390/subversion/libsvn_repos/dump.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3390/subversion/libsvn_repos/dump.c?rev=927593&r1=927592&r2=927593&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3390/subversion/libsvn_repos/dump.c (original)
+++ subversion/branches/1.6.x-issue3390/subversion/libsvn_repos/dump.c Thu Mar 25 21:16:37 2010
@@ -1213,6 +1213,7 @@ svn_repos_verify_fs(svn_repos_t *repos,
       const svn_delta_editor_t *cancel_editor;
       void *cancel_edit_baton;
       svn_fs_root_t *to_root;
+      apr_hash_t *props;
 
       svn_pool_clear(iterpool);
 
@@ -1234,6 +1235,7 @@ svn_repos_verify_fs(svn_repos_t *repos,
       SVN_ERR(svn_repos_replay2(to_root, "", SVN_INVALID_REVNUM, FALSE,
                                 cancel_editor, cancel_edit_baton,
                                 NULL, NULL, iterpool));
+      SVN_ERR(svn_fs_revision_proplist(&props, fs, rev, iterpool));
       SVN_ERR(svn_stream_printf(feedback_stream, iterpool,
                                 _("* Verified revision %ld.\n"),
                                 rev));

Modified: subversion/branches/1.6.x-issue3390/subversion/libsvn_repos/repos.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3390/subversion/libsvn_repos/repos.c?rev=927593&r1=927592&r2=927593&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3390/subversion/libsvn_repos/repos.c (original)
+++ subversion/branches/1.6.x-issue3390/subversion/libsvn_repos/repos.c Thu Mar 25 21:16:37 2010
@@ -267,8 +267,8 @@ create_locks(svn_repos_t *repos, apr_poo
 #define PREWRITTEN_HOOKS_TEXT                                                 \
   "# For more examples and pre-written hooks, see those in"                NL \
   "# the Subversion repository at"                                         NL \
-  "# http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and"        NL \
-  "# http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/"          NL
+  "# http://svn.apache.org/repos/asf/subversion/trunk/tools/hook-scripts/ and"        NL \
+  "# http://svn.apache.org/repos/asf/subversion/trunk/contrib/hook-scripts/"          NL
 
 
 static svn_error_t *

Modified: subversion/branches/1.6.x-issue3390/subversion/libsvn_subr/io.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3390/subversion/libsvn_subr/io.c?rev=927593&r1=927592&r2=927593&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3390/subversion/libsvn_subr/io.c (original)
+++ subversion/branches/1.6.x-issue3390/subversion/libsvn_subr/io.c Thu Mar 25 21:16:37 2010
@@ -1862,17 +1862,12 @@ svn_io_remove_dir(const char *path, apr_
 
  Similar problem has been observed on FreeBSD.
 
- See http://subversion.tigris.org/issues/show_bug.cgi?id=1896 for more
- discussion and an initial solution.
+ The workaround is to delete the files only _after_ the initial
+ directory scan.  A previous workaround involving rewinddir is
+ problematic on Win32 and some NFS clients, notably NetBSD.
 
- To work around the problem, we do a rewinddir after we delete all files
- and see if there's anything left. We repeat the steps untill there's
- nothing left to delete.
-
- This workaround causes issues on Windows where delete's are asynchronous,
- however, so we never rewind if we're on Windows (the delete says it is
- complete, we rewind, we see the same file and try to delete it again,
- we fail.
+ See http://subversion.tigris.org/issues/show_bug.cgi?id=1896 and
+ http://subversion.tigris.org/issues/show_bug.cgi?id=3501.
 */
 
 /* Neither windows nor unix allows us to delete a non-empty
@@ -1884,13 +1879,10 @@ svn_io_remove_dir2(const char *path, svn
                    svn_cancel_func_t cancel_func, void *cancel_baton,
                    apr_pool_t *pool)
 {
-  apr_status_t status;
-  apr_dir_t *this_dir;
-  apr_finfo_t this_entry;
+  svn_error_t *err;
   apr_pool_t *subpool;
-  apr_int32_t flags = APR_FINFO_TYPE | APR_FINFO_NAME;
-  const char *path_apr;
-  int need_rewind;
+  apr_hash_t *dirents;
+  apr_hash_index_t *ent;
 
   /* Check for pending cancellation request.
      If we need to bail out, do so early. */
@@ -1898,112 +1890,50 @@ svn_io_remove_dir2(const char *path, svn
   if (cancel_func)
     SVN_ERR((*cancel_func)(cancel_baton));
 
-  /* Convert path to native here and call apr_dir_open directly,
-     instead of just using svn_io_dir_open, because we're going to
-     need path_apr later anyway when we remove the dir itself. */
-
-  if (path[0] == '\0')
-    /* APR doesn't like "" directories; use "." instead. */
-    SVN_ERR(cstring_from_utf8(&path_apr, ".", pool));
-  else
-    SVN_ERR(cstring_from_utf8(&path_apr, path, pool));
+  subpool = svn_pool_create(pool);
 
-  status = apr_dir_open(&this_dir, path_apr, pool);
-  if (status)
+  err = svn_io_get_dirents2(&dirents, path, subpool);
+  if (err)
     {
       /* if the directory doesn't exist, our mission is accomplished */
-      if (ignore_enoent && APR_STATUS_IS_ENOENT(status))
-        return SVN_NO_ERROR;
-      else
-        return svn_error_wrap_apr(status,
-                                  _("Can't open directory '%s'"),
-                                  svn_path_local_style(path, pool));
+      if (ignore_enoent && APR_STATUS_IS_ENOENT(err->apr_err))
+	{
+	  svn_error_clear(err);
+	  return SVN_NO_ERROR;
+	}
+      return err;
     }
 
-  subpool = svn_pool_create(pool);
-
-  do
+  for (ent = apr_hash_first(subpool, dirents); ent; ent = apr_hash_next(ent))
     {
-      need_rewind = FALSE;
-
-      for (status = apr_dir_read(&this_entry, flags, this_dir);
-           status == APR_SUCCESS;
-           status = apr_dir_read(&this_entry, flags, this_dir))
+      const void *key;
+      void *val;
+      char *fullpath;
+
+      apr_hash_this(ent, &key, NULL, &val);
+      fullpath = svn_path_join(path, key, subpool);
+      if (((svn_io_dirent_t *)val)->kind == svn_node_dir)
         {
-          svn_pool_clear(subpool);
-          if ((this_entry.filetype == APR_DIR)
-              && ((this_entry.name[0] == '.')
-                  && ((this_entry.name[1] == '\0')
-                      || ((this_entry.name[1] == '.')
-                          && (this_entry.name[2] == '\0')))))
-            {
-              continue;
-            }
-          else  /* something other than "." or "..", so proceed */
-            {
-              const char *fullpath, *entry_utf8;
-
-#ifndef WIN32
-              need_rewind = TRUE;
-#endif
-
-              SVN_ERR(entry_name_to_utf8(&entry_utf8, this_entry.name,
-                                         path_apr, subpool));
-
-              fullpath = svn_path_join(path, entry_utf8, subpool);
-
-              if (this_entry.filetype == APR_DIR)
-                {
-                  /* Don't check for cancellation, the callee
-                     will immediately do so */
-                  SVN_ERR(svn_io_remove_dir2(fullpath, FALSE,
-                                             cancel_func, cancel_baton,
-                                             subpool));
-                }
-              else
-                {
-                  svn_error_t *err;
-
-                  if (cancel_func)
-                    SVN_ERR((*cancel_func)(cancel_baton));
-
-                  err = svn_io_remove_file(fullpath, subpool);
-                  if (err)
-                    return svn_error_createf
-                      (err->apr_err, err, _("Can't remove '%s'"),
-                       svn_path_local_style(fullpath, subpool));
-                }
-            }
+          /* Don't check for cancellation, the callee will immediately do so */
+          SVN_ERR(svn_io_remove_dir2(fullpath, FALSE, cancel_func,
+                                     cancel_baton, subpool));
         }
-
-      if (need_rewind)
+      else
         {
-          status = apr_dir_rewind(this_dir);
-          if (status)
-            return svn_error_wrap_apr(status, _("Can't rewind directory '%s'"),
-                                      svn_path_local_style (path, pool));
+          if (cancel_func)
+            SVN_ERR((*cancel_func)(cancel_baton));
+
+          err = svn_io_remove_file(fullpath, subpool);
+          if (err)
+            return svn_error_createf
+              (err->apr_err, err, _("Can't remove '%s'"),
+               svn_path_local_style(fullpath, subpool));
         }
     }
-  while (need_rewind);
 
   svn_pool_destroy(subpool);
 
-  if (!APR_STATUS_IS_ENOENT(status))
-    return svn_error_wrap_apr(status, _("Can't read directory '%s'"),
-                              svn_path_local_style(path, pool));
-
-  status = apr_dir_close(this_dir);
-  if (status)
-    return svn_error_wrap_apr(status, _("Error closing directory '%s'"),
-                              svn_path_local_style(path, pool));
-
-  status = apr_dir_remove(path_apr, pool);
-  WIN32_RETRY_LOOP(status, apr_dir_remove(path_apr, pool));
-  if (status)
-    return svn_error_wrap_apr(status, _("Can't remove '%s'"),
-                              svn_path_local_style(path, pool));
-
-  return APR_SUCCESS;
+  return svn_io_dir_remove_nonrecursive(path, pool);
 }
 
 svn_error_t *
@@ -2976,17 +2906,16 @@ svn_io_file_rename(const char *from_path
   status = apr_file_rename(from_path_apr, to_path_apr, pool);
 
 #ifdef WIN32
-  if (status)
+  if (APR_STATUS_IS_EACCES(status))
     {
       /* Set the destination file writable because Windows will not
-         allow us to rename over files that are read-only. */
+         allow us to rename when to_path is read-only, but will
+         allow renaming when from_path is read only. */
       SVN_ERR(svn_io_set_file_read_write(to_path, TRUE, pool));
 
       status = apr_file_rename(from_path_apr, to_path_apr, pool);
-
-      WIN32_RETRY_LOOP(status,
-                       apr_file_rename(from_path_apr, to_path_apr, pool));
     }
+  WIN32_RETRY_LOOP(status, apr_file_rename(from_path_apr, to_path_apr, pool));
 #endif /* WIN32 */
 
   if (status)

Modified: subversion/branches/1.6.x-issue3390/subversion/libsvn_subr/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3390/subversion/libsvn_subr/mergeinfo.c?rev=927593&r1=927592&r2=927593&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3390/subversion/libsvn_subr/mergeinfo.c (original)
+++ subversion/branches/1.6.x-issue3390/subversion/libsvn_subr/mergeinfo.c Thu Mar 25 21:16:37 2010
@@ -817,6 +817,24 @@ svn_rangelist_reverse(apr_array_header_t
   return SVN_NO_ERROR;
 }
 
+void
+svn_rangelist__set_inheritance(apr_array_header_t *rangelist,
+                               svn_boolean_t inheritable)
+{
+  if (rangelist)
+    {
+      int i;
+      svn_merge_range_t *range;
+
+      for (i = 0; i < rangelist->nelts; i++)
+        {
+          range = APR_ARRAY_IDX(rangelist, i, svn_merge_range_t *);
+          range->inheritable = inheritable;
+        }
+    }
+  return;
+}
+
 /* Either remove any overlapping ranges described by ERASER from
    WHITEBOARD (when DO_REMOVE is TRUE), or capture the overlap, and
    place the remaining or overlapping ranges in OUTPUT. */

Modified: subversion/branches/1.6.x-issue3390/subversion/libsvn_wc/props.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3390/subversion/libsvn_wc/props.c?rev=927593&r1=927592&r2=927593&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3390/subversion/libsvn_wc/props.c (original)
+++ subversion/branches/1.6.x-issue3390/subversion/libsvn_wc/props.c Thu Mar 25 21:16:37 2010
@@ -926,7 +926,7 @@ diff_mergeinfo_props(svn_mergeinfo_t *de
       SVN_ERR(svn_mergeinfo_parse(&from, from_prop_val->data, pool));
       SVN_ERR(svn_mergeinfo_parse(&to, to_prop_val->data, pool));
       SVN_ERR(svn_mergeinfo_diff(deleted, added, from, to,
-                                 FALSE, pool));
+                                 TRUE, pool));
     }
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/1.6.x-issue3390/subversion/libsvn_wc/questions.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3390/subversion/libsvn_wc/questions.c?rev=927593&r1=927592&r2=927593&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3390/subversion/libsvn_wc/questions.c (original)
+++ subversion/branches/1.6.x-issue3390/subversion/libsvn_wc/questions.c Thu Mar 25 21:16:37 2010
@@ -43,6 +43,7 @@
 #include "private/svn_wc_private.h"
 #include "private/svn_sqlite.h"
 
+#define SVN_WC_NG_CHECK_ENV_VAR "SVN_I_LOVE_CORRUPTED_WORKING_COPIES_SO_DISABLE_CHECK_FOR_WC_NG"
 
 static svn_error_t *
 is_inside_wc_ng(const char *abspath,
@@ -51,9 +52,16 @@ is_inside_wc_ng(const char *abspath,
                 apr_pool_t *pool)
 {
   svn_node_kind_t kind;
-  const char *wc_db_path = svn_path_join_many(pool, abspath, ".svn", "wc.db",
-                                              NULL);
+  const char *wc_db_path;
+  char *wc_ng_check_env_var;
 
+  wc_ng_check_env_var = getenv(SVN_WC_NG_CHECK_ENV_VAR);
+  if (wc_ng_check_env_var &&
+      apr_strnatcasecmp(wc_ng_check_env_var, "yes") == 0)
+    return SVN_NO_ERROR; /* Allow skipping for testing */
+
+  wc_db_path = svn_path_join_many(pool, abspath, SVN_WC_ADM_DIR_NAME,
+                                  "wc.db", NULL);
   SVN_ERR(svn_io_check_path(wc_db_path, &kind, pool));
 
   if (kind == svn_node_file)

Modified: subversion/branches/1.6.x-issue3390/subversion/libsvn_wc/status.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3390/subversion/libsvn_wc/status.c?rev=927593&r1=927592&r2=927593&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3390/subversion/libsvn_wc/status.c (original)
+++ subversion/branches/1.6.x-issue3390/subversion/libsvn_wc/status.c Thu Mar 25 21:16:37 2010
@@ -884,6 +884,7 @@ get_dir_status(struct edit_baton *eb,
       if (prop_val)
         {
           apr_array_header_t *ext_items;
+          apr_pool_t *hash_pool = apr_hash_pool_get(eb->externals);
           int i;
 
           if (eb->traversal_info)
@@ -916,8 +917,8 @@ get_dir_status(struct edit_baton *eb,
               item = APR_ARRAY_IDX(ext_items, i, svn_wc_external_item2_t *);
               apr_hash_set(eb->externals, svn_path_join(path,
                                                         item->target_dir,
-                                                        pool),
-                           APR_HASH_KEY_STRING, item);
+                                                        hash_pool),
+                           APR_HASH_KEY_STRING, "");
             }
         }
     }

Modified: subversion/branches/1.6.x-issue3390/subversion/libsvn_wc/wc_db.h
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3390/subversion/libsvn_wc/wc_db.h?rev=927593&r1=927592&r2=927593&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3390/subversion/libsvn_wc/wc_db.h (original)
+++ subversion/branches/1.6.x-issue3390/subversion/libsvn_wc/wc_db.h Thu Mar 25 21:16:37 2010
@@ -238,7 +238,7 @@ svn_wc__db_close(svn_wc__db_t *db,
  * Different kind of trees
  *
  * The design doc mentions three different kinds of trees, BASE, WORKING and
- * ACTUAL: http://svn.collab.net/repos/svn/trunk/notes/wc-ng-design
+ * ACTUAL: http://svn.apache.org/repos/asf/subversion/trunk/notes/wc-ng-design
  * We have different APIs to handle each tree, enumerated below, along with
  * a blurb to explain what that tree represents.
  */

Modified: subversion/branches/1.6.x-issue3390/subversion/po/zh_CN.po
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3390/subversion/po/zh_CN.po?rev=927593&r1=927592&r2=927593&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3390/subversion/po/zh_CN.po [UTF-8] (original)
+++ subversion/branches/1.6.x-issue3390/subversion/po/zh_CN.po [UTF-8] Thu Mar 25 21:16:37 2010
@@ -3,6 +3,7 @@
 # This file is distributed under the same license as the subversion package.
 #
 # Update to new pot:
+#    ../../tools/po/po-update.sh zh_CN
 #    msgmerge --update zh_CN.po subversion.pot
 #
 # Check translation:
@@ -37,8 +38,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: subversion 1.6\n"
 "Report-Msgid-Bugs-To: dev@subversion.tigris.org\n"
-"POT-Creation-Date: 2009-12-07 10:00+0800\n"
-"PO-Revision-Date: 2009-12-07 10:04+0800\n"
+"POT-Creation-Date: 2010-03-19 11:45+0800\n"
+"PO-Revision-Date: 2010-03-19 11:45+0800\n"
 "Last-Translator: Subversion Developers <de...@subversion.tigris.org>\n"
 "Language-Team: Simplified Chinese <de...@subversion.tigris.org>\n"
 "MIME-Version: 1.0\n"
@@ -2997,9 +2998,6 @@ msgstr "OPTIONS 响应中没有包含请
 msgid "%s of '%s': %d %s (%s://%s)"
 msgstr "%s 于 '%s': %d %s (%s://%s)"
 
-msgid "The OPTIONS response did not include the requested checked-in value"
-msgstr "OPTIONS 响应中没有包含请求的 checked-in 值。"
-
 msgid ""
 "The OPTIONS response did not include the requested baseline-collection value"
 msgstr "OPTIONS 响应中没有包含请求的 baseline-collection 值。"
@@ -3023,6 +3021,9 @@ msgstr "版本库的 URL 非法"
 msgid "Unlock request failed: %d %s"
 msgstr "解锁请求失败: %d %s"
 
+msgid "The OPTIONS response did not include the requested checked-in value"
+msgstr "OPTIONS 响应中没有包含请求的 checked-in 值。"
+
 msgid "The OPTIONS response did not include the requested version-name value"
 msgstr "OPTIONS 响应中没有包含请求的 version-name 值。"
 
@@ -3116,6 +3117,13 @@ msgstr "子进程错误: %s"
 msgid "Can't create tunnel"
 msgstr "无法创建隧道"
 
+msgid ""
+"To better debug SSH connection problems, remove the -q option from 'ssh' in "
+"the [tunnels] section of your Subversion configuration file."
+msgstr ""
+"为了更好的诊断 SSH 连接问题,请从你的 Subversion 配置文件中,[tunnels] 节,删"
+"除 ssh 命令行参数 -q 。"
+
 #, c-format
 msgid "Illegal svn repository URL '%s'"
 msgstr "非法的svn版本库URL“%s”"
@@ -4001,18 +4009,10 @@ msgid "Can't remove file '%s'"
 msgstr "不能移动文件“%s”"
 
 #, c-format
-msgid "Can't open directory '%s'"
-msgstr "无法打开目录“%s”"
-
-#, c-format
 msgid "Can't remove '%s'"
 msgstr "无法删除“%s”"
 
 #, c-format
-msgid "Can't rewind directory '%s'"
-msgstr "无法重绕目录“%s”"
-
-#, c-format
 msgid "Can't create process '%s' attributes"
 msgstr "无法创建进程“%s”的属性"
 
@@ -4154,6 +4154,10 @@ msgid "Can't hide directory '%s'"
 msgstr "无法隐藏目录 “%s”"
 
 #, c-format
+msgid "Can't open directory '%s'"
+msgstr "无法打开目录“%s”"
+
+#, c-format
 msgid "Can't remove directory '%s'"
 msgstr "无法删除目录 “%s”"
 

Modified: subversion/branches/1.6.x-issue3390/subversion/svnlook/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3390/subversion/svnlook/main.c?rev=927593&r1=927592&r2=927593&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3390/subversion/svnlook/main.c (original)
+++ subversion/branches/1.6.x-issue3390/subversion/svnlook/main.c Thu Mar 25 21:16:37 2010
@@ -1613,11 +1613,16 @@ do_plist(svnlook_ctxt_t *c,
       SVN_ERR(verify_path(&kind, root, path, pool));
       SVN_ERR(svn_fs_node_proplist(&props, root, path, pool));
     }
-  else
+  else if (c->is_revision)
     {
       SVN_ERR(svn_fs_revision_proplist(&props, c->fs, c->rev_id, pool));
       revprop = TRUE;
     }
+  else
+    {
+      SVN_ERR(svn_fs_txn_proplist(&props, c->txn, pool));
+      revprop = TRUE;
+    }
 
   if (xml)
     {
@@ -1631,8 +1636,16 @@ do_plist(svnlook_ctxt_t *c,
       if (revprop)
         {
           /* "<revprops ...>" */
-          svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "revprops",
-                                "rev", revstr, NULL);
+          if (c->is_revision)
+            {
+              svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "revprops",
+                                    "rev", revstr, NULL);
+            }
+          else
+            {
+              svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "revprops",
+                                    "txn", c->txn_name, NULL);
+            }
         }
       else
         {

Modified: subversion/branches/1.6.x-issue3390/subversion/svnserve/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3390/subversion/svnserve/main.c?rev=927593&r1=927592&r2=927593&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3390/subversion/svnserve/main.c (original)
+++ subversion/branches/1.6.x-issue3390/subversion/svnserve/main.c Thu Mar 25 21:16:37 2010
@@ -772,6 +772,20 @@ int main(int argc, const char *argv[])
           return svn_cmdline_handle_exit_error(err, pool, "svnserve: ");
         }
 
+      /* Enable TCP keep-alives on the socket so we time out when
+       * the connection breaks due to network-layer problems.
+       * If the peer has dropped the connection due to a network partition
+       * or a crash, or if the peer no longer considers the connection
+       * valid because we are behind a NAT and our public IP has changed,
+       * it will respond to the keep-alive probe with a RST instead of an
+       * acknowledgment segment, which will cause svn to abort the session
+       * even while it is currently blocked waiting for data from the peer. */
+      status = apr_socket_opt_set(usock, APR_SO_KEEPALIVE, 1);
+      if (status)
+        {
+          /* It's not a fatal error if we cannot enable keep-alives. */
+        }
+
       conn = svn_ra_svn_create_conn(usock, NULL, NULL, connection_pool);
 
       if (run_mode == run_mode_listen_once)

Modified: subversion/branches/1.6.x-issue3390/subversion/tests/cmdline/externals_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3390/subversion/tests/cmdline/externals_tests.py?rev=927593&r1=927592&r2=927593&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3390/subversion/tests/cmdline/externals_tests.py (original)
+++ subversion/branches/1.6.x-issue3390/subversion/tests/cmdline/externals_tests.py Thu Mar 25 21:16:37 2010
@@ -1245,6 +1245,105 @@ def switch_relative_external(sbox):
     ]
   svntest.actions.run_and_verify_info(expected_infos, D_path, ext_path)
 
+#----------------------------------------------------------------------
+
+# Issue #3552
+def wc_repos_file_externals(sbox):
+  "tag directory with file externals from wc to url"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+  repo_url = sbox.repo_url
+
+  # Add a file A/theta.
+  theta_path = os.path.join(wc_dir, 'A', 'theta')
+  svntest.main.file_write(theta_path, 'theta', 'w')
+  svntest.main.run_svn(None, 'add', theta_path)
+
+  # Created expected output tree for 'svn ci'
+  expected_output = svntest.wc.State(wc_dir, {
+    'A/theta' : Item(verb='Adding'),
+    })
+
+  # Create expected status tree
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+  expected_status.add({
+    'A/theta' : Item(status='  ', wc_rev=2),
+    })
+
+  # Commit the new file, creating revision 2.
+  svntest.actions.run_and_verify_commit(wc_dir, expected_output,
+                                        expected_status, None, wc_dir)
+
+
+  # Create a file external on the file A/theta
+  C = os.path.join(wc_dir, 'A', 'C')
+  external = os.path.join(C, 'theta')
+  externals_prop = "^/A/theta theta\n"
+
+  # Set and commit the property.
+  change_external(C, externals_prop)
+
+
+  # Now, /A/C/theta is designated as a file external pointing to
+  # the file /A/theta, but the external file is not there yet.
+  # Try to actually insert the external file via a verified update:
+  expected_output = svntest.wc.State(wc_dir, {
+      'A/C/theta'      : Item(status='E '),
+    })
+
+  expected_disk = svntest.main.greek_state.copy()
+  expected_disk.add({
+    'A/theta'      : Item('theta'),
+    'A/C'          : Item(props={'svn:externals':externals_prop}),
+    'A/C/theta'    : Item('theta'),
+    })
+
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 3)
+  expected_status.add({
+    'A/theta'   : Item(status='  ', wc_rev=3),
+    })
+
+  svntest.actions.run_and_verify_update(wc_dir,
+                                        expected_output,
+                                        expected_disk,
+                                        expected_status,
+                                        None, None, None, None, None,
+                                        True)
+
+  # Copy A/C to a new tag in the repos
+  tag_url = repo_url + '/A/I'
+  svntest.main.run_svn(None, 'cp', C, tag_url, '-m', 'create tag')
+
+  # Try to actually insert the external file (A/I/theta) via a verified update:
+  expected_output = svntest.wc.State(wc_dir, {
+      'A/I'            : Item(status='A '),
+      'A/I/theta'      : Item(status='E '),
+    })
+
+  expected_disk = svntest.main.greek_state.copy()
+  expected_disk.add({
+    'A/theta'      : Item('theta'),
+    'A/C'          : Item(props={'svn:externals':externals_prop}),
+    'A/C/theta'    : Item('theta'),
+    'A/I'          : Item(props={'svn:externals':externals_prop}),
+    'A/I/theta'    : Item('theta'),
+    })
+
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 4)
+  expected_status.add({
+    'A/theta'   : Item(status='  ', wc_rev=4),
+    'A/I'       : Item(status='  ', wc_rev=4),
+    })
+
+  svntest.actions.run_and_verify_update(wc_dir,
+                                        expected_output,
+                                        expected_disk,
+                                        expected_status,
+                                        None, None, None, None, None,
+                                        True)
+
+
 ########################################################################
 # Run the tests
 
@@ -1270,6 +1369,7 @@ test_list = [ None,
               external_into_path_with_spaces,
               binary_file_externals,
               switch_relative_external,
+              wc_repos_file_externals,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/1.6.x-issue3390/subversion/tests/cmdline/log_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3390/subversion/tests/cmdline/log_tests.py?rev=927593&r1=927592&r2=927593&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3390/subversion/tests/cmdline/log_tests.py (original)
+++ subversion/branches/1.6.x-issue3390/subversion/tests/cmdline/log_tests.py Thu Mar 25 21:16:37 2010
@@ -1640,6 +1640,57 @@ def merge_sensitive_log_propmod_merge_in
   run_log_g_r8(A_COPY_path)
   run_log_g_r8(A_COPY_psi_path)
 
+#----------------------------------------------------------------------
+# Should be able to run 'svn log' against an uncommitted copy or move
+# destination.  See http://svn.haxx.se/dev/archive-2010-01/0492.shtml.
+def log_of_local_copy(sbox):
+  "svn log on an uncommitted copy"
+
+  guarantee_repos_and_wc(sbox)
+
+  C_path         = os.path.join(sbox.wc_dir, "A", "C")
+  C_moved_path   = os.path.join(sbox.wc_dir, "A", "C_MOVED")
+  psi_path       = os.path.join(sbox.wc_dir, "A", "D", "H", "psi")
+  psi_moved_path = os.path.join(sbox.wc_dir, "A", "D", "H", "psi_moved")
+
+  # Get the logs for a directory and a file.
+  exit_code, C_log_out, err = svntest.actions.run_and_verify_svn(
+    None, None, [], 'log', '-v', C_path)
+  exit_code, psi_log_out, err = svntest.actions.run_and_verify_svn(
+    None, None, [], 'log', '-v', psi_path)
+
+  # Move that directory and file.
+  svntest.actions.run_and_verify_svn(None, None, [], 'mv',
+                                     C_path, C_moved_path)
+  svntest.actions.run_and_verify_svn(None, None, [], 'mv',
+                                     psi_path, psi_moved_path)
+  
+  # Get the logs for the move destinations.
+  #
+  # This was failing with:
+  #
+  #   svn log -v log_tests-29\A\C_MOVED
+  #    ..\..\..\subversion\svn\log-cmd.c:600: (apr_err=160013)
+  #    ..\..\..\subversion\libsvn_client\log.c:627: (apr_err=160013)
+  #    ..\..\..\subversion\libsvn_repos\log.c:1449: (apr_err=160013)
+  #    ..\..\..\subversion\libsvn_repos\log.c:1092: (apr_err=160013)
+  #    ..\..\..\subversion\libsvn_fs_fs\tree.c:2818: (apr_err=160013)
+  #    svn: File not found: revision 9, path '/A/C_MOVED'
+  #
+  exit_code, C_moved_log_out, err = svntest.actions.run_and_verify_svn(
+    None, None, [], 'log', '-v', C_moved_path)
+  exit_code, psi_moved_log_out, err = svntest.actions.run_and_verify_svn(
+    None, None, [], 'log', '-v', psi_moved_path)
+
+  # The logs of the move source and destinations should be the same.
+  if C_log_out != C_moved_log_out:
+    raise svntest.Failure("Log on uncommitted move destination '%s' " \
+                          "differs from that on move source '%s'"
+                          % (C_moved_path, C_path))
+  if psi_log_out != psi_moved_log_out:
+    raise svntest.Failure("Log on uncommitted move destination '%s' " \
+                          "differs from that on move source '%s'"
+                          % (psi_moved_path, psi_path))
 
 ########################################################################
 # Run the tests
@@ -1681,6 +1732,7 @@ test_list = [ None,
                          server_has_mergeinfo),
               SkipUnless(merge_sensitive_log_propmod_merge_inheriting_path,
                          server_has_mergeinfo),
+              log_of_local_copy,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/1.6.x-issue3390/subversion/tests/cmdline/merge_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3390/subversion/tests/cmdline/merge_tests.py?rev=927593&r1=927592&r2=927593&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3390/subversion/tests/cmdline/merge_tests.py (original)
+++ subversion/branches/1.6.x-issue3390/subversion/tests/cmdline/merge_tests.py Thu Mar 25 21:16:37 2010
@@ -14646,8 +14646,8 @@ def merge_range_prior_to_rename_source_e
   "merge prior to rename src existence still dels src"
 
   # Replicate a merge bug found while synching up a feature branch on the
-  # Subversion repository with trunk.  See r34047 of
-  # http://svn.collab.net/repos/svn/branches/ignore-mergeinfo, in which
+  # Subversion repository with trunk.  See r874121 of
+  # http://svn.apache.org/repos/asf/subversion/branches/ignore-mergeinfo, in which
   # a move was merged to the target, but the delete half of the move
   # didn't occur.
 
@@ -15248,10 +15248,19 @@ def reintegrate_with_subtree_mergeinfo(s
                                        None, None, None, None,
                                        None, 1, 1, "--reintegrate")
 
-def dont_merge_gaps_in_history(sbox):
-  "mergeinfo aware merges ignore natural history gaps"
-
-  ## See http://svn.haxx.se/dev/archive-2008-11/0618.shtml ##
+def set_up_natural_history_gap(sbox):
+  '''Starting with standard greek tree, do the following:
+    r2 - A/D/H/psi
+    r3 - A/D/G/rho
+    r4 - A/B/E/beta
+    r5 - A/D/H/omega
+    r6 - Delete A
+    r7 - "Resurrect" A, by copying A@2 to A
+    r8 - Copy A to A_COPY
+    r9 - Text mod to A/D/gamma
+  Lastly it updates the WC to r9.
+  All text mods set file contents to "New content".
+  Return (expected_disk, expected_status).'''
 
   # r1: Create a standard greek tree.
   sbox.build()
@@ -15310,8 +15319,26 @@ def dont_merge_gaps_in_history(sbox):
   svntest.main.file_write(gamma_path, "New content")
   expected_output = wc.State(wc_dir, {'A/D/gamma' : Item(verb='Sending')})
   wc_status.tweak('A/D/gamma', wc_rev=9)
+
+  # Update the WC to a uniform revision.  
   svntest.actions.run_and_verify_commit(wc_dir, expected_output,
                                         wc_status, None, wc_dir)
+  svntest.actions.run_and_verify_svn(None, ["At revision 9.\n"], [],
+                                     'up', wc_dir)
+  return wc_disk, wc_status  
+
+def dont_merge_gaps_in_history(sbox):
+  "mergeinfo aware merges ignore natural history gaps"
+
+  ## See http://svn.haxx.se/dev/archive-2008-11/0618.shtml ##
+
+  wc_dir = sbox.wc_dir
+
+  # Create a branch with gaps in its natural history.
+  set_up_natural_history_gap(sbox)
+
+  # Some paths we'll care about.
+  A_COPY_path = os.path.join(wc_dir, "A_COPY")
 
   # Now merge all available changes from 'A' to 'A_COPY'.  The only
   # available revisions are r8 and r9.  Only r9 effects the source/target
@@ -15350,7 +15377,7 @@ def dont_merge_gaps_in_history(sbox):
     'D/H/psi'   : Item(status='  '),
     'D/H/omega' : Item(status='  '),
     })
-  expected_status.tweak(wc_rev=8)
+  expected_status.tweak(wc_rev=9)
   expected_disk = wc.State('', {
     ''          : Item(props={SVN_PROP_MERGEINFO : '/A:8-9'}),
     'B'         : Item(),
@@ -15383,6 +15410,131 @@ def dont_merge_gaps_in_history(sbox):
                                        None, None, None, None,
                                        None, 1)
 
+# Test for issue #3432 'Merge can record mergeinfo from natural history
+# gaps'.  See http://subversion.tigris.org/issues/show_bug.cgi?id=3432
+def handle_gaps_in_implicit_mergeinfo(sbox):
+  "correctly consider natural history gaps"
+
+  wc_dir = sbox.wc_dir
+
+  # Create a branch with gaps in its natural history.
+  #
+  # r1--------r2--------r3--------r4--------r5--------r6
+  # Add 'A'   edit      edit      edit      edit      Delete A
+  #           psi       rho       beta      omega
+  #           |
+  #           V
+  #           r7--------r9----------------->
+  #           Rez 'A'   edit
+  #           |         gamma
+  #           |
+  #           V
+  #           r8--------------------------->
+  #           Copy 'A@7' to
+  #           'A_COPY'
+  #
+  expected_disk, expected_status = set_up_natural_history_gap(sbox)
+
+  # Some paths we'll care about.
+  A_COPY_path = os.path.join(wc_dir, "A_COPY")
+  
+  # Merge r4 to 'A_COPY' from A@4, which is *not* part of A_COPY's history.
+  expected_output = wc.State(A_COPY_path, {
+    'B/E/beta' : Item(status='U '),
+    })
+  expected_status = wc.State(A_COPY_path, {
+    ''          : Item(status=' M'),
+    'B'         : Item(status='  '),
+    'mu'        : Item(status='  '),
+    'B/E'       : Item(status='  '),
+    'B/E/alpha' : Item(status='  '),
+    'B/E/beta'  : Item(status='M '),
+    'B/lambda'  : Item(status='  '),
+    'B/F'       : Item(status='  '),
+    'C'         : Item(status='  '),
+    'D'         : Item(status='  '),
+    'D/G'       : Item(status='  '),
+    'D/G/pi'    : Item(status='  '),
+    'D/G/rho'   : Item(status='  '),
+    'D/G/tau'   : Item(status='  '),
+    'D/gamma'   : Item(status='  '),
+    'D/H'       : Item(status='  '),
+    'D/H/chi'   : Item(status='  '),
+    'D/H/psi'   : Item(status='  '),
+    'D/H/omega' : Item(status='  '),
+    })
+  expected_status.tweak(wc_rev=9)
+  expected_disk = wc.State('', {
+    ''          : Item(props={SVN_PROP_MERGEINFO : '/A:4'}),
+    'B'         : Item(),
+    'mu'        : Item("This is the file 'mu'.\n"),
+    'B/E'       : Item(),
+    'B/E/alpha' : Item("This is the file 'alpha'.\n"),
+    'B/E/beta'  : Item("New content"), # From the merge of A@4
+    'B/lambda'  : Item("This is the file 'lambda'.\n"),
+    'B/F'       : Item(),
+    'C'         : Item(),
+    'D'         : Item(),
+    'D/G'       : Item(),
+    'D/G/pi'    : Item("This is the file 'pi'.\n"),
+    'D/G/rho'   : Item("This is the file 'rho'.\n"),
+    'D/G/tau'   : Item("This is the file 'tau'.\n"),
+    'D/gamma'   : Item("This is the file 'gamma'.\n"),
+    'D/H'       : Item(),
+    'D/H/chi'   : Item("This is the file 'chi'.\n"),
+    'D/H/psi'   : Item("New content"), # From A@2
+    'D/H/omega' : Item("This is the file 'omega'.\n"),
+    })
+  expected_skip = wc.State(A_COPY_path, { })
+  svntest.actions.run_and_verify_merge(A_COPY_path, 3, 4,
+                                       sbox.repo_url + \
+                                       '/A@4',
+                                       expected_output,
+                                       expected_disk,
+                                       expected_status,
+                                       expected_skip,
+                                       None, None, None, None,
+                                       None, 1)
+
+  # Now reverse merge -r9:2 from 'A@HEAD' to 'A_COPY'.  This should be
+  # a no-op since the only operative change made on 'A@HEAD' between r2:9
+  # is the text mod to 'A/D/gamma' made in r9, but since that was after
+  # 'A_COPY' was copied from 'A 'and that change was never merged, we don't
+  # try to reverse merge it.
+  #
+  # Also, the mergeinfo recorded by the previous merge, i.e. '/A:4', should
+  # *not* be removed!  A@4 is not on the same line of history as 'A@9'.
+  expected_output = wc.State(A_COPY_path, {})
+  svntest.actions.run_and_verify_merge(A_COPY_path, 9, 2,
+                                       sbox.repo_url + \
+                                       '/A',
+                                       expected_output,
+                                       expected_disk,
+                                       expected_status,
+                                       expected_skip,
+                                       None, None, None, None,
+                                       None, 1)  
+
+  # Now merge all available revisions from 'A' to 'A_COPY'.
+  # The mergeinfo '/A:4' on 'A_COPY' should have no impact on this merge
+  # since it refers to another line of history.  Since 'A_COPY' was copied
+  # from 'A@7' the only available revisions are r8 and r9.
+  expected_output = wc.State(A_COPY_path, {
+    'D/gamma' : Item(status='U '),
+    })
+  expected_status.tweak('D/gamma', status='M ')
+  expected_disk.tweak('D/gamma', contents='New content')
+  expected_disk.tweak('', props={SVN_PROP_MERGEINFO : '/A:4,8-9'})
+  svntest.actions.run_and_verify_merge(A_COPY_path, None, None,
+                                       sbox.repo_url + \
+                                       '/A',
+                                       expected_output,
+                                       expected_disk,
+                                       expected_status,
+                                       expected_skip,
+                                       None, None, None, None,
+                                       None, 1)
+
 #----------------------------------------------------------------------
 # Test for issue #3323 'Mergeinfo deleted by a merge should disappear'
 def mergeinfo_deleted_by_a_merge_should_disappear(sbox):
@@ -16121,6 +16273,129 @@ def merge_replace_causes_tree_conflict(s
 
   actions.run_and_verify_status(wc_dir, expected_status)
 
+# Test for a reintegrate bug which can occur when the merge source
+# has mergeinfo that explicitly describes common history with the reintegrate
+# target, see http://mail-archives.apache.org/mod_mbox/subversion-dev/
+# 200912.mbox/%3C6cfe18eb0912161438wfb5234bj118aacdff7ffb25f@mail.gmail.com%3E
+def reintegrate_with_self_referential_mergeinfo(sbox):
+  "source has target's history as explicit mergeinfo"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  # Make some changes under 'A' in r2-5.
+  wc_disk, wc_status = set_up_branch(sbox, nbr_of_branches=0)
+
+  # Some paths we'll care about
+  A_path       = os.path.join(wc_dir, "A")
+  A2_path      = os.path.join(wc_dir, "A2")
+  A2_B_path    = os.path.join(wc_dir, "A2", "B")
+  A2_1_path    = os.path.join(wc_dir, "A2.1")
+  A2_1_mu_path = os.path.join(wc_dir, "A2.1", "mu")
+  
+  # r6 Copy A to A2 and then manually set some self-referential mergeinfo on
+  # A2/B and A2.
+  svntest.actions.run_and_verify_svn(None, ["At revision 5.\n"], [],
+                                     'up', wc_dir)
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'copy', A_path, A2_path)
+  # /A:3 describes A2's natural history, a.k.a. it's implicit mergeinfo, so
+  # it is self-referential.  Same for /A/B:4 and A2/B.  Normally this is
+  # redundant but not harmful.
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'ps', 'svn:mergeinfo', '/A:3', A2_path)
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'ps', 'svn:mergeinfo', '/A/B:4', A2_B_path)
+  svntest.actions.run_and_verify_svn(
+    None, None, [], 'ci', '-m',
+    'copy A to A2 and set some self-referential mergeinfo on the latter.',
+    wc_dir)
+
+  # r7 Copy A2 to A2.1
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'copy', A2_path, A2_1_path)
+  svntest.actions.run_and_verify_svn(None, None, [], 'ci',
+                                     '-m', 'copy A2to A2.1.', wc_dir)
+
+  # r8 Make a change on A2.1/mu
+  svntest.main.file_write(A2_1_mu_path, 'New A2.1 stuff')
+  svntest.actions.run_and_verify_svn(None, None, [], 'ci',
+                                     '-m', 'Work done on the A2.1 branch.',
+                                     wc_dir)
+  
+  # Update to uniform revision and reintegrated A2.1 back to A2.
+  svntest.actions.run_and_verify_svn(None, ["At revision 8.\n"], [],
+                                     'up', wc_dir)
+
+  # Now merge all available revisions from A to A_COPY:
+  expected_output = wc.State(A2_path, {
+    'mu' : Item(status='U '),
+    })
+  expected_status = wc.State(A2_path, {
+    ''          : Item(status=' M'),
+    'B'         : Item(status=' M'),
+    'mu'        : Item(status='M '),
+    'B/E'       : Item(status='  '),
+    'B/E/alpha' : Item(status='  '),
+    'B/E/beta'  : Item(status='  '),
+    'B/lambda'  : Item(status='  '),
+    'B/F'       : Item(status='  '),
+    'C'         : Item(status='  '),
+    'D'         : Item(status='  '),
+    'D/G'       : Item(status='  '),
+    'D/G/pi'    : Item(status='  '),
+    'D/G/rho'   : Item(status='  '),
+    'D/G/tau'   : Item(status='  '),
+    'D/gamma'   : Item(status='  '),
+    'D/H'       : Item(status='  '),
+    'D/H/chi'   : Item(status='  '),
+    'D/H/psi'   : Item(status='  '),
+    'D/H/omega' : Item(status='  '),
+    })
+  expected_status.tweak(wc_rev=8)
+  expected_disk = wc.State('', {
+    ''          : Item(props={SVN_PROP_MERGEINFO : '/A:3\n/A2.1:7-8'}),
+    'B'         : Item(props={SVN_PROP_MERGEINFO : '/A/B:4\n/A2.1/B:7-8'}),
+    'mu'        : Item("New A2.1 stuff"),
+    'B/E'       : Item(),
+    'B/E/alpha' : Item("This is the file 'alpha'.\n"),
+    'B/E/beta'  : Item("New content"),
+    'B/lambda'  : Item("This is the file 'lambda'.\n"),
+    'B/F'       : Item(),
+    'C'         : Item(),
+    'D'         : Item(),
+    'D/G'       : Item(),
+    'D/G/pi'    : Item("This is the file 'pi'.\n"),
+    'D/G/rho'   : Item("New content"),
+    'D/G/tau'   : Item("This is the file 'tau'.\n"),
+    'D/gamma'   : Item("This is the file 'gamma'.\n"),
+    'D/H'       : Item(),
+    'D/H/chi'   : Item("This is the file 'chi'.\n"),
+    'D/H/psi'   : Item("New content"),
+    'D/H/omega' : Item("New content"),
+    })
+  expected_skip = wc.State(A2_path, { })
+  # Previously failed with this error:
+  #
+  #   svn merge ^/A2.1" A2 --reintegrate
+  #  ..\..\..\subversion\svn\merge-cmd.c:349: (apr_err=160013)
+  #  ..\..\..\subversion\libsvn_client\merge.c:9219: (apr_err=160013)
+  #  ..\..\..\subversion\libsvn_client\ra.c:728: (apr_err=160013)
+  #  ..\..\..\subversion\libsvn_client\mergeinfo.c:733: (apr_err=160013)
+  #  ..\..\..\subversion\libsvn_client\ra.c:526: (apr_err=160013)
+  #  ..\..\..\subversion\libsvn_repos\rev_hunt.c:908: (apr_err=160013)
+  #  ..\..\..\subversion\libsvn_repos\rev_hunt.c:607: (apr_err=160013)
+  #  ..\..\..\subversion\libsvn_fs_fs\tree.c:2886: (apr_err=160013)
+  #  ..\..\..\subversion\libsvn_fs_fs\tree.c:669: (apr_err=160013)
+  #  svn: File not found: revision 4, path '/A2'
+  svntest.actions.run_and_verify_merge(A2_path, None, None,
+                                       sbox.repo_url + '/A2.1',
+                                       expected_output,
+                                       expected_disk,
+                                       expected_status,
+                                       expected_skip,
+                                       None, None, None, None,
+                                       None, 1, 0, '--reintegrate')
 
 ########################################################################
 # Run the tests
@@ -16342,6 +16617,9 @@ test_list = [ None,
               # ra_serf causes duplicate notifications with this test:
               Skip(merge_replace_causes_tree_conflict,
                    svntest.main.is_ra_type_dav_serf),
+              SkipUnless(handle_gaps_in_implicit_mergeinfo,
+                         server_has_mergeinfo),
+              reintegrate_with_self_referential_mergeinfo,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/1.6.x-issue3390/subversion/tests/cmdline/svnadmin_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3390/subversion/tests/cmdline/svnadmin_tests.py?rev=927593&r1=927592&r2=927593&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3390/subversion/tests/cmdline/svnadmin_tests.py (original)
+++ subversion/branches/1.6.x-issue3390/subversion/tests/cmdline/svnadmin_tests.py Thu Mar 25 21:16:37 2010
@@ -917,6 +917,39 @@ def create_in_repo_subdir(sbox):
   # No SVNRepositoryCreateFailure raised?
   raise svntest.Failure
 
+def verify_with_invalid_revprops(sbox):
+  "svnadmin verify detects invalid revprops file"
+
+  repo_dir = sbox.repo_dir
+
+  svntest.main.safe_rmtree(repo_dir, 1)
+
+  # This should succeed
+  svntest.main.create_repos(repo_dir)
+
+  # Run a test verify
+  exit_code, output, errput = svntest.main.run_svnadmin("verify",
+                                                        sbox.repo_dir)
+
+  if svntest.verify.verify_outputs(
+    "Output of 'svnadmin verify' is unexpected.", None, errput, None,
+    ".*Verified revision 0*"):
+    raise svntest.Failure
+
+  # Empty the revprops file
+  rp_file = open(os.path.join(repo_dir, 'db', 'revprops', '0', '0'), 'w')
+
+  rp_file.write('')
+  rp_file.close()
+
+  exit_code, output, errput = svntest.main.run_svnadmin("verify",
+                                                        sbox.repo_dir)
+
+  if svntest.verify.verify_outputs(
+    "Output of 'svnadmin verify' is unexpected.", None, errput, None,
+    ".*Malformed file"):
+    raise svntest.Failure
+
 
 ########################################################################
 # Run the tests
@@ -943,6 +976,7 @@ test_list = [ None,
               SkipUnless(fsfs_recover_handle_missing_revs_or_revprops_file,
                          svntest.main.is_fs_type_fsfs),
               create_in_repo_subdir,
+              verify_with_invalid_revprops,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/1.6.x-issue3390/subversion/tests/cmdline/svnlook_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3390/subversion/tests/cmdline/svnlook_tests.py?rev=927593&r1=927592&r2=927593&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3390/subversion/tests/cmdline/svnlook_tests.py (original)
+++ subversion/branches/1.6.x-issue3390/subversion/tests/cmdline/svnlook_tests.py Thu Mar 25 21:16:37 2010
@@ -533,6 +533,96 @@ def diff_binary(sbox):
     raise svntest.Failure("No 'Binary files differ' indication in "
                           "'svnlook diff' output.")
 
+#----------------------------------------------------------------------
+def verify_logfile(logfilename, expected_data):
+  if os.path.exists(logfilename):
+    fp = open(logfilename)
+  else:
+    raise svntest.verify.SVNUnexpectedOutput("hook logfile %s not found"\
+                                             % logfilename)
+
+  actual_data = fp.readlines()
+  fp.close()
+  os.unlink(logfilename)
+  svntest.verify.compare_and_display_lines('wrong hook logfile content',
+                                           'STDOUT',
+                                           expected_data, actual_data)
+
+def test_txn_flag(sbox):
+  "test 'svnlook * -t'"
+
+  sbox.build()
+  repo_dir = sbox.repo_dir
+  wc_dir = sbox.wc_dir
+  logfilepath = os.path.join(repo_dir, 'hooks.log')
+
+  # List changed dirs and files in this transaction
+  hook_template = """import sys,os,subprocess
+svnlook_bin=%s
+
+fp = open(os.path.join(sys.argv[1], 'hooks.log'), 'wb')
+def output_command(fp, cmd, opt):
+  command = [svnlook_bin, cmd, '-t', sys.argv[2], sys.argv[1]] + opt
+  process = subprocess.Popen(command, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=False)
+  (output, errors) = process.communicate()
+  status = process.returncode
+  fp.write(output)
+  fp.write(errors)
+  return status
+
+for (svnlook_cmd, svnlook_opt) in %s:
+  output_command(fp, svnlook_cmd, svnlook_opt.split(' '))
+fp.close()"""
+  pre_commit_hook = svntest.main.get_pre_commit_hook_path(repo_dir)
+
+  # 1. svnlook 'changed' -t and 'dirs-changed' -t
+  hook_instance = hook_template % (repr(svntest.main.svnlook_binary),
+                                   repr([('changed', ''),
+                                         ('dirs-changed', '')]))
+  svntest.main.create_python_hook_script(pre_commit_hook,
+                                         hook_instance)
+
+  # Change files mu and rho
+  A_path = os.path.join(wc_dir, 'A')
+  mu_path = os.path.join(wc_dir, 'A', 'mu')
+  rho_path = os.path.join(wc_dir, 'A', 'D', 'G', 'rho')
+  svntest.main.file_append(mu_path, 'appended mu text')
+  svntest.main.file_append(rho_path, 'new appended text for rho')
+
+  # commit, and check the hook's logfile
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'ci', '-m', 'log msg', wc_dir)
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'up', wc_dir)
+
+  expected_data = [ 'U   A/D/G/rho\n', 'U   A/mu\n', 'A/\n', 'A/D/G/\n' ]
+  verify_logfile(logfilepath, expected_data)
+
+  # 2. svnlook 'propget' -t, 'proplist' -t
+  # 2. Change a dir and revision property
+  hook_instance = hook_template % (repr(svntest.main.svnlook_binary),
+                                   repr([('propget', 'bogus_prop /A'),
+                                         ('propget', '--revprop bogus_rev_prop'),
+                                         ('proplist', '/A'),
+                                         ('proplist', '--revprop')]))
+  svntest.main.create_python_hook_script(pre_commit_hook,
+                                         hook_instance)
+
+  svntest.actions.run_and_verify_svn(None, None, [], 'propset',
+                                     'bogus_prop', 'bogus_val\n', A_path)
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'ci', '-m', 'log msg', wc_dir,
+                                     '--with-revprop', 'bogus_rev_prop=bogus_rev_val\n')
+  # Now check the logfile
+  expected_data = [ 'bogus_val\n',
+                    'bogus_rev_val\n',
+                    '  bogus_prop\n',
+                    '  svn:log\n', '  svn:author\n',
+                    #  internal property, not really expected
+                    '  svn:check-locks\n',
+                    '  bogus_rev_prop\n', '  svn:date\n']
+  verify_logfile(logfilepath, expected_data)
+
 ########################################################################
 # Run the tests
 
@@ -549,6 +639,7 @@ test_list = [ None,
               diff_ignore_whitespace,
               diff_ignore_eolstyle,
               diff_binary,
+              test_txn_flag,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/1.6.x-issue3390/subversion/tests/cmdline/svntest/actions.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3390/subversion/tests/cmdline/svntest/actions.py?rev=927593&r1=927592&r2=927593&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3390/subversion/tests/cmdline/svntest/actions.py (original)
+++ subversion/branches/1.6.x-issue3390/subversion/tests/cmdline/svntest/actions.py Thu Mar 25 21:16:37 2010
@@ -29,6 +29,12 @@ def no_sleep_for_timestamps():
 def do_sleep_for_timestamps():
   os.environ['SVN_I_LOVE_CORRUPTED_WORKING_COPIES_SO_DISABLE_SLEEP_FOR_TIMESTAMPS'] = 'no'
 
+def no_check_for_wc_ng():
+  os.environ['SVN_I_LOVE_CORRUPTED_WORKING_COPIES_SO_DISABLE_CHECK_FOR_WC_NG'] = 'yes'
+
+def do_check_for_wc_ng():
+  os.environ['SVN_I_LOVE_CORRUPTED_WORKING_COPIES_SO_DISABLE_CHECK_FOR_WC_NG'] = 'no'
+
 def setup_pristine_repository():
   """Create the pristine repository and 'svn import' the greek tree"""
 

Modified: subversion/branches/1.6.x-issue3390/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3390/subversion/tests/cmdline/svntest/main.py?rev=927593&r1=927592&r2=927593&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3390/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/branches/1.6.x-issue3390/subversion/tests/cmdline/svntest/main.py Thu Mar 25 21:16:37 2010
@@ -1218,6 +1218,7 @@ class TestRunner:
                                       str(self.index)
 
     actions.no_sleep_for_timestamps()
+    actions.no_check_for_wc_ng()
 
     saved_dir = os.getcwd()
     try:

Modified: subversion/branches/1.6.x-issue3390/subversion/tests/cmdline/update_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3390/subversion/tests/cmdline/update_tests.py?rev=927593&r1=927592&r2=927593&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3390/subversion/tests/cmdline/update_tests.py (original)
+++ subversion/branches/1.6.x-issue3390/subversion/tests/cmdline/update_tests.py Thu Mar 25 21:16:37 2010
@@ -22,6 +22,7 @@ import sys, re, os, subprocess
 # Our testing module
 import svntest
 from svntest import wc
+from merge_tests import set_up_branch
 
 # (abbreviation)
 Skip = svntest.testcase.Skip
@@ -4750,6 +4751,62 @@ def update_wc_of_dir_to_rev_not_containi
                                      "svn: Target path '/A' does not exist",
                                      "up", other_wc_dir)
 
+#----------------------------------------------------------------------
+# Test for issue #3573 'local non-inheritable mergeinfo changes not
+# properly merged with updated mergeinfo'
+def mergeinfo_updates_merge_with_local_mods(sbox):
+  "local mergeinfo changes are merged with updates"
+
+  # Copy A to A_COPY in r2, and make some changes to A_COPY in r3-r6.
+  sbox.build()
+  wc_dir = sbox.wc_dir
+  expected_disk, expected_status = set_up_branch(sbox)
+
+  # Some paths we'll care about
+  A_path      = os.path.join(wc_dir, "A")
+  A_COPY_path = os.path.join(wc_dir, "A_COPY")
+
+  # Merge -c3 from A to A_COPY at --depth empty, commit as r7.
+  ###
+  ### No, we are not checking the merge output for these simple
+  ### merges.  This is already covered *TO DEATH* in merge_tests.py.
+  ###
+  svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir)
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'merge', '-c3', '--depth', 'empty',
+                                     sbox.repo_url + '/A', A_COPY_path)
+  svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m',
+                                     'Merge r3 from A to A_COPY at depth empty',
+                                     wc_dir)
+  # Merge -c5 from A to A_COPY (at default --depth infinity), commit as r8.
+  svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir)
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'merge', '-c5',
+                                     sbox.repo_url + '/A', A_COPY_path)
+  svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m',
+                                     'Merge r5 from A to A_COPY', wc_dir)
+
+  # Update WC to r7, repeat merge of -c3 from A to A_COPY but this
+  # time do it at --depth infinity.  Confirm that the mergeinfo
+  # on A_COPY is no longer inheritable.
+  svntest.actions.run_and_verify_svn(None, None, [], 'up', '-r7', wc_dir)
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'merge', '-c3', '--depth', 'infinity',
+                                     sbox.repo_url + '/A', A_COPY_path)
+  svntest.actions.run_and_verify_svn(None, [A_COPY_path + " - /A:3\n"], [],
+                                     'pg', SVN_PROP_MERGEINFO, '-R',
+                                     A_COPY_path) 
+
+  # Update the WC (to r8), the mergeinfo on A_COPY should now have both
+  # the local mod from the uncommitted merge (/A:3* --> /A:3) and the change
+  # brought down by the update (/A:3* --> /A:3*,5) leaving us with /A:3,5.
+  ### This was failing because of issue #3573.  The local mergeinfo change
+  ### is reverted, leaving '/A:3*,5' on A_COPY.
+  svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir)
+  svntest.actions.run_and_verify_svn(None, [A_COPY_path + " - /A:3,5\n"], [],
+                                     'pg', SVN_PROP_MERGEINFO, '-R',
+                                     A_COPY_path)
+
 #######################################################################
 # Run the tests
 
@@ -4815,6 +4872,7 @@ test_list = [ None,
               tree_conflict_uc2_schedule_re_add,
               set_deep_depth_on_target_with_shallow_children,
               update_wc_of_dir_to_rev_not_containing_this_dir,
+              mergeinfo_updates_merge_with_local_mods,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/1.6.x-issue3390/subversion/tests/libsvn_subr/path-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3390/subversion/tests/libsvn_subr/path-test.c?rev=927593&r1=927592&r2=927593&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3390/subversion/tests/libsvn_subr/path-test.c (original)
+++ subversion/branches/1.6.x-issue3390/subversion/tests/libsvn_subr/path-test.c Thu Mar 25 21:16:37 2010
@@ -171,7 +171,7 @@ test_path_is_url(const char **msg,
     { "//blah/blah",                      FALSE },
     { "://blah/blah",                     FALSE },
     { "a:abb://boo/",                     FALSE },
-    { "http://svn.collab.net/repos/svn",  TRUE  },
+    { "http://svn.apache.org/repos/asf/subversion",  TRUE  },
     { "scheme/with",                      FALSE },
     { "scheme/with:",                     FALSE },
     { "scheme/with:/",                    FALSE },

Modified: subversion/branches/1.6.x-issue3390/tools/buildbot/slaves/README
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3390/tools/buildbot/slaves/README?rev=927593&r1=927592&r2=927593&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3390/tools/buildbot/slaves/README (original)
+++ subversion/branches/1.6.x-issue3390/tools/buildbot/slaves/README Thu Mar 25 21:16:37 2010
@@ -57,7 +57,7 @@ slavedir/[botname] folder.
 
 You can copy and reuse the scripts the other buildbot slave owners use for 
 Windows, Linux or Mac buildslaves. You can find them here: 
-http://svn.collab.net/repos/svn/trunk/tools/buildbot/slaves
+http://svn.apache.org/repos/asf/subversion/trunk/tools/buildbot/slaves
 
 4. Builds
 ---------

Modified: subversion/branches/1.6.x-issue3390/tools/client-side/change-svn-wc-format.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3390/tools/client-side/change-svn-wc-format.py?rev=927593&r1=927592&r2=927593&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3390/tools/client-side/change-svn-wc-format.py (original)
+++ subversion/branches/1.6.x-issue3390/tools/client-side/change-svn-wc-format.py Thu Mar 25 21:16:37 2010
@@ -59,7 +59,7 @@ Change the format of a Subversion workin
 def get_adm_dir():
   """Return the name of Subversion's administrative directory,
   adjusted for the SVN_ASP_DOT_NET_HACK environment variable.  See
-  <http://svn.collab.net/repos/svn/trunk/notes/asp-dot-net-hack.txt>
+  <http://svn.apache.org/repos/asf/subversion/trunk/notes/asp-dot-net-hack.txt>
   for details."""
   return "SVN_ASP_DOT_NET_HACK" in os.environ and "_svn" or ".svn"
 

Modified: subversion/branches/1.6.x-issue3390/tools/client-side/svn-graph.pl
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3390/tools/client-side/svn-graph.pl?rev=927593&r1=927592&r2=927593&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3390/tools/client-side/svn-graph.pl (original)
+++ subversion/branches/1.6.x-issue3390/tools/client-side/svn-graph.pl Thu Mar 25 21:16:37 2010
@@ -42,7 +42,7 @@ require SVN::Ra;
 require SVN::Client;
 
 # The URL of the Subversion repository we wish to graph
-# (e.g. "http://svn.collab.net/repos/svn").
+# (e.g. "http://svn.apache.org/repos/asf/subversion").
 my $repos_url;
 
 # The revision range we operate on, from $startrev -> $youngest.

Modified: subversion/branches/1.6.x-issue3390/tools/dev/contribulyze.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3390/tools/dev/contribulyze.py?rev=927593&r1=927592&r2=927593&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3390/tools/dev/contribulyze.py (original)
+++ subversion/branches/1.6.x-issue3390/tools/dev/contribulyze.py Thu Mar 25 21:16:37 2010
@@ -606,14 +606,14 @@ index_introduction = '''
 <p>The following list of contributors and their contributions is meant
 to help us keep track of whom to consider for commit access.  The list
 was generated from "svn&nbsp;log" output by <a
-href="http://svn.collab.net/repos/svn/trunk/tools/dev/contribulyze.py"
+href="http://svn.apache.org/repos/asf/subversion/trunk/tools/dev/contribulyze.py"
 >contribulyze.py</a>, which looks for log messages that use the <a
 href="http://subversion.tigris.org/hacking.html#crediting">special
 contribution format</a>.</p>
 
 <p><i>Please do not use this list as a generic guide to who has
 contributed what to Subversion!</i> It omits existing <a
-href="http://svn.collab.net/repos/svn/trunk/COMMITTERS"
+href="http://svn.apache.org/repos/asf/subversion/trunk/COMMITTERS"
 >full committers</a>, for example, because they are irrelevant to our
 search for new committers.  Also, it merely counts changes, it does
 not evaluate them.  To truly understand what someone has contributed,

Modified: subversion/branches/1.6.x-issue3390/tools/dev/po-merge.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3390/tools/dev/po-merge.py?rev=927593&r1=927592&r2=927593&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3390/tools/dev/po-merge.py (original)
+++ subversion/branches/1.6.x-issue3390/tools/dev/po-merge.py Thu Mar 25 21:16:37 2010
@@ -103,7 +103,7 @@ def main(argv):
                  'A backup copy of lang.po is saved as lang.po.bak.\n'
                  '\n'
                  'Example:\n'
-                 '    svn cat http://svn.collab.net/repos/svn/trunk/subversion/po/sv.po | \\\n'
+                 '    svn cat http://svn.apache.org/repos/asf/subversion/trunk/subversion/po/sv.po | \\\n'
                  '        %s sv.po' % (argv0, argv0))
 
     # Read the source po file into a hash

Modified: subversion/branches/1.6.x-issue3390/tools/dev/svn-merge-revs.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3390/tools/dev/svn-merge-revs.py?rev=927593&r1=927592&r2=927593&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3390/tools/dev/svn-merge-revs.py (original)
+++ subversion/branches/1.6.x-issue3390/tools/dev/svn-merge-revs.py Thu Mar 25 21:16:37 2010
@@ -24,10 +24,10 @@ revision that was merged, and the diff f
 
 Examples:
 
-  %s http://svn.collab.net/repos/svn/trunk svn-1.2.x-branch \
+  %s http://svn.apache.org/repos/asf/subversion/trunk svn-1.2.x-branch \
     r14041, r14149, r14186, r14194, r14238, r14273
 
-  %s http://svn.collab.net/repos/svn/trunk svn-1.2.x-branch \
+  %s http://svn.apache.org/repos/asf/subversion/trunk svn-1.2.x-branch \
     14041 14149 14186 14194 14238 14273""" % (progname, progname)
   print(val)
 

Modified: subversion/branches/1.6.x-issue3390/tools/dist/gen_nightly_ann.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3390/tools/dist/gen_nightly_ann.py?rev=927593&r1=927592&r2=927593&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3390/tools/dist/gen_nightly_ann.py (original)
+++ subversion/branches/1.6.x-issue3390/tools/dist/gen_nightly_ann.py Thu Mar 25 21:16:37 2010
@@ -15,7 +15,7 @@ webpagetext = '''<!DOCTYPE html PUBLIC "
 nightly release of Subversion 1.5.x (r%d).</p>
 
 <p>This distribution is automatically generated from the latest sources on the
-<a href="http://svn.collab.net/repos/svn/branches/1.5.x">1.5.x branch</a>.  It
+<a href="http://svn.apache.org/repos/asf/subversion/branches/1.5.x">1.5.x branch</a>.  It
 may not even compile, and is certainly <i>not</i> suitable for any sort of
 production use.  This distribution has not been tested, and may cause any
 number of problems, up to and including death and bodily injury.  Only use this

Modified: subversion/branches/1.6.x-issue3390/www/design.html
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3390/www/design.html?rev=927593&r1=927592&r2=927593&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3390/www/design.html (original)
+++ subversion/branches/1.6.x-issue3390/www/design.html Thu Mar 25 21:16:37 2010
@@ -2286,7 +2286,7 @@ write/Makefile:6
 
     <p>For a detailed description of exactly how Greg Stein
       <em class="email">gstein@lyra.org</em> is mapping the WebDAV DeltaV spec to
-      Subversion, see his paper: <a href="http://svn.collab.net/repos/svn/trunk/www/webdav-usage.html">http://svn.collab.net/repos/svn/trunk/www/webdav-usage.html</a>
+      Subversion, see his paper: <a href="http://svn.apache.org/repos/asf/subversion/trunk/www/webdav-usage.html">http://svn.apache.org/repos/asf/subversion/trunk/www/webdav-usage.html</a>
     </p>
 
     <p>For more information on WebDAV and the DeltaV extensions, see
@@ -2304,7 +2304,7 @@ write/Makefile:6
 
     <p>The client library <tt class="literal">libsvn_ra_svn</tt> and standalone
       server program <tt class="literal">svnserve</tt> implement a custom protocol
-      over TCP.  This protocol is documented at <a href="http://svn.collab.net/repos/svn/trunk/subversion/libsvn_ra_svn/protocol">http://svn.collab.net/repos/svn/trunk/subversion/libsvn_ra_svn/protocol</a>.</p>
+      over TCP.  This protocol is documented at <a href="http://svn.apache.org/repos/asf/subversion/trunk/subversion/libsvn_ra_svn/protocol">http://svn.apache.org/repos/asf/subversion/trunk/subversion/libsvn_ra_svn/protocol</a>.</p>
   </div> <!-- protocol.svn (h3) -->
 </div> <!-- protocol (h2) -->
 

Modified: subversion/branches/1.6.x-issue3390/www/merge-tracking/func-spec.html
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3390/www/merge-tracking/func-spec.html?rev=927593&r1=927592&r2=927593&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3390/www/merge-tracking/func-spec.html (original)
+++ subversion/branches/1.6.x-issue3390/www/merge-tracking/func-spec.html Thu Mar 25 21:16:37 2010
@@ -786,7 +786,7 @@ href="requirements.html#repeated-merge">
 have already been applied to a merge target or its children.  After a
 conflict is encountered, merges of subsequent revision ranges must be
 aborted, since <a
-href="http://svn.collab.net/repos/svn/trunk/notes/tree-conflicts.txt"
+href="http://svn.apache.org/repos/asf/subversion/trunk/notes/tree-conflicts.txt"
 >tree conflicts</a> or previous content conflicts cannot be reliably
 merged into (e.g. you can't merge into a file that either isn't there
 or which you could potentially merge inside one side of a conflict
@@ -950,7 +950,7 @@ versions of Subversion.</p>
   </li>
 
   <li><a
-  href="http://svn.collab.net/repos/svn/trunk/subversion/libsvn_fs_base/notes/structure">Structure
+  href="http://svn.apache.org/repos/asf/subversion/trunk/subversion/libsvn_fs_base/notes/structure">Structure
   of the Subversion FS BerkeleyDB backend</a></li>
 
 </ul>

Modified: subversion/branches/1.6.x-issue3390/www/merge-tracking/requirements.html
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3390/www/merge-tracking/requirements.html?rev=927593&r1=927592&r2=927593&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3390/www/merge-tracking/requirements.html (original)
+++ subversion/branches/1.6.x-issue3390/www/merge-tracking/requirements.html Thu Mar 25 21:16:37 2010
@@ -388,7 +388,7 @@ href="http://subversion.tigris.org/issue
 <h4>User Interface Ease in Common Cases</h4>
 
 <p>(This was one of the points made at the <a
-href="http://svn.collab.net/repos/svn/trunk/notes/EuroOSCON-2005-vc-bof.txt"
+href="http://svn.apache.org/repos/asf/subversion/trunk/notes/EuroOSCON-2005-vc-bof.txt"
 >EuroOSCON 2005 Version Control BOF session</a>.)</p>
 
 <p>The interface for common-case merges should be easy.  Currently it
@@ -509,7 +509,7 @@ a release branch.</p>
   >CollabNet customer Merge Tracking Summit</a></li>
 
   <li><a
-  href="http://svn.collab.net/repos/svn/trunk/notes/schema-tradeoffs.txt"
+  href="http://svn.apache.org/repos/asf/subversion/trunk/notes/schema-tradeoffs.txt"
   >schema-tradeoffs.txt</a>: Search for the section called "Questions
   that Users Ask".</li>
 

Modified: subversion/branches/1.6.x-issue3390/www/merge-tracking/summit.html
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3390/www/merge-tracking/summit.html?rev=927593&r1=927592&r2=927593&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3390/www/merge-tracking/summit.html (original)
+++ subversion/branches/1.6.x-issue3390/www/merge-tracking/summit.html Thu Mar 25 21:16:37 2010
@@ -78,7 +78,7 @@ the average user needs.</p>
   unique object identifier, more than we offer so far.  This desire
   was also noted at the
   <a
-  href="http://svn.collab.net/repos/svn/trunk/notes/EuroOSCON-2005-vc-bof.txt"
+  href="http://svn.apache.org/repos/asf/subversion/trunk/notes/EuroOSCON-2005-vc-bof.txt"
   >EuroOSCON 2005 Version Control BOF session</a>, search for
   "What branches/tags is this version of this file present in?".</p></li>
 
@@ -94,7 +94,7 @@ the average user needs.</p>
 
   <p>The exact same desire was expressed at the
   <a
-  href="http://svn.collab.net/repos/svn/trunk/notes/EuroOSCON-2005-vc-bof.txt"
+  href="http://svn.apache.org/repos/asf/subversion/trunk/notes/EuroOSCON-2005-vc-bof.txt"
   >EuroOSCON 2005 Version Control BOF session</a>, see the item
   containing the string "find my descendants" in that document.</p></li>
 
@@ -113,7 +113,7 @@ the average user needs.</p>
   useful.  Programmatic parsability was not a high priority,
   however.  An extended patch program was not considered crucial.  The
   desire for a "Smart patch format" was also noted at the <a
-  href="http://svn.collab.net/repos/svn/trunk/notes/EuroOSCON-2005-vc-bof.txt"
+  href="http://svn.apache.org/repos/asf/subversion/trunk/notes/EuroOSCON-2005-vc-bof.txt"
   >EuroOSCON 2005 Version Control BOF session</a>.</p></li>
 
   <li><p>Visual interfaces to branch/merge management are <em>very</em>
@@ -123,7 +123,7 @@ the average user needs.</p>
   cited as an excellent example of a tool providing the merge
   managment portion of this type of UI.  The need for GUI interfaces
   to branch topology was also discussed at the <a
-  href="http://svn.collab.net/repos/svn/trunk/notes/EuroOSCON-2005-vc-bof.txt"
+  href="http://svn.apache.org/repos/asf/subversion/trunk/notes/EuroOSCON-2005-vc-bof.txt"
   >EuroOSCON 2005 Version Control BOF session</a>, search for
   "display topology".  TODO: Follow-up sessions via WebEx will add
   more detail here.</p></li>
@@ -176,7 +176,7 @@ the average user needs.</p>
   <a href="http://subversion.tigris.org/issues/show_bug.cgi?id=2286"
       >issue&nbsp;#2286</a>.  It was also expressed at the
   <a
-  href="http://svn.collab.net/repos/svn/trunk/notes/EuroOSCON-2005-vc-bof.txt"
+  href="http://svn.apache.org/repos/asf/subversion/trunk/notes/EuroOSCON-2005-vc-bof.txt"
   >EuroOSCON 2005 Version Control BOF session</a>, search for "The
   One-File-In-Many-Branches Problem" there, which discusses
   how p4 and ClearCase do this.</p></li>

Modified: subversion/branches/1.6.x-issue3390/www/variance-adjusted-patching.html
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3390/www/variance-adjusted-patching.html?rev=927593&r1=927592&r2=927593&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3390/www/variance-adjusted-patching.html (original)
+++ subversion/branches/1.6.x-issue3390/www/variance-adjusted-patching.html Thu Mar 25 21:16:37 2010
@@ -21,7 +21,7 @@
 <p>Date of First Publication: 22 May, 2001</p>
 
 <p>$LastChangedDate$<br />
-Canonical URL: <a href="http://svn.collab.net/repos/svn/trunk/www/variance-adjusted-patching.html">http://svn.collab.net/repos/svn/trunk/www/variance-adjusted-patching.html</a></p>
+Canonical URL: <a href="http://svn.apache.org/repos/asf/subversion/trunk/www/variance-adjusted-patching.html">http://svn.apache.org/repos/asf/subversion/trunk/www/variance-adjusted-patching.html</a></p>
 
 <hr />  <!-- ====================================================== -->
 

Modified: subversion/branches/1.6.x-issue3390/www/webdav-usage.html
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3390/www/webdav-usage.html?rev=927593&r1=927592&r2=927593&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3390/www/webdav-usage.html (original)
+++ subversion/branches/1.6.x-issue3390/www/webdav-usage.html Thu Mar 25 21:16:37 2010
@@ -1176,7 +1176,7 @@ property for each
     <blockquote>
       <p>For example, take a
       look at:
-      <a href="http://svn.collab.net/repos/svn/trunk/README">http://svn.collab.net/repos/svn/trunk/README</a>
+      <a href="http://svn.apache.org/repos/asf/subversion/trunk/README">http://svn.apache.org/repos/asf/subversion/trunk/README</a>
       (that's the HEAD right there; we also have URLs for every
       previous revision of every file)</p>
     </blockquote>