You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2013/07/25 17:29:53 UTC

svn commit: r1507012 [10/11] - in /subversion/branches/fsfs-format7: ./ build/ build/ac-macros/ build/generator/ build/generator/swig/ build/generator/templates/ contrib/client-side/emacs/ doc/programmer/ notes/http-and-webdav/ subversion/ subversion/b...

Modified: subversion/branches/fsfs-format7/subversion/svn/cl.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/svn/cl.h?rev=1507012&r1=1507011&r2=1507012&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/svn/cl.h (original)
+++ subversion/branches/fsfs-format7/subversion/svn/cl.h Thu Jul 25 15:29:49 2013
@@ -242,6 +242,7 @@ typedef struct svn_cl__opt_state_t
   svn_boolean_t mergeinfo_log;     /* show log message in mergeinfo command */
   svn_boolean_t remove_unversioned;/* remove unversioned items */
   svn_boolean_t remove_ignored;    /* remove ignored items */
+  svn_boolean_t no_newline;        /* do not output the trailing newline */
 } svn_cl__opt_state_t;
 
 
@@ -289,7 +290,8 @@ svn_opt_subcommand_t
   svn_cl__switch,
   svn_cl__unlock,
   svn_cl__update,
-  svn_cl__upgrade;
+  svn_cl__upgrade,
+  svn_cl__youngest;
 
 
 /* See definition in svn.c for documentation. */
@@ -439,12 +441,12 @@ 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.
+   Use TARGET_ABSPATH and TARGET_PATH to shorten PATH into something
+   relative to the target as necessary.
 */
 svn_error_t *
-svn_cl__print_status(const char *cwd_abspath,
+svn_cl__print_status(const char *target_abspath,
+                     const char *target_path,
                      const char *path,
                      const svn_client_status_t *status,
                      svn_boolean_t suppress_externals_placeholders,
@@ -462,12 +464,12 @@ svn_cl__print_status(const char *cwd_abs
 /* Print STATUS for PATH in XML to stdout.  Use POOL for temporary
    allocations.
 
-   Use CWD_ABSPATH -- the absolute path of the current working
-   directory -- to shorten PATH into something relative to that
-   directory as necessary.
+   Use TARGET_ABSPATH and TARGET_PATH to shorten PATH into something
+   relative to the target as necessary.
  */
 svn_error_t *
-svn_cl__print_status_xml(const char *cwd_abspath,
+svn_cl__print_status_xml(const char *target_abspath,
+                         const char *target_path,
                          const char *path,
                          const svn_client_status_t *status,
                          svn_client_ctx_t *ctx,

Modified: subversion/branches/fsfs-format7/subversion/svn/status-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/svn/status-cmd.c?rev=1507012&r1=1507011&r2=1507012&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/svn/status-cmd.c (original)
+++ subversion/branches/fsfs-format7/subversion/svn/status-cmd.c Thu Jul 25 15:29:49 2013
@@ -51,7 +51,8 @@ struct status_baton
 {
   /* These fields all correspond to the ones in the
      svn_cl__print_status() interface. */
-  const char *cwd_abspath;
+  const char *target_abspath;
+  const char *target_path;
   svn_boolean_t suppress_externals_placeholders;
   svn_boolean_t detailed;
   svn_boolean_t show_last_committed;
@@ -77,6 +78,8 @@ struct status_baton
 struct status_cache
 {
   const char *path;
+  const char *target_abspath;
+  const char *target_path;
   svn_client_status_t *status;
 };
 
@@ -152,10 +155,11 @@ print_status_normal_or_xml(void *baton,
   struct status_baton *sb = baton;
 
   if (sb->xml_mode)
-    return svn_cl__print_status_xml(sb->cwd_abspath, path, status,
-                                    sb->ctx, pool);
+    return svn_cl__print_status_xml(sb->target_abspath, sb->target_path,
+                                    path, status, sb->ctx, pool);
   else
-    return svn_cl__print_status(sb->cwd_abspath, path, status,
+    return svn_cl__print_status(sb->target_abspath, sb->target_path,
+                                path, status,
                                 sb->suppress_externals_placeholders,
                                 sb->detailed,
                                 sb->show_last_committed,
@@ -239,6 +243,8 @@ print_status(void *baton,
       const char *cl_key = apr_pstrdup(sb->cl_pool, status->changelist);
       struct status_cache *scache = apr_pcalloc(sb->cl_pool, sizeof(*scache));
       scache->path = apr_pstrdup(sb->cl_pool, path);
+      scache->target_abspath = apr_pstrdup(sb->cl_pool, sb->target_abspath);
+      scache->target_path = apr_pstrdup(sb->cl_pool, sb->target_path);
       scache->status = svn_client_status_dup(status, sb->cl_pool);
 
       path_array =
@@ -303,7 +309,6 @@ 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);
@@ -328,6 +333,10 @@ svn_cl__status(apr_getopt_t *os,
 
       svn_pool_clear(iterpool);
 
+      SVN_ERR(svn_dirent_get_absolute(&(sb.target_abspath), target,
+                                      scratch_pool));
+      sb.target_path = target;
+
       SVN_ERR(svn_cl__check_cancel(ctx->cancel_baton));
 
       if (opt_state->xml)
@@ -392,6 +401,8 @@ svn_cl__status(apr_getopt_t *os,
             {
               struct status_cache *scache =
                 APR_ARRAY_IDX(path_array, j, struct status_cache *);
+              sb.target_abspath = scache->target_abspath;
+              sb.target_path = scache->target_path;
               SVN_ERR(print_status_normal_or_xml(&sb, scache->path,
                                                  scache->status, scratch_pool));
             }

Modified: subversion/branches/fsfs-format7/subversion/svn/status.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/svn/status.c?rev=1507012&r1=1507011&r2=1507012&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/svn/status.c (original)
+++ subversion/branches/fsfs-format7/subversion/svn/status.c Thu Jul 25 15:29:49 2013
@@ -137,69 +137,84 @@ generate_status_desc(enum svn_wc_status_
 }
 
 /* Make a relative path containing '..' elements as needed.
-   RELATIVE_TO_PATH must be the path to a directory (not a file!) and
-   TARGET_PATH must be the path to any file or directory. Both
-   RELATIVE_TO_PATH and TARGET_PATH must be based on the same parent path,
-   i.e. they can either both be absolute or they can both be relative to the
-   same parent directory. Both paths are expected to be canonical.
+   TARGET_ABSPATH shall be the absolute version of TARGET_PATH.
+   TARGET_ABSPATH, TARGET_PATH and PATH shall be canonical.
 
-   If above conditions are met, a relative path that leads to TARGET_ABSPATH
-   from RELATIVE_TO_PATH is returned, but there is no error checking involved.
+   If above conditions are met, a relative path that leads to PATH
+   from TARGET_PATH is returned, but there is no error checking involved.
 
-   The returned path is allocated from RESULT_POOL, all other allocations are
-   made in SCRATCH_POOL. */
+   The returned path is allocated from RESULT_POOL, all other
+   allocations are made in SCRATCH_POOL.  */
 static const char *
-make_relpath(const char *relative_to_path,
+make_relpath(const char *target_abspath,
              const char *target_path,
+             const char *path,
              apr_pool_t *result_pool,
              apr_pool_t *scratch_pool)
 {
   const char *la;
   const char *parent_dir_els = "";
+  const char *abspath, *relative;
+  svn_error_t *err = svn_dirent_get_absolute(&abspath, path, scratch_pool);
+
+  if (err)
+    {
+      /* We probably got passed some invalid path. */
+      svn_error_clear(err);
+      return apr_pstrdup(result_pool, path);
+    }
+
+  relative = svn_dirent_skip_ancestor(target_abspath, abspath);
+  if (relative)
+    {
+      return svn_dirent_join(target_path, relative, result_pool);
+    }
 
   /* An example:
    *  relative_to_path = /a/b/c
-   *  target_path      = /a/x/y/z
+   *  path             = /a/x/y/z
    *  result           = ../../x/y/z
    *
    * Another example (Windows specific):
    *  relative_to_path = F:/wc
-   *  target_path      = C:/wc
+   *  path             = C:/wc
    *  result           = C:/wc
    */
 
   /* Skip the common ancestor of both paths, here '/a'. */
-  la = svn_dirent_get_longest_ancestor(relative_to_path, target_path,
+  la = svn_dirent_get_longest_ancestor(target_abspath, abspath,
                                        scratch_pool);
   if (*la == '\0')
     {
       /* Nothing in common: E.g. C:/ vs F:/ on Windows */
-      return apr_pstrdup(result_pool, target_path);
+      return apr_pstrdup(result_pool, path);
     }
-  relative_to_path = svn_dirent_skip_ancestor(la, relative_to_path);
-  target_path = svn_dirent_skip_ancestor(la, target_path);
+  relative = svn_dirent_skip_ancestor(la, target_abspath);
+  path = svn_dirent_skip_ancestor(la, path);
 
   /* In above example, we'd now have:
    *  relative_to_path = b/c
-   *  target_path      = x/y/z */
+   *  path             = x/y/z */
 
   /* Count the elements of relative_to_path and prepend as many '..' elements
-   * to target_path. */
-  while (*relative_to_path)
+   * to path. */
+  while (*relative)
     {
-      svn_dirent_split(&relative_to_path, NULL, relative_to_path,
+      svn_dirent_split(&relative, NULL, relative,
                        scratch_pool);
       parent_dir_els = svn_dirent_join(parent_dir_els, "..", scratch_pool);
     }
 
-  return svn_dirent_join(parent_dir_els, target_path, result_pool);
+  return svn_dirent_join(parent_dir_els, path, result_pool);
 }
 
 
 /* Print STATUS and PATH in a format determined by DETAILED and
    SHOW_LAST_COMMITTED. */
 static svn_error_t *
-print_status(const char *cwd_abspath, const char *path,
+print_status(const char *target_abspath,
+             const char *target_path,
+             const char *path,
              svn_boolean_t detailed,
              svn_boolean_t show_last_committed,
              svn_boolean_t repos_locks,
@@ -217,7 +232,7 @@ print_status(const char *cwd_abspath, co
   const char *moved_from_line = "";
   const char *moved_to_line = "";
 
-  path = make_relpath(cwd_abspath, path, pool, pool);
+  path = make_relpath(target_abspath, target_path, 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.
@@ -295,7 +310,8 @@ print_status(const char *cwd_abspath, co
     {
       const char *relpath;
 
-      relpath = make_relpath(cwd_abspath, status->moved_from_abspath,
+      relpath = make_relpath(target_abspath, target_path,
+                             status->moved_from_abspath,
                              pool, pool);
       relpath = svn_dirent_local_style(relpath, pool);
       moved_from_line = apr_pstrcat(pool, "\n        > ",
@@ -310,7 +326,8 @@ print_status(const char *cwd_abspath, co
 
       if (status->moved_from_abspath)
         {
-          relpath = make_relpath(cwd_abspath, status->moved_from_abspath,
+          relpath = make_relpath(target_abspath, target_path,
+                                 status->moved_from_abspath,
                                  pool, pool);
           relpath = svn_dirent_local_style(relpath, pool);
           moved_from_line = apr_pstrcat(pool, "\n        > ",
@@ -321,7 +338,8 @@ print_status(const char *cwd_abspath, co
 
       if (status->moved_to_abspath)
         {
-          relpath = make_relpath(cwd_abspath, status->moved_to_abspath,
+          relpath = make_relpath(target_abspath, target_path,
+                                 status->moved_to_abspath,
                                  pool, pool);
           relpath = svn_dirent_local_style(relpath, pool);
           moved_to_line = apr_pstrcat(pool, "\n        > ",
@@ -331,6 +349,8 @@ print_status(const char *cwd_abspath, co
         }
     }
 
+  path = svn_dirent_local_style(path, pool);
+
   if (detailed)
     {
       char ood_status, lock_status;
@@ -448,7 +468,8 @@ print_status(const char *cwd_abspath, co
 
 
 svn_error_t *
-svn_cl__print_status_xml(const char *cwd_abspath,
+svn_cl__print_status_xml(const char *target_abspath,
+                         const char *target_path,
                          const char *path,
                          const svn_client_status_t *status,
                          svn_client_ctx_t *ctx,
@@ -467,7 +488,7 @@ svn_cl__print_status_xml(const char *cwd
     SVN_ERR(svn_wc_conflicted_p3(NULL, NULL, &tree_conflicted,
                                  ctx->wc_ctx, local_abspath, pool));
 
-  path = make_relpath(cwd_abspath, path, pool, pool);
+  path = make_relpath(target_abspath, target_path, path, pool, pool);
 
   svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "entry",
                         "path", svn_dirent_local_style(path, pool), NULL);
@@ -500,14 +521,16 @@ svn_cl__print_status_xml(const char *cwd
 
       if (status->moved_from_abspath)
         {
-          relpath = make_relpath(cwd_abspath, status->moved_from_abspath,
+          relpath = make_relpath(target_abspath, target_path,
+                                 status->moved_from_abspath,
                                  pool, pool);
           relpath = svn_dirent_local_style(relpath, pool);
           svn_hash_sets(att_hash, "moved-from", relpath);
         }
       if (status->moved_to_abspath)
         {
-          relpath = make_relpath(cwd_abspath, status->moved_to_abspath,
+          relpath = make_relpath(target_abspath, target_path,
+                                 status->moved_to_abspath,
                                  pool, pool);
           relpath = svn_dirent_local_style(relpath, pool);
           svn_hash_sets(att_hash, "moved-to", relpath);
@@ -552,7 +575,8 @@ svn_cl__print_status_xml(const char *cwd
 
 /* Called by status-cmd.c */
 svn_error_t *
-svn_cl__print_status(const char *cwd_abspath,
+svn_cl__print_status(const char *target_abspath,
+                     const char *target_path,
                      const char *path,
                      const svn_client_status_t *status,
                      svn_boolean_t suppress_externals_placeholders,
@@ -601,7 +625,7 @@ svn_cl__print_status(const char *cwd_abs
         return SVN_NO_ERROR;
     }
 
-  return print_status(cwd_abspath, svn_dirent_local_style(path, pool),
+  return print_status(target_abspath, target_path, path,
                       detailed, show_last_committed, repos_locks, status,
                       text_conflicts, prop_conflicts, tree_conflicts,
                       ctx, pool);

Modified: subversion/branches/fsfs-format7/subversion/svn/svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/svn/svn.c?rev=1507012&r1=1507011&r2=1507012&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/svn/svn.c (original)
+++ subversion/branches/fsfs-format7/subversion/svn/svn.c Thu Jul 25 15:29:49 2013
@@ -136,7 +136,8 @@ typedef enum svn_cl__longopt_t {
   opt_search_and,
   opt_mergeinfo_log,
   opt_remove_unversioned,
-  opt_remove_ignored
+  opt_remove_ignored,
+  opt_no_newline
 } svn_cl__longopt_t;
 
 
@@ -385,6 +386,7 @@ const apr_getopt_option_t svn_cl__option
   {"remove-unversioned", opt_remove_unversioned, 0,
                        N_("remove unversioned items")},
   {"remove-ignored", opt_remove_ignored, 0, N_("remove ignored items")},
+  {"no-newline", opt_no_newline, 0, N_("do not output trailing newline")},
 
   /* Long-opt Aliases
    *
@@ -1638,6 +1640,14 @@ const svn_opt_subcommand_desc2_t svn_cl_
      "  Local modifications are preserved.\n"),
     { 'q' } },
 
+  { "youngest", svn_cl__youngest, {0}, N_
+    ("Print the youngest revision number of a target's repository.\n"
+     "usage: youngest [TARGET]\n"
+     "\n"
+     "  Print the revision number of the youngest revision in the repository\n"
+     "  with which TARGET is associated.\n"),
+    { opt_no_newline } },
+
   { NULL, NULL, {0}, NULL, {0} }
 };
 
@@ -1658,7 +1668,7 @@ check_lib_versions(void)
     };
   SVN_VERSION_DEFINE(my_version);
 
-  return svn_ver_check_list(&my_version, checklist);
+  return svn_ver_check_list2(&my_version, checklist, svn_ver_equal);
 }
 
 
@@ -2314,6 +2324,9 @@ sub_main(int argc, const char *argv[], a
       case opt_remove_ignored:
         opt_state.remove_ignored = TRUE;
         break;
+      case opt_no_newline:
+        opt_state.no_newline = TRUE;
+        break;
       default:
         /* Hmmm. Perhaps this would be a good place to squirrel away
            opts that commands like svn diff might need. Hmmm indeed. */
@@ -2990,6 +3003,10 @@ sub_main(int argc, const char *argv[], a
                          "Subversion"));
         }
 
+      /* Ensure that stdout is flushed, so the user will see any write errors.
+         This makes sure that output is not silently lost. */
+      SVN_INT_ERR(svn_cmdline_fflush(stdout));
+
       return EXIT_ERROR(err);
     }
   else

Modified: subversion/branches/fsfs-format7/subversion/svn_private_config.hw
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/svn_private_config.hw?rev=1507012&r1=1507011&r2=1507012&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/svn_private_config.hw (original)
+++ subversion/branches/fsfs-format7/subversion/svn_private_config.hw Thu Jul 25 15:29:49 2013
@@ -108,7 +108,7 @@
 #if defined(SVN_DEBUG)
 # define SVN__FORCE_INLINE
 # define SVN__PREVENT_INLINE
-#elif define(_MSC_VER)
+#elif defined(_MSC_VER)
 # define SVN__FORCE_INLINE __forceinline
 # define SVN__PREVENT_INLINE __declspec(noinline)
 #else
@@ -116,8 +116,8 @@
 # define SVN__PREVENT_INLINE
 #endif
 
-#define SVN__PREDICT_TRUE
-#define SVN__PREDICT_FALSE
+#define SVN__PREDICT_TRUE(x)  (x)
+#define SVN__PREDICT_FALSE(x)  (x)
 
 #endif /* SVN_PRIVATE_CONFIG_HW */
 

Modified: subversion/branches/fsfs-format7/subversion/svnadmin/svnadmin.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/svnadmin/svnadmin.c?rev=1507012&r1=1507011&r2=1507012&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/svnadmin/svnadmin.c (original)
+++ subversion/branches/fsfs-format7/subversion/svnadmin/svnadmin.c Thu Jul 25 15:29:49 2013
@@ -141,7 +141,7 @@ check_lib_versions(void)
     };
   SVN_VERSION_DEFINE(my_version);
 
-  return svn_ver_check_list(&my_version, checklist);
+  return svn_ver_check_list2(&my_version, checklist, svn_ver_equal);
 }
 
 
@@ -793,39 +793,6 @@ subcommand_deltify(apr_getopt_t *os, voi
   return SVN_NO_ERROR;
 }
 
-static void
-cmdline_stream_printf(svn_stream_t *stream,
-                      apr_pool_t *pool,
-                      const char *fmt,
-                      ...)
-  __attribute__((format(printf, 3, 4)));
-
-static void
-cmdline_stream_printf(svn_stream_t *stream,
-                      apr_pool_t *pool,
-                      const char *fmt,
-                      ...)
-{
-  const char *message;
-  va_list ap;
-  svn_error_t *err;
-  const char *out;
-
-  va_start(ap, fmt);
-  message = apr_pvsprintf(pool, fmt, ap);
-  va_end(ap);
-
-  err = svn_cmdline_cstring_from_utf8(&out, message, pool);
-
-  if (err)
-    {
-      svn_error_clear(err);
-      out = svn_cmdline_cstring_from_utf8_fuzzy(message, pool);
-    }
-
-  svn_error_clear(svn_stream_puts(stream, out));
-}
-
 
 /* Implementation of svn_repos_notify_func_t to wrap the output to a
    response stream for svn_repos_dump_fs2() and svn_repos_verify_fs() */
@@ -835,45 +802,46 @@ repos_notify_handler(void *baton,
                      apr_pool_t *scratch_pool)
 {
   svn_stream_t *feedback_stream = baton;
+  apr_size_t len;
 
   switch (notify->action)
   {
     case svn_repos_notify_warning:
-      cmdline_stream_printf(feedback_stream, scratch_pool,
-                            "WARNING 0x%04x: %s\n", notify->warning,
-                            notify->warning_str);
+      svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
+                                        "WARNING 0x%04x: %s\n", notify->warning,
+                                        notify->warning_str));
       return;
 
     case svn_repos_notify_failure:
       if (notify->revision != SVN_INVALID_REVNUM)
-        cmdline_stream_printf(feedback_stream, scratch_pool,
-                              _("* Error verifying revision %ld.\n"),
-                              notify->revision);
+        svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
+                                    _("* Error verifying revision %ld.\n"),
+                                    notify->revision));
       if (notify->err)
         svn_handle_error2(notify->err, stderr, FALSE /* non-fatal */,
                           "svnadmin: ");
       return;
 
     case svn_repos_notify_dump_rev_end:
-      cmdline_stream_printf(feedback_stream, scratch_pool,
-                            _("* Dumped revision %ld.\n"),
-                            notify->revision);
+      svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
+                                        _("* Dumped revision %ld.\n"),
+                                        notify->revision));
       return;
 
     case svn_repos_notify_verify_rev_end:
-      cmdline_stream_printf(feedback_stream, scratch_pool,
-                            _("* Verified revision %ld.\n"),
-                            notify->revision);
+      svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
+                                        _("* Verified revision %ld.\n"),
+                                        notify->revision));
       return;
 
     case svn_repos_notify_verify_rev_structure:
       if (notify->revision == SVN_INVALID_REVNUM)
-        cmdline_stream_printf(feedback_stream, scratch_pool,
-                              _("* Verifying repository metadata ...\n"));
+        svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
+                                _("* Verifying repository metadata ...\n")));
       else
-        cmdline_stream_printf(feedback_stream, scratch_pool,
-                              _("* Verifying metadata at revision %ld ...\n"),
-                              notify->revision);
+        svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
+                        _("* Verifying metadata at revision %ld ...\n"),
+                        notify->revision));
       return;
 
     case svn_repos_notify_pack_shard_start:
@@ -881,14 +849,14 @@ repos_notify_handler(void *baton,
         const char *shardstr = apr_psprintf(scratch_pool,
                                             "%" APR_INT64_T_FMT,
                                             notify->shard);
-        cmdline_stream_printf(feedback_stream, scratch_pool,
-                              _("Packing revisions in shard %s..."),
-                              shardstr);
+        svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
+                                          _("Packing revisions in shard %s..."),
+                                          shardstr));
       }
       return;
 
     case svn_repos_notify_pack_shard_end:
-      cmdline_stream_printf(feedback_stream, scratch_pool, _("done.\n"));
+      svn_error_clear(svn_stream_puts(feedback_stream, _("done.\n")));
       return;
 
     case svn_repos_notify_pack_shard_start_revprop:
@@ -896,30 +864,30 @@ repos_notify_handler(void *baton,
         const char *shardstr = apr_psprintf(scratch_pool,
                                             "%" APR_INT64_T_FMT,
                                             notify->shard);
-        cmdline_stream_printf(feedback_stream, scratch_pool,
-                              _("Packing revprops in shard %s..."),
-                              shardstr);
+        svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
+                                          _("Packing revprops in shard %s..."),
+                                          shardstr));
       }
       return;
 
     case svn_repos_notify_pack_shard_end_revprop:
-      cmdline_stream_printf(feedback_stream, scratch_pool, _("done.\n"));
+      svn_error_clear(svn_stream_puts(feedback_stream, _("done.\n")));
       return;
 
     case svn_repos_notify_load_txn_committed:
       if (notify->old_revision == SVN_INVALID_REVNUM)
         {
-          cmdline_stream_printf(feedback_stream, scratch_pool,
-                                _("\n------- Committed revision %ld >>>\n\n"),
-                                notify->new_revision);
+          svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
+                            _("\n------- Committed revision %ld >>>\n\n"),
+                            notify->new_revision));
         }
       else
         {
-          cmdline_stream_printf(feedback_stream, scratch_pool,
-                                _("\n------- Committed new rev %ld"
-                                  " (loaded from original rev %ld"
-                                  ") >>>\n\n"), notify->new_revision,
-                                notify->old_revision);
+          svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
+                            _("\n------- Committed new rev %ld"
+                              " (loaded from original rev %ld"
+                              ") >>>\n\n"), notify->new_revision,
+                              notify->old_revision));
         }
       return;
 
@@ -928,27 +896,27 @@ repos_notify_handler(void *baton,
         switch (notify->node_action)
         {
           case svn_node_action_change:
-            cmdline_stream_printf(feedback_stream, scratch_pool,
+            svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
                                   _("     * editing path : %s ..."),
-                                  notify->path);
+                                  notify->path));
             break;
 
           case svn_node_action_delete:
-            cmdline_stream_printf(feedback_stream, scratch_pool,
+            svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
                                   _("     * deleting path : %s ..."),
-                                  notify->path);
+                                  notify->path));
             break;
 
           case svn_node_action_add:
-            cmdline_stream_printf(feedback_stream, scratch_pool,
+            svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
                                   _("     * adding path : %s ..."),
-                                  notify->path);
+                                  notify->path));
             break;
 
           case svn_node_action_replace:
-            cmdline_stream_printf(feedback_stream, scratch_pool,
+            svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
                                   _("     * replacing path : %s ..."),
-                                  notify->path);
+                                  notify->path));
             break;
 
         }
@@ -956,30 +924,32 @@ repos_notify_handler(void *baton,
       return;
 
     case svn_repos_notify_load_node_done:
-      cmdline_stream_printf(feedback_stream, scratch_pool, _(" done.\n"));
+      len = 7;
+      svn_error_clear(svn_stream_write(feedback_stream, _(" done.\n"), &len));
       return;
 
     case svn_repos_notify_load_copied_node:
-      cmdline_stream_printf(feedback_stream, scratch_pool, "COPIED...");
+      len = 9;
+      svn_error_clear(svn_stream_write(feedback_stream, "COPIED...", &len));
       return;
 
     case svn_repos_notify_load_txn_start:
-      cmdline_stream_printf(feedback_stream, scratch_pool,
-                            _("<<< Started new transaction, based on "
-                              "original revision %ld\n"),
-                            notify->old_revision);
+      svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
+                                _("<<< Started new transaction, based on "
+                                  "original revision %ld\n"),
+                                notify->old_revision));
       return;
 
     case svn_repos_notify_load_skipped_rev:
-      cmdline_stream_printf(feedback_stream, scratch_pool,
-                            _("<<< Skipped original revision %ld\n"),
-                            notify->old_revision);
+      svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
+                                _("<<< Skipped original revision %ld\n"),
+                                notify->old_revision));
       return;
 
     case svn_repos_notify_load_normalized_mergeinfo:
-      cmdline_stream_printf(feedback_stream, scratch_pool,
-                            _(" removing '\\r' from %s ..."),
-                            SVN_PROP_MERGEINFO);
+      svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
+                                _(" removing '\\r' from %s ..."),
+                                SVN_PROP_MERGEINFO));
       return;
 
     case svn_repos_notify_mutex_acquired:
@@ -988,17 +958,17 @@ repos_notify_handler(void *baton,
       return;
 
     case svn_repos_notify_recover_start:
-      cmdline_stream_printf(feedback_stream, scratch_pool,
-                            _("Repository lock acquired.\n"
-                              "Please wait; recovering the"
-                              " repository may take some time...\n"));
+      svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
+                             _("Repository lock acquired.\n"
+                               "Please wait; recovering the"
+                               " repository may take some time...\n")));
       return;
 
     case svn_repos_notify_upgrade_start:
-      cmdline_stream_printf(feedback_stream, scratch_pool,
-                            _("Repository lock acquired.\n"
-                              "Please wait; upgrading the"
-                              " repository may take some time...\n"));
+      svn_error_clear(svn_stream_puts(feedback_stream,
+                             _("Repository lock acquired.\n"
+                               "Please wait; upgrading the"
+                               " repository may take some time...\n")));
       return;
 
     case svn_repos_notify_pack_revprops:
@@ -1006,10 +976,10 @@ repos_notify_handler(void *baton,
         const char *shardstr = apr_psprintf(scratch_pool,
                                             "%" APR_INT64_T_FMT,
                                             notify->shard);
-        cmdline_stream_printf(feedback_stream, scratch_pool,
+        svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
                               _("Packing revision properties"
                                 " in shard %s..."),
-                              shardstr);
+                              shardstr));
         return;
       }
 
@@ -1018,17 +988,17 @@ repos_notify_handler(void *baton,
         const char *shardstr = apr_psprintf(scratch_pool,
                                             "%" APR_INT64_T_FMT,
                                             notify->shard);
-        cmdline_stream_printf(feedback_stream, scratch_pool,
+        svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
                               _("Removing non-packed revision properties"
                                 " in shard %s..."),
-                              shardstr);
+                              shardstr));
         return;
       }
 
     case svn_repos_notify_format_bumped:
-      cmdline_stream_printf(feedback_stream, scratch_pool,
+      svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
                             _("Bumped repository format to %ld\n"),
-                            notify->revision);
+                            notify->revision));
 
     default:
       return;
@@ -1831,9 +1801,9 @@ subcommand_info(apr_getopt_t *os, void *
         if (fsfs_info->shard_size)
           {
             const int shard_size = fsfs_info->shard_size;
-            const int shards_packed = fsfs_info->min_unpacked_rev / shard_size;
-            const int shards_full = (youngest + 1) / shard_size;
-            SVN_ERR(svn_cmdline_printf(pool, _("FSFS Shards Packed: %d/%d\n"),
+            const long shards_packed = fsfs_info->min_unpacked_rev / shard_size;
+            const long shards_full = (youngest + 1) / shard_size;
+            SVN_ERR(svn_cmdline_printf(pool, _("FSFS Shards Packed: %ld/%ld\n"),
                                        shards_packed, shards_full));
           }
       }

Propchange: subversion/branches/fsfs-format7/subversion/svnauth/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Thu Jul 25 15:29:49 2013
@@ -0,0 +1 @@
+svnauth

Modified: subversion/branches/fsfs-format7/subversion/svndumpfilter/svndumpfilter.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/svndumpfilter/svndumpfilter.c?rev=1507012&r1=1507011&r2=1507012&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/svndumpfilter/svndumpfilter.c (original)
+++ subversion/branches/fsfs-format7/subversion/svndumpfilter/svndumpfilter.c Thu Jul 25 15:29:49 2013
@@ -1176,7 +1176,7 @@ check_lib_versions(void)
     };
   SVN_VERSION_DEFINE(my_version);
 
-  return svn_ver_check_list(&my_version, checklist);
+  return svn_ver_check_list2(&my_version, checklist, svn_ver_equal);
 }
 
 

Modified: subversion/branches/fsfs-format7/subversion/svnlook/svnlook.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/svnlook/svnlook.c?rev=1507012&r1=1507011&r2=1507012&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/svnlook/svnlook.c (original)
+++ subversion/branches/fsfs-format7/subversion/svnlook/svnlook.c Thu Jul 25 15:29:49 2013
@@ -397,7 +397,7 @@ check_lib_versions(void)
     };
   SVN_VERSION_DEFINE(my_version);
 
-  return svn_ver_check_list(&my_version, checklist);
+  return svn_ver_check_list2(&my_version, checklist, svn_ver_equal);
 }
 
 

Modified: subversion/branches/fsfs-format7/subversion/svnmucc/svnmucc.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/svnmucc/svnmucc.c?rev=1507012&r1=1507011&r2=1507012&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/svnmucc/svnmucc.c (original)
+++ subversion/branches/fsfs-format7/subversion/svnmucc/svnmucc.c Thu Jul 25 15:29:49 2013
@@ -85,7 +85,7 @@ init(const char *application)
   if (svn_cmdline_init(application, stderr))
     exit(EXIT_FAILURE);
 
-  err = svn_ver_check_list(&my_version, checklist);
+  err = svn_ver_check_list2(&my_version, checklist, svn_ver_equal);
   if (err)
     handle_error(err, NULL);
 
@@ -1145,13 +1145,18 @@ main(int argc, const char **argv)
           break;
         case 'r':
           {
+            const char *saved_arg = arg;
             char *digits_end = NULL;
+            while (*arg == 'r')
+              arg++;
             base_revision = strtol(arg, &digits_end, 10);
             if ((! SVN_IS_VALID_REVNUM(base_revision))
                 || (! digits_end)
                 || *digits_end)
-              handle_error(svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR,
-                                            NULL, "Invalid revision number"),
+              handle_error(svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR,
+                                             NULL,
+                                             _("Invalid revision number '%s'"),
+                                             saved_arg),
                            pool);
           }
           break;

Modified: subversion/branches/fsfs-format7/subversion/svnserve/serve.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/svnserve/serve.c?rev=1507012&r1=1507011&r2=1507012&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/svnserve/serve.c (original)
+++ subversion/branches/fsfs-format7/subversion/svnserve/serve.c Thu Jul 25 15:29:49 2013
@@ -1441,6 +1441,7 @@ static svn_error_t *commit(svn_ra_svn_co
   if (lock_tokens && lock_tokens->nelts)
     SVN_CMD_ERR(add_lock_tokens(conn, lock_tokens, b, pool));
 
+  /* Ignore LOG_MSG, per the protocol.  See ra_svn_commit(). */
   if (revprop_list)
     SVN_ERR(svn_ra_svn__parse_proplist(revprop_list, pool, &revprop_table));
   else
@@ -2091,7 +2092,7 @@ static svn_error_t *log_receiver(void *b
   apr_hash_index_t *h;
   svn_boolean_t invalid_revnum = FALSE;
   const svn_string_t *author, *date, *message;
-  apr_uint64_t revprop_count;
+  unsigned revprop_count;
 
   if (log_entry->revision == SVN_INVALID_REVNUM)
     {

Modified: subversion/branches/fsfs-format7/subversion/svnserve/svnserve.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/svnserve/svnserve.c?rev=1507012&r1=1507011&r2=1507012&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/svnserve/svnserve.c (original)
+++ subversion/branches/fsfs-format7/subversion/svnserve/svnserve.c Thu Jul 25 15:29:49 2013
@@ -465,7 +465,7 @@ check_lib_versions(void)
     };
   SVN_VERSION_DEFINE(my_version);
 
-  return svn_ver_check_list(&my_version, checklist);
+  return svn_ver_check_list2(&my_version, checklist, svn_ver_equal);
 }
 
 

Modified: subversion/branches/fsfs-format7/subversion/svnsync/svnsync.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/svnsync/svnsync.c?rev=1507012&r1=1507011&r2=1507012&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/svnsync/svnsync.c (original)
+++ subversion/branches/fsfs-format7/subversion/svnsync/svnsync.c Thu Jul 25 15:29:49 2013
@@ -312,7 +312,7 @@ check_lib_versions(void)
     };
   SVN_VERSION_DEFINE(my_version);
 
-  return svn_ver_check_list(&my_version, checklist);
+  return svn_ver_check_list2(&my_version, checklist, svn_ver_equal);
 }
 
 

Modified: subversion/branches/fsfs-format7/subversion/svnversion/svnversion.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/svnversion/svnversion.c?rev=1507012&r1=1507011&r2=1507012&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/svnversion/svnversion.c (original)
+++ subversion/branches/fsfs-format7/subversion/svnversion/svnversion.c Thu Jul 25 15:29:49 2013
@@ -110,7 +110,7 @@ check_lib_versions(void)
     };
   SVN_VERSION_DEFINE(my_version);
 
-  return svn_ver_check_list(&my_version, checklist);
+  return svn_ver_check_list2(&my_version, checklist, svn_ver_equal);
 }
 
 /*

Modified: subversion/branches/fsfs-format7/subversion/tests/cmdline/basic_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/cmdline/basic_tests.py?rev=1507012&r1=1507011&r2=1507012&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/cmdline/basic_tests.py (original)
+++ subversion/branches/fsfs-format7/subversion/tests/cmdline/basic_tests.py Thu Jul 25 15:29:49 2013
@@ -3049,6 +3049,34 @@ def peg_rev_on_non_existent_wc_path(sbox
   svntest.actions.run_and_verify_svn(None, ['r2\n'], [],
                                      'cat', '-r2', sbox.ospath('mu3') + '@3')
 
+
+@Issue(4299)
+def basic_youngest(sbox):
+  'basic youngest'
+
+  sbox.build(read_only=True)
+
+  repos_url = sbox.repo_url
+  deep_repos_url = repos_url + '/A/D/G'
+
+  wc_dir = sbox.wc_dir
+  deep_wc_dir = os.path.join(wc_dir, 'A', 'B', 'E', 'alpha')
+  bad_wc_dir = os.path.join(wc_dir, 'Z')
+
+  svntest.actions.run_and_verify_svn("'svn youngest' on bad WC path",
+                                     None, svntest.verify.AnyOutput,
+                                     'youngest', bad_wc_dir)
+
+  for flag, output in [(False, "1\n"), (True, "1")]:
+    for path in [repos_url, deep_repos_url, wc_dir, deep_wc_dir]:
+      if flag:
+        svntest.actions.run_and_verify_svn("svn youngest", [output], [],
+                                           'youngest', '--no-newline', path)
+      else:
+        svntest.actions.run_and_verify_svn("svn youngest", [output], [],
+                                           'youngest', path)
+
+
 ########################################################################
 # Run the tests
 
@@ -3117,6 +3145,7 @@ test_list = [ None,
               rm_missing_with_case_clashing_ondisk_item,
               delete_conflicts_one_of_many,
               peg_rev_on_non_existent_wc_path,
+              basic_youngest,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/fsfs-format7/subversion/tests/cmdline/davautocheck.sh
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/cmdline/davautocheck.sh?rev=1507012&r1=1507011&r2=1507012&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/cmdline/davautocheck.sh (original)
+++ subversion/branches/fsfs-format7/subversion/tests/cmdline/davautocheck.sh Thu Jul 25 15:29:49 2013
@@ -318,7 +318,13 @@ HTTPD_PID="$HTTPD_ROOT/pid"
 HTTPD_ACCESS_LOG="$HTTPD_ROOT/access_log"
 HTTPD_ERROR_LOG="$HTTPD_ROOT/error_log"
 HTTPD_MIME_TYPES="$HTTPD_ROOT/mime.types"
-BASE_URL="http://localhost:$HTTPD_PORT"
+if [ -z "$BASE_URL" ]; then
+  BASE_URL="http://localhost:$HTTPD_PORT"
+else
+  # Specify the public name of the host when using a proxy on another host, the
+  # port number will be appended.
+  BASE_URL="$BASE_URL:$HTTPD_PORT"
+fi
 HTTPD_USERS="$HTTPD_ROOT/users"
 
 mkdir "$HTTPD_ROOT" \
@@ -522,7 +528,7 @@ rm "$HTTPD_CFG-copy"
 say "HTTPD is good"
 
 if [ $# -eq 1 ] && [ "x$1" = 'x--no-tests' ]; then
-  echo "http://localhost:$HTTPD_PORT"
+  echo "http://localhost:$HTTPD_PORT/svn-test-work/repositories"
   exit
 fi
 

Modified: subversion/branches/fsfs-format7/subversion/tests/cmdline/diff_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/cmdline/diff_tests.py?rev=1507012&r1=1507011&r2=1507012&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/cmdline/diff_tests.py (original)
+++ subversion/branches/fsfs-format7/subversion/tests/cmdline/diff_tests.py Thu Jul 25 15:29:49 2013
@@ -4580,6 +4580,60 @@ def diff_missing_tree_conflict_victim(sb
   expected_output = [ ]
   svntest.actions.run_and_verify_svn(None, expected_output, [], 'diff', wc_dir)
 
+@Issue(4396)
+def diff_local_missing_obstruction(sbox):
+  "diff local missing and obstructed files"
+
+  sbox.build(read_only=True)
+  wc_dir = sbox.wc_dir
+
+  os.unlink(sbox.ospath('iota'))
+  os.unlink(sbox.ospath('A/mu'))
+  os.mkdir(sbox.ospath('A/mu'))
+
+  # Expect no output for missing and obstructed files
+  expected_output = [
+  ]
+  svntest.actions.run_and_verify_svn(None, expected_output, [], 'diff', wc_dir)
+
+  sbox.simple_propset('K', 'V', 'iota', 'A/mu')
+  sbox.simple_append('IotA', 'Content')
+
+  # But do expect a proper property diff
+  expected_output = [
+    'Index: %s\n' % (sbox.path('A/mu'),),
+    '===================================================================\n',
+    '--- %s\t(revision 1)\n' % (sbox.path('A/mu'),),
+    '+++ %s\t(working copy)\n' % (sbox.path('A/mu'),),
+    '\n',
+    'Property changes on: %s\n' % (sbox.path('A/mu'),),
+    '___________________________________________________________________\n',
+    'Added: K\n',
+    '## -0,0 +1 ##\n',
+    '+V\n',
+    '\ No newline at end of property\n',
+    'Index: %s\n' % (sbox.path('iota'),),
+    '===================================================================\n',
+    '--- %s\t(revision 1)\n' % (sbox.path('iota'),),
+    '+++ %s\t(working copy)\n' % (sbox.path('iota'),),
+    '\n',
+    'Property changes on: %s\n' % (sbox.path('iota'),),
+    '___________________________________________________________________\n',
+    'Added: K\n',
+    '## -0,0 +1 ##\n',
+    '+V\n',
+    '\ No newline at end of property\n',
+  ]
+  svntest.actions.run_and_verify_svn(None, expected_output, [], 'diff', wc_dir)
+
+  # Create an external. This produces an error in 1.8.0.
+  sbox.simple_propset('svn:externals', 'AA/BB ' + sbox.repo_url + '/A', '.')
+  sbox.simple_update()
+
+  svntest.actions.run_and_verify_svn(None, svntest.verify.AnyOutput, [],
+                                     'diff', wc_dir)
+
+
 ########################################################################
 #Run the tests
 
@@ -4660,6 +4714,7 @@ test_list = [ None,
               diff_dir_replaced_by_dir,
               diff_repos_empty_file_addition,
               diff_missing_tree_conflict_victim,
+              diff_local_missing_obstruction,
               ]
 
 if __name__ == '__main__':

Modified: subversion/branches/fsfs-format7/subversion/tests/cmdline/getopt_tests_data/svn--help_stdout
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/cmdline/getopt_tests_data/svn--help_stdout?rev=1507012&r1=1507011&r2=1507012&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/cmdline/getopt_tests_data/svn--help_stdout (original)
+++ subversion/branches/fsfs-format7/subversion/tests/cmdline/getopt_tests_data/svn--help_stdout Thu Jul 25 15:29:49 2013
@@ -45,6 +45,7 @@ Available subcommands:
    unlock
    update (up)
    upgrade
+   youngest
 
 Subversion is a tool for version control.
 For additional information, see http://subversion.apache.org/

Modified: subversion/branches/fsfs-format7/subversion/tests/cmdline/getopt_tests_data/svn_help_stdout
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/cmdline/getopt_tests_data/svn_help_stdout?rev=1507012&r1=1507011&r2=1507012&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/cmdline/getopt_tests_data/svn_help_stdout (original)
+++ subversion/branches/fsfs-format7/subversion/tests/cmdline/getopt_tests_data/svn_help_stdout Thu Jul 25 15:29:49 2013
@@ -45,6 +45,7 @@ Available subcommands:
    unlock
    update (up)
    upgrade
+   youngest
 
 Subversion is a tool for version control.
 For additional information, see http://subversion.apache.org/

Modified: subversion/branches/fsfs-format7/subversion/tests/cmdline/stat_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/cmdline/stat_tests.py?rev=1507012&r1=1507011&r2=1507012&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/cmdline/stat_tests.py (original)
+++ subversion/branches/fsfs-format7/subversion/tests/cmdline/stat_tests.py Thu Jul 25 15:29:49 2013
@@ -2092,6 +2092,33 @@ def move_update_timestamps(sbox):
   # beta is modified so timestamp is removed
   no_text_timestamp(sbox.ospath('A/B/E2/beta'))
 
+@Issue(4398)
+def status_path_handling(sbox):
+  "relative/absolute path handling"
+
+  sbox.build(read_only=True)
+
+  # target is a relative path to a subdir
+  wc_dir = sbox.wc_dir
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+  svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
+  # target is an absolute path to a subdir
+  cwd = os.getcwd()
+  abs_wc_dir = os.path.join(cwd, wc_dir)
+  expected_status = svntest.actions.get_virginal_state(abs_wc_dir, 1)
+  svntest.actions.run_and_verify_status(abs_wc_dir, expected_status)
+
+  # target is an absolute path to a parent dir
+  os.chdir(sbox.ospath('A/B'))
+  expected_status = svntest.actions.get_virginal_state(abs_wc_dir, 1)
+  svntest.actions.run_and_verify_status(abs_wc_dir, expected_status)
+
+  # target is a relative path to a parent dir
+  rel_wc_dir = os.path.join('..', '..')
+  expected_status = svntest.actions.get_virginal_state(rel_wc_dir, 1)
+  svntest.actions.run_and_verify_status(rel_wc_dir, expected_status)
+
 ########################################################################
 # Run the tests
 
@@ -2139,6 +2166,7 @@ test_list = [ None,
               status_unversioned_dir,
               status_case_changed,
               move_update_timestamps,
+              status_path_handling,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/fsfs-format7/subversion/tests/cmdline/svntest/actions.py
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/cmdline/svntest/actions.py?rev=1507012&r1=1507011&r2=1507012&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/cmdline/svntest/actions.py (original)
+++ subversion/branches/fsfs-format7/subversion/tests/cmdline/svntest/actions.py Thu Jul 25 15:29:49 2013
@@ -1916,11 +1916,11 @@ def get_virginal_state(wc_dir, rev):
   return state
 
 # Cheap administrative directory locking
-def lock_admin_dir(wc_dir, recursive=False):
+def lock_admin_dir(wc_dir, recursive=False, work_queue=False):
   "Lock a SVN administrative directory"
   db, root_path, relpath = wc.open_wc_db(wc_dir)
 
-  svntest.main.run_wc_lock_tester(recursive, wc_dir)
+  svntest.main.run_wc_lock_tester(recursive, wc_dir, work_queue)
 
 def set_incomplete(wc_dir, revision):
   "Make wc_dir incomplete at revision"

Modified: subversion/branches/fsfs-format7/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/cmdline/svntest/main.py?rev=1507012&r1=1507011&r2=1507012&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/branches/fsfs-format7/subversion/tests/cmdline/svntest/main.py Thu Jul 25 15:29:49 2013
@@ -594,18 +594,30 @@ exclusive-locking = true
     if options.http_library:
       http_library_str = "http-library=%s" % (options.http_library)
     http_proxy_str = ""
+    http_proxy_username_str = ""
+    http_proxy_password_str = ""
     if options.http_proxy:
       http_proxy_parsed = urlparse("//" + options.http_proxy)
       http_proxy_str = "http-proxy-host=%s\n" % (http_proxy_parsed.hostname) + \
                        "http-proxy-port=%d" % (http_proxy_parsed.port or 80)
+    if options.http_proxy_username:
+      http_proxy_username_str = "http-proxy-username=%s" % \
+                                     (options.http_proxy_username)
+    if options.http_proxy_password:
+      http_proxy_password_str = "http-proxy-password=%s" % \
+                                     (options.http_proxy_password)
+
     server_contents = """
 #
 [global]
 %s
 %s
+%s
+%s
 store-plaintext-passwords=yes
 store-passwords=yes
-""" % (http_library_str, http_proxy_str)
+""" % (http_library_str, http_proxy_str, http_proxy_username_str,
+       http_proxy_password_str)
 
   file_write(cfgfile_cfg, config_contents)
   file_write(cfgfile_srv, server_contents)
@@ -788,9 +800,11 @@ def run_atomic_ra_revprop_change(url, re
                      url, revision, propname, skel,
                      want_error and 1 or 0, default_config_dir)
 
-def run_wc_lock_tester(recursive, path):
+def run_wc_lock_tester(recursive, path, work_queue=False):
   "Run the wc-lock obtainer tool, returning its exit code, stdout and stderr"
-  if recursive:
+  if work_queue:
+    option = "-w"
+  elif recursive:
     option = "-r"
   else:
     option = "-1"
@@ -1435,6 +1449,10 @@ class TestSpawningThread(threading.Threa
       args.append('--ssl-cert=' + options.ssl_cert)
     if options.http_proxy:
       args.append('--http-proxy=' + options.http_proxy)
+    if options.http_proxy_username:
+      args.append('--http-proxy-username=' + options.http_proxy_username)
+    if options.http_proxy_password:
+      args.append('--http-proxy-password=' + options.http_proxy_password)
     if options.exclusive_wc_locks:
       args.append('--exclusive-wc-locks')
 
@@ -1782,6 +1800,10 @@ def _create_parser():
                     help='Path to SSL server certificate.')
   parser.add_option('--http-proxy', action='store',
                     help='Use the HTTP Proxy at hostname:port.')
+  parser.add_option('--http-proxy-username', action='store',
+                    help='Username for the HTTP Proxy.')
+  parser.add_option('--http-proxy-password', action='store',
+                    help='Password for the HTTP Proxy.')
   parser.add_option('--tools-bin', action='store', dest='tools_bin',
                     help='Use the svn tools installed in this path')
   parser.add_option('--exclusive-wc-locks', action='store_true',

Modified: subversion/branches/fsfs-format7/subversion/tests/cmdline/wc_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/cmdline/wc_tests.py?rev=1507012&r1=1507011&r2=1507012&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/cmdline/wc_tests.py (original)
+++ subversion/branches/fsfs-format7/subversion/tests/cmdline/wc_tests.py Thu Jul 25 15:29:49 2013
@@ -339,6 +339,24 @@ def cleanup_dir_external(sbox):
                                      [], "cleanup", '--include-externals',
                                      sbox.ospath(""))
 
+@Issue(4390)
+def checkout_within_locked_wc(sbox):
+  """checkout within a locked working copy"""
+
+  sbox.build(read_only = True)
+
+  # lock working copy and create outstanding work queue items
+  svntest.actions.lock_admin_dir(sbox.ospath(""), True, True)
+  expected_output = [
+  "A    %s\n" % sbox.ospath("nested-wc/alpha"),
+  "A    %s\n" % sbox.ospath("nested-wc/beta"),
+  "Checked out revision 1.\n"
+  ]
+  svntest.actions.run_and_verify_svn(None, UnorderedOutput(expected_output),
+                                     [], "checkout", sbox.repo_url + '/A/B/E',
+                                     sbox.ospath("nested-wc"))
+
+
 ########################################################################
 # Run the tests
 
@@ -361,6 +379,7 @@ test_list = [ None,
               cleanup_unversioned_items,
               cleanup_unversioned_items_in_locked_wc,
               cleanup_dir_external,
+              checkout_within_locked_wc,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/config-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/config-test.c?rev=1507012&r1=1507011&r2=1507012&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/config-test.c (original)
+++ subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/config-test.c Thu Jul 25 15:29:49 2013
@@ -340,7 +340,7 @@ static svn_error_t *
 test_ignore_bom(apr_pool_t *pool)
 {
   svn_config_t *cfg;
-  svn_string_t *cfg_string = svn_string_create("\xEE\xBB\xBF[s1]\nfoo=bar\n",
+  svn_string_t *cfg_string = svn_string_create("\xEF\xBB\xBF[s1]\nfoo=bar\n",
                                                pool);
   svn_stream_t *stream = svn_stream_from_string(cfg_string, pool);
 
@@ -375,6 +375,6 @@ struct svn_test_descriptor_t test_funcs[
                    "test case-sensitive option name lookup"),
     SVN_TEST_PASS2(test_stream_interface,
                    "test svn_config_parse"),
-    SVN_TEST_XFAIL2(test_ignore_bom, "test parsing config file with BOM"),
+    SVN_TEST_PASS2(test_ignore_bom, "test parsing config file with BOM"),
     SVN_TEST_NULL
   };

Modified: subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/io-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/io-test.c?rev=1507012&r1=1507011&r2=1507012&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/io-test.c (original)
+++ subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/io-test.c Thu Jul 25 15:29:49 2013
@@ -26,10 +26,12 @@
 #include <stdio.h>
 
 #include <apr.h>
+#include <apr_version.h>
 
 #include "svn_pools.h"
 #include "svn_string.h"
 #include "private/svn_skel.h"
+#include "private/svn_dep_compat.h"
 
 #include "../svn_test.h"
 #include "../svn_test_fs.h"
@@ -507,6 +509,136 @@ read_length_line_shouldnt_loop(apr_pool_
   return SVN_NO_ERROR;
 }
 
+/* Move the read pointer in FILE to absolute position OFFSET and align
+ * the read buffer to multiples of BLOCK_SIZE.  Use POOL for allocations.
+ */
+static svn_error_t *
+aligned_seek(apr_file_t *file,
+             apr_size_t block_size,
+             apr_size_t offset,
+             apr_pool_t *pool)
+{
+  apr_off_t block_start;
+  apr_off_t current;
+
+  SVN_ERR(svn_io_file_aligned_seek(file, (apr_off_t)block_size,
+                                   &block_start, (apr_off_t)offset, pool));
+
+  /* block start shall be aligned to multiples of block_size.
+     If it isn't, it must be aligned to APR's default block size(pre-1.3 APR)
+   */
+#if APR_VERSION_AT_LEAST(1,3,0)
+  SVN_TEST_ASSERT(block_start % block_size == 0);
+  SVN_TEST_ASSERT(offset - block_start < block_size);
+#else
+  SVN_TEST_ASSERT(block_start % 0x1000 == 0);
+  SVN_TEST_ASSERT(offset - block_start < 0x1000);
+#endif
+
+  /* we must be at the desired offset */
+  current = 0;
+  SVN_ERR(svn_io_file_seek(file, SEEK_CUR, &current, pool));
+  SVN_TEST_ASSERT(current == (apr_off_t)offset);
+
+  return SVN_NO_ERROR;
+}
+
+/* Move the read pointer in FILE to absolute position OFFSET, align the
+ * read buffer to multiples of BLOCK_SIZE and read one byte from that
+ * position.  Verify that it matches the CONTENTS for that offset.
+ * Use POOL for allocations.
+ */
+static svn_error_t *
+aligned_read_at(apr_file_t *file,
+                svn_stringbuf_t *contents,
+                apr_size_t block_size,
+                apr_size_t offset,
+                apr_pool_t *pool)
+{
+  char c;
+  SVN_ERR(aligned_seek(file, block_size, offset,pool));
+
+  /* the data we read must match whatever we wrote there */
+  SVN_ERR(svn_io_file_getc(&c, file, pool));
+  SVN_TEST_ASSERT(c == contents->data[offset]);
+
+  return SVN_NO_ERROR;
+}
+
+/* Verify that aligned seek with the given BLOCK_SIZE works for FILE.
+ * CONTENTS is the data expected from FILE.  Use POOL for allocations.
+ */
+static svn_error_t *
+aligned_read(apr_file_t *file,
+             svn_stringbuf_t *contents,
+             apr_size_t block_size,
+             apr_pool_t *pool)
+{
+  apr_size_t i;
+  apr_size_t offset = 0;
+  const apr_size_t prime = 78427;
+
+  /* "random" access to different offsets */
+  for (i = 0, offset = prime; i < 10; ++i, offset += prime)
+    SVN_ERR(aligned_read_at(file, contents, block_size,
+                            offset % contents->len, pool));
+
+  /* we can seek to EOF */
+  SVN_ERR(aligned_seek(file, contents->len, block_size, pool));
+
+  /* reversed order access to all bytes */
+  for (i = contents->len; i > 0; --i)
+    SVN_ERR(aligned_read_at(file, contents, block_size, i - 1, pool));
+
+  /* forward order access to all bytes */
+  for (i = 0; i < contents->len; ++i)
+    SVN_ERR(aligned_read_at(file, contents, block_size, i, pool));
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+aligned_seek_test(apr_pool_t *pool)
+{
+  apr_size_t i;
+  const char *tmp_dir;
+  const char *tmp_file;
+  apr_file_t *f;
+  svn_stringbuf_t *contents;
+  const apr_size_t file_size = 100000;
+
+  /* create a temp folder & schedule it for automatic cleanup */
+
+  SVN_ERR(svn_dirent_get_absolute(&tmp_dir, "aligned_seek_tmp", pool));
+  SVN_ERR(svn_io_remove_dir2(tmp_dir, TRUE, NULL, NULL, pool));
+  SVN_ERR(svn_io_make_dir_recursively(tmp_dir, pool));
+  svn_test_add_dir_cleanup(tmp_dir);
+
+  /* create a temp file with know contents */
+
+  contents = svn_stringbuf_create_ensure(file_size, pool);
+  for (i = 0; i < file_size; ++i)
+    svn_stringbuf_appendbyte(contents, (char)rand());
+
+  SVN_ERR(svn_io_write_unique(&tmp_file, tmp_dir, contents->data,
+                              contents->len,
+                              svn_io_file_del_on_pool_cleanup, pool));
+
+  /* now, access read data with varying alignment sizes */
+  SVN_ERR(svn_io_file_open(&f, tmp_file, APR_READ | APR_BUFFERED,
+                           APR_OS_DEFAULT, pool));
+  SVN_ERR(aligned_read(f, contents,   0x1000, pool)); /* APR default */
+  SVN_ERR(aligned_read(f, contents,   0x8000, pool)); /* "unusual" 32K */
+  SVN_ERR(aligned_read(f, contents,  0x10000, pool)); /* FSX default */
+  SVN_ERR(aligned_read(f, contents, 0x100000, pool)); /* larger than file */
+  SVN_ERR(aligned_read(f, contents,    10001, pool)); /* odd, larger than
+                                                         APR default */
+  SVN_ERR(aligned_read(f, contents,     1003, pool)); /* odd, smaller than
+                                                         APR default */
+
+  return SVN_NO_ERROR;
+}
+
 
 /* The test table.  */
 
@@ -523,5 +655,7 @@ struct svn_test_descriptor_t test_funcs[
                    "three file content comparison"),
     SVN_TEST_PASS2(read_length_line_shouldnt_loop,
                    "svn_io_read_length_line() shouldn't loop"),
+    SVN_TEST_PASS2(aligned_seek_test,
+                   "test aligned seek"),
     SVN_TEST_NULL
   };

Modified: subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/string-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/string-test.c?rev=1507012&r1=1507011&r2=1507012&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/string-test.c (original)
+++ subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/string-test.c Thu Jul 25 15:29:49 2013
@@ -38,6 +38,7 @@
 
 #include "svn_io.h"
 #include "svn_error.h"
+#include "svn_sorts.h"    /* MIN / MAX */
 #include "svn_string.h"   /* This includes <apr_*.h> */
 #include "private/svn_string_private.h"
 
@@ -537,7 +538,42 @@ test24(apr_pool_t *pool)
   SVN_TEST_ASSERT(length == 20);
   SVN_TEST_STRING_ASSERT(buffer, "18446744073709551615");
 
-  return test_stringbuf_unequal("abc", "abb", pool);
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+sub_test_base36(apr_uint64_t value, const char *base36)
+{
+  char buffer[SVN_INT64_BUFFER_SIZE];
+  apr_size_t length;
+  apr_size_t expected_length = strlen(base36);
+  const char *end = buffer;
+  apr_uint64_t result;
+
+  length = svn__ui64tobase36(buffer, value);
+  SVN_TEST_ASSERT(length == expected_length);
+  SVN_TEST_STRING_ASSERT(buffer, base36);
+
+  result = svn__base36toui64(&end, buffer);
+  SVN_TEST_ASSERT(end - buffer == length);
+  SVN_TEST_ASSERT(result == value);
+
+  result = svn__base36toui64(NULL, buffer);
+  SVN_TEST_ASSERT(result == value);
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+test_base36(apr_pool_t *pool)
+{
+  SVN_ERR(sub_test_base36(0, "0"));
+  SVN_ERR(sub_test_base36(1234567890ull, "kf12oi"));
+  SVN_ERR(sub_test_base36(0x7fffffffffffffffull, "1y2p0ij32e8e7"));
+  SVN_ERR(sub_test_base36(0x8000000000000000ull, "1y2p0ij32e8e8"));
+  SVN_ERR(sub_test_base36(0xffffffffffffffffull, "3w5e11264sgsf"));
+
+  return SVN_NO_ERROR;
 }
 
 static svn_error_t *
@@ -711,6 +747,85 @@ test_string_similarity(apr_pool_t *pool)
   return SVN_NO_ERROR;
 }
 
+static svn_error_t *
+test_string_matching(apr_pool_t *pool)
+{
+  const struct test_data_t
+    {
+      const char *a;
+      const char *b;
+      apr_size_t match_len;
+      apr_size_t rmatch_len;
+    }
+  tests[] =
+    {
+      /* edge cases */
+      {"", "", 0, 0},
+      {"", "x", 0, 0},
+      {"x", "", 0, 0},
+      {"x", "x", 1, 1},
+      {"", "1234567890abcdef", 0, 0},
+      {"1234567890abcdef", "", 0, 0},
+      {"1234567890abcdef", "1234567890abcdef", 16, 16},
+
+      /* left-side matches */
+      {"x", "y", 0, 0},
+      {"ax", "ay", 1, 0},
+      {"ax", "a", 1, 0},
+      {"a", "ay", 1, 0},
+      {"1234567890abcdef", "1234567890abcdeg", 15, 0},
+      {"1234567890abcdef_", "1234567890abcdefg", 16, 0},
+      {"12345678_0abcdef", "1234567890abcdeg", 8, 0},
+      {"1234567890abcdef", "12345678", 8, 0},
+      {"12345678", "1234567890abcdef", 8, 0},
+      {"12345678_0ab", "1234567890abcdef", 8, 0},
+
+      /* right-side matches */
+      {"xa", "ya", 0, 1},
+      {"xa", "a", 0, 1},
+      {"a", "ya", 0, 1},
+      {"_234567890abcdef", "1234567890abcdef", 0, 15},
+      {"_1234567890abcdef", "x1234567890abcdef", 0, 16},
+      {"1234567_90abcdef", "_1234567890abcdef", 0, 8},
+      {"1234567890abcdef", "90abcdef", 0, 8},
+      {"90abcdef", "1234567890abcdef", 0, 8},
+      {"8_0abcdef", "7890abcdef", 0, 7},
+
+      /* two-side matches */
+      {"bxa", "bya", 1, 1},
+      {"bxa", "ba", 1, 1},
+      {"ba", "bya", 1, 1},
+      {"1234567_90abcdef", "1234567890abcdef", 7, 8},
+      {"12345678_90abcdef", "1234567890abcdef", 8, 8},
+      {"12345678_0abcdef", "1234567890abcdef", 8, 7},
+      {"123456_abcdef", "1234sdffdssdf567890abcdef", 4, 6},
+      {"1234567890abcdef", "12345678ef", 8, 2},
+      {"x_234567890abcdef", "x1234567890abcdef", 1, 15},
+      {"1234567890abcdefx", "1234567890abcdex", 15, 1},
+
+      /* list terminator */
+      {NULL}
+    };
+
+  const struct test_data_t *test;
+  for (test = tests; test->a != NULL; ++test)
+    {
+      apr_size_t a_len = strlen(test->a);
+      apr_size_t b_len = strlen(test->b);
+      apr_size_t max_match = MAX(a_len, b_len);
+      apr_size_t match_len
+        = svn_cstring__match_length(test->a, test->b, max_match);
+      apr_size_t rmatch_len
+        = svn_cstring__reverse_match_length(test->a + a_len, test->b + b_len,
+                                            max_match);
+
+      SVN_TEST_ASSERT(match_len == test->match_len);
+      SVN_TEST_ASSERT(rmatch_len == test->rmatch_len);
+    }
+  
+  return SVN_NO_ERROR;
+}
+
 /*
    ====================================================================
    If you add a new test to this file, update this array.
@@ -770,6 +885,8 @@ struct svn_test_descriptor_t test_funcs[
                    "compare stringbufs; same length, different content"),
     SVN_TEST_PASS2(test24,
                    "verify i64toa"),
+    SVN_TEST_PASS2(test_base36,
+                   "verify base36 conversion"),
     SVN_TEST_PASS2(test_stringbuf_insert,
                    "check inserting into svn_stringbuf_t"),
     SVN_TEST_PASS2(test_stringbuf_remove,
@@ -778,5 +895,7 @@ struct svn_test_descriptor_t test_funcs[
                    "check replacement in svn_stringbuf_t"),
     SVN_TEST_PASS2(test_string_similarity,
                    "test string similarity scores"),
+    SVN_TEST_PASS2(test_string_matching,
+                   "test string matching"),
     SVN_TEST_NULL
   };

Modified: subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/op-depth-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/op-depth-test.c?rev=1507012&r1=1507011&r2=1507012&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/op-depth-test.c (original)
+++ subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/op-depth-test.c Thu Jul 25 15:29:49 2013
@@ -1893,7 +1893,7 @@ check_db_actual(svn_test__sandbox_t* b, 
     {
       const char *local_relpath = svn_sqlite__column_text(stmt, 0, b->pool);
       if (!apr_hash_get(path_hash, local_relpath, APR_HASH_KEY_STRING))
-        return svn_error_createf(SVN_ERR_TEST_FAILED, svn_sqlite__close(sdb),
+        return svn_error_createf(SVN_ERR_TEST_FAILED, svn_sqlite__reset(stmt),
                                  "actual '%s' unexpected", local_relpath);
       apr_hash_set(path_hash, local_relpath, APR_HASH_KEY_STRING, NULL);
       SVN_ERR(svn_sqlite__step(&have_row, stmt));
@@ -1903,7 +1903,7 @@ check_db_actual(svn_test__sandbox_t* b, 
     {
       const char *local_relpath
         = svn__apr_hash_index_key(apr_hash_first(b->pool, path_hash));
-      return svn_error_createf(SVN_ERR_TEST_FAILED, svn_sqlite__close(sdb),
+      return svn_error_createf(SVN_ERR_TEST_FAILED, svn_sqlite__reset(stmt),
                                "actual '%s' expected", local_relpath);
     }
 
@@ -8149,6 +8149,63 @@ update_with_tree_conflict(const svn_test
   return SVN_NO_ERROR;
 }
 
+static svn_error_t *
+move_update_parent_replace(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  svn_test__sandbox_t b;
+
+  SVN_ERR(svn_test__sandbox_create(&b, "move_update_parent_replace", opts,
+                                   pool));
+
+  SVN_ERR(sbox_wc_mkdir(&b, "A"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B/C"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_delete(&b, "A/B"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_update(&b, "", 1));
+  SVN_ERR(sbox_wc_move(&b, "A/B/C", "A/C"));
+
+  /* Update breaks the move and leaves a conflict. */
+  SVN_ERR(sbox_wc_update(&b, "", 2));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",    "normal",       2, ""},
+      {0, "A",   "normal",       2, "A"},
+      {0, "A/B", "normal",       2, "A/B"},
+      {2, "A/C", "normal",       1, "A/B/C"},
+      {0}
+    };
+    actual_row_t actual[] = {
+      {"A/B", NULL},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+    SVN_ERR(check_db_actual(&b, actual));
+  }
+
+  SVN_ERR(sbox_wc_resolve(&b, "A/B", svn_depth_infinity,
+                          svn_wc_conflict_choose_mine_conflict));
+
+  {
+    nodes_row_t nodes[] = {
+      {0, "",    "normal",       2, ""},
+      {0, "A",   "normal",       2, "A"},
+      {0, "A/B", "normal",       2, "A/B"},
+      {2, "A/C", "normal",       1, "A/B/C"},
+      {0}
+    };
+    actual_row_t actual[] = {
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+    SVN_ERR(check_db_actual(&b, actual));
+  }
+
+  return SVN_NO_ERROR;
+}
+
 /* ---------------------------------------------------------------------- */
 /* The list of test functions */
 
@@ -8302,5 +8359,7 @@ struct svn_test_descriptor_t test_funcs[
                        "move/delete file externals (issue 4293)"),
     SVN_TEST_OPTS_PASS(update_with_tree_conflict,
                        "update with tree conflict (issue 4347)"),
+    SVN_TEST_OPTS_PASS(move_update_parent_replace,
+                       "move update with replaced parent (issue 4388)"),
     SVN_TEST_NULL
   };

Modified: subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/wc-lock-tester.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/wc-lock-tester.c?rev=1507012&r1=1507011&r2=1507012&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/wc-lock-tester.c (original)
+++ subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/wc-lock-tester.c Thu Jul 25 15:29:49 2013
@@ -35,16 +35,19 @@
 #include "private/svn_wc_private.h"
 #include "../../libsvn_wc/wc.h"
 #include "../../libsvn_wc/wc_db.h"
+#include "../../libsvn_wc/workqueue.h"
 
 #include "svn_private_config.h"
 
 #define USAGE_MSG \
-  "Usage: %s [-r|-1] DIRNAME\n" \
+  "Usage: %s [-1|-r|-w] DIRNAME\n" \
   "\n" \
-  "Locks one directory (-1), or a tree recursively (-r)\n"
+  "Locks one directory (-1), or a tree recursively (-r), or locks\n" \
+  "recursively and creates an outstanding work queue item (-w)\n"
 
 static svn_error_t *
 obtain_lock(const char *path, svn_boolean_t recursive,
+            svn_boolean_t populate_work_queue,
             apr_pool_t *scratch_pool)
 {
   const char *local_abspath;
@@ -52,9 +55,7 @@ obtain_lock(const char *path, svn_boolea
 
   SVN_ERR(svn_path_cstring_to_utf8(&path, path, scratch_pool));
   SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, scratch_pool));
-
-      SVN_ERR(svn_wc_context_create(&wc_ctx, NULL, scratch_pool,
-                                    scratch_pool));
+  SVN_ERR(svn_wc_context_create(&wc_ctx, NULL, scratch_pool, scratch_pool));
 
   if (recursive)
     {
@@ -68,6 +69,19 @@ obtain_lock(const char *path, svn_boolea
                                        scratch_pool));
     }
 
+  if (populate_work_queue)
+    {
+      svn_skel_t *work_item;
+
+      /* Add an arbitrary work item to the work queue for DB, but don't
+       * run the work queue. */
+      SVN_ERR(svn_wc__wq_build_sync_file_flags(&work_item, wc_ctx->db,
+                                               local_abspath, scratch_pool,
+                                               scratch_pool));
+      SVN_ERR(svn_wc__db_wq_add(wc_ctx->db, local_abspath, work_item,
+                                scratch_pool));
+    }
+
   SVN_ERR(svn_cmdline_printf(scratch_pool, "Lock on '%s' obtained, and we "
                              "are not going to release it.\n",
                              svn_dirent_local_style(local_abspath,
@@ -83,9 +97,11 @@ main(int argc, const char *argv[])
   int exit_code = EXIT_SUCCESS;
   svn_error_t *err;
   svn_boolean_t recursive;
+  svn_boolean_t populate_work_queue;
 
   if (argc != 3
-      || (strcmp(argv[1], "-1") && apr_strnatcmp(argv[1], "-r")))
+      || (strcmp(argv[1], "-1") && apr_strnatcmp(argv[1], "-r") &&
+          apr_strnatcmp(argv[1], "-w")))
     {
       fprintf(stderr, USAGE_MSG, argv[0]);
       exit(EXIT_FAILURE);
@@ -100,9 +116,10 @@ main(int argc, const char *argv[])
   /* set up the global pool */
   pool = svn_pool_create(NULL);
 
-  recursive = (strcmp(argv[1], "-1") != 0);
+  populate_work_queue = (strcmp(argv[1], "-w") == 0);
+  recursive = ((strcmp(argv[1], "-1") != 0) || populate_work_queue);
 
-  err = obtain_lock(argv[2], recursive, pool);
+  err = obtain_lock(argv[2], recursive, populate_work_queue, pool);
 
   if (err)
     {

Modified: subversion/branches/fsfs-format7/subversion/tests/svn_test_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/svn_test_fs.c?rev=1507012&r1=1507011&r2=1507012&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/svn_test_fs.c (original)
+++ subversion/branches/fsfs-format7/subversion/tests/svn_test_fs.c Thu Jul 25 15:29:49 2013
@@ -557,13 +557,13 @@ svn_test__validate_changes(svn_fs_root_t
     if (NULL == svn_hash_gets(actual, svn__apr_hash_index_key(hi)))
       return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
                                "Path '%s' missing from actual changed-paths",
-                               svn__apr_hash_index_key(hi));
+                               (const char *)svn__apr_hash_index_key(hi));
 
   for (hi = apr_hash_first(pool, actual); hi; hi = apr_hash_next(hi))
     if (NULL == svn_hash_gets(expected, svn__apr_hash_index_key(hi)))
       return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
                                "Path '%s' missing from expected changed-paths",
-                               svn__apr_hash_index_key(hi));
+                               (const char *)svn__apr_hash_index_key(hi));
 
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/fsfs-format7/tools/buildbot/slaves/win32-SharpSvn/svn-config.cmd.template
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/tools/buildbot/slaves/win32-SharpSvn/svn-config.cmd.template?rev=1507012&r1=1507011&r2=1507012&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/tools/buildbot/slaves/win32-SharpSvn/svn-config.cmd.template (original)
+++ subversion/branches/fsfs-format7/tools/buildbot/slaves/win32-SharpSvn/svn-config.cmd.template Thu Jul 25 15:29:49 2013
@@ -29,3 +29,22 @@ SET TMP=%TEMP%
 
 IF NOT EXIST "%TESTDIR%\" MKDIR "%TESTDIR%"
 IF NOT EXIST "%TEMP%\" MKDIR "%TEMP%"
+
+
+
+
+
+SET SVN_URL=
+SET SVN_RELURL=
+for /F "usebackq tokens=1,* delims=:" %%i IN (`svn info .`) do (
+
+  IF "%%i" == "URL" (
+    SET SVN_URL=%%j
+  ) ELSE IF "%%i" == "Relative URL" (
+    SET SVN_RELURL=%%j
+  )
+)
+SET SVN_URL=%SVN_URL:~1%
+SET SVN_RELURL=%SVN_RELURL:~3%
+SET SVN_SUBBRANCH=%SVN_RELURL:~11%
+SET SVN_BRANCH=%SVN_SUBBRANCH:branches/=%

Modified: subversion/branches/fsfs-format7/tools/buildbot/slaves/win32-SharpSvn/svntest-bindings.cmd
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/tools/buildbot/slaves/win32-SharpSvn/svntest-bindings.cmd?rev=1507012&r1=1507011&r2=1507012&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/tools/buildbot/slaves/win32-SharpSvn/svntest-bindings.cmd (original)
+++ subversion/branches/fsfs-format7/tools/buildbot/slaves/win32-SharpSvn/svntest-bindings.cmd Thu Jul 25 15:29:49 2013
@@ -22,10 +22,10 @@ SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDE
 
 CALL ..\svn-config.cmd
 IF ERRORLEVEL 1 EXIT /B 1
+ECHO ON
 
-svnversion . /1.6.x | find "S" > nul:
-IF ERRORLEVEL 1 (
-  ECHO --- Building 1.6.x: Skipping bindings ---
+IF "%SVN_BRANCH%" LEQ "1.6.x" (
+  ECHO --- Building 1.6.x or older: Skipping bindings ---
   EXIT /B 0
 )
 
@@ -34,52 +34,79 @@ SET result=0
 
 python win-tests.py -d -f fsfs --javahl "%TESTDIR%\tests"
 IF ERRORLEVEL 1 (
-  echo [python reported error %ERRORLEVEL%]
-  SET result=1
-)
-
-IF EXIST "%TESTDIR%\swig" rmdir /s /q "%TESTDIR%\swig"
-mkdir "%TESTDIR%\swig\py-release\libsvn"
-mkdir "%TESTDIR%\swig\py-release\svn"
-
-xcopy "release\subversion\bindings\swig\python\*.pyd" "%TESTDIR%\swig\py-release\libsvn\*.pyd" > nul:
-xcopy "release\subversion\bindings\swig\python\libsvn_swig_py\*.dll" "%TESTDIR%\swig\py-release\libsvn\*.dll" > nul:
-xcopy "subversion\bindings\swig\python\*.py" "%TESTDIR%\swig\py-release\libsvn\*.py" > nul:
-xcopy "subversion\bindings\swig\python\svn\*.py" "%TESTDIR%\swig\py-release\svn\*.py" > nul:
-
-SET PYTHONPATH=%TESTDIR%\swig\py-release
-
-python subversion\bindings\swig\python\tests\run_all.py
-IF ERRORLEVEL 1 (
-  echo [Python reported error %ERRORLEVEL%]
+  echo [python reported error !ERRORLEVEL!]
   SET result=1
 )
 
-mkdir "%TESTDIR%\swig\pl-release\SVN"
-mkdir "%TESTDIR%\swig\pl-release\auto\SVN"
-xcopy subversion\bindings\swig\perl\native\*.pm "%TESTDIR%\swig\pl-release\SVN" > nul:
-pushd release\subversion\bindings\swig\perl\native
-for %%i in (*.dll) do (
-  set name=%%i
-  mkdir "%TESTDIR%\swig\pl-release\auto\SVN\!name:~0,-4!"
-  xcopy "!name:~0,-4!.*" "%TESTDIR%\swig\pl-release\auto\SVN\!name:~0,-4!" > nul:
-  xcopy /y "_Core.dll" "%TESTDIR%\swig\pl-release\auto\SVN\!name:~0,-4!" > nul:
-)
-popd
+if "%SVN_BRANCH%" GTR "1.9." (
 
-svnversion . /1.7.x | find "S" > nul:
-IF ERRORLEVEL 1 (
-  ECHO --- Building 1.7.x: Skipping perl tests ---
-  EXIT /B %result%
-)
+    python win-tests.py -r -f fsfs --swig=python "%TESTDIR%\tests"
 
-SET PERL5LIB=%PERL5LIB%;%TESTDIR%\swig\pl-release;
-pushd subversion\bindings\swig\perl\native
-perl -MExtUtils::Command::MM -e test_harness() t\*.t
-IF ERRORLEVEL 1 (
-  echo [Perl reported error %ERRORLEVEL%]
-  SET result=1
+    IF ERRORLEVEL 1 (
+        echo [Python tests exited with error !ERRORLEVEL!]
+        SET result=1
+    )
+
+) ELSE (
+    IF EXIST "%TESTDIR%\swig" rmdir /s /q "%TESTDIR%\swig"
+    mkdir "%TESTDIR%\swig\py-release\libsvn"
+    mkdir "%TESTDIR%\swig\py-release\svn"
+
+    xcopy "release\subversion\bindings\swig\python\*.pyd" "%TESTDIR%\swig\py-release\libsvn\*.pyd" > nul:
+    xcopy "release\subversion\bindings\swig\python\libsvn_swig_py\*.dll" "%TESTDIR%\swig\py-release\libsvn\*.dll" > nul:
+    xcopy "subversion\bindings\swig\python\*.py" "%TESTDIR%\swig\py-release\libsvn\*.py" > nul:
+    xcopy "subversion\bindings\swig\python\svn\*.py" "%TESTDIR%\swig\py-release\svn\*.py" > nul:
+
+    SET PYTHONPATH=%TESTDIR%\swig\py-release
+
+    python subversion\bindings\swig\python\tests\run_all.py
+    IF ERRORLEVEL 1 (
+        echo [Python tests exited with error !ERRORLEVEL!]
+        SET result=1
+    )
+)
+
+if "%SVN_BRANCH%" GTR "1.9." (
+
+    python win-tests.py -d -f fsfs --swig=perl "%TESTDIR%\tests"
+
+    IF ERRORLEVEL 1 (
+        echo [Perl tests exited with error !ERRORLEVEL!]
+        SET result=1
+    )
+
+) ELSE IF "%SVN_BRANCH%" GTR "1.8." (
+
+    mkdir "%TESTDIR%\swig\pl-debug\SVN"
+    mkdir "%TESTDIR%\swig\pl-debug\auto\SVN"
+    xcopy subversion\bindings\swig\perl\native\*.pm "%TESTDIR%\swig\pl-debug\SVN" > nul:
+    pushd debug\subversion\bindings\swig\perl\native
+    for %%i in (*.dll) do (
+        set name=%%i
+        mkdir "%TESTDIR%\swig\pl-debug\auto\SVN\!name:~0,-4!"
+        xcopy "!name:~0,-4!.*" "%TESTDIR%\swig\pl-debug\auto\SVN\!name:~0,-4!" > nul:
+        xcopy /y "_Core.dll" "%TESTDIR%\swig\pl-debug\auto\SVN\!name:~0,-4!" > nul:
+    )
+    popd
+
+
+    SET PERL5LIB=%PERL5LIB%;%TESTDIR%\swig\pl-debug;
+    pushd subversion\bindings\swig\perl\native
+    perl -MExtUtils::Command::MM -e "test_harness()" t\*.t
+    IF ERRORLEVEL 1 (
+        echo [Perl reported error !ERRORLEVEL!]
+        SET result=1
+    )
+    popd
+)
+
+if "%SVN_BRANCH%" GTR "1.9." (
+  python win-tests.py -d -f fsfs --swig=ruby "%TESTDIR%\tests"
+
+  IF ERRORLEVEL 1 (
+    echo [Ruby tests reported error !ERRORLEVEL!] (not fatal)
+    REM SET result=1
+  )
 )
-popd
 
 exit /b %result%

Modified: subversion/branches/fsfs-format7/tools/buildbot/slaves/win32-SharpSvn/svntest-build-bindings.cmd
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/tools/buildbot/slaves/win32-SharpSvn/svntest-build-bindings.cmd?rev=1507012&r1=1507011&r2=1507012&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/tools/buildbot/slaves/win32-SharpSvn/svntest-build-bindings.cmd (original)
+++ subversion/branches/fsfs-format7/tools/buildbot/slaves/win32-SharpSvn/svntest-build-bindings.cmd Thu Jul 25 15:29:49 2013
@@ -23,14 +23,26 @@ SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDE
 CALL ..\svn-config.cmd
 IF ERRORLEVEL 1 EXIT /B 1
 
-svnversion . /1.6.x | find "S" > nul:
-IF ERRORLEVEL 1 (
+IF "%SVN_BRANCH%" LEQ "1.6.x" (
   ECHO --- Building 1.6.x: Skipping bindings ---
   EXIT /B 0
 )
 
-msbuild subversion_vcnet.sln /p:Configuration=Debug /p:Platform=win32 /t:__JAVAHL__ /t:__JAVAHL_TESTS__
+SET DEBUG_TARGETS=/t:__JAVAHL__ /t:__JAVAHL_TESTS__
+SET RELEASE_TARGETS=/t:__SWIG_PYTHON__
+
+if "%SVN_BRANCH%" GTR "1.8." (
+  SET DEBUG_TARGETS=%DEBUG_TARGETS% /t:__SWIG_PERL__
+)
+
+if "%SVN_BRANCH%" GTR "1.9." (
+  SET DEBUG_TARGETS=%DEBUG_TARGETS% /t:__SWIG_RUBY__
+)
+
+msbuild subversion_vcnet.sln /m /p:Configuration=Debug /p:Platform=win32 %DEBUG_TARGETS%
 IF ERRORLEVEL 1 EXIT /B 1
 
-msbuild subversion_vcnet.sln /p:Configuration=Release /p:Platform=win32 /t:__SWIG_PYTHON__ /t:__SWIG_PERL__
+msbuild subversion_vcnet.sln /p:Configuration=Release /p:Platform=win32 %RELEASE_TARGETS%
 IF ERRORLEVEL 1 EXIT /B 1
+
+EXIT /B 0
\ No newline at end of file