You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2022/01/14 14:01:51 UTC

svn commit: r1897034 [26/37] - in /subversion/branches/multi-wc-format: ./ build/ build/ac-macros/ build/generator/ build/generator/swig/ build/generator/templates/ contrib/client-side/ contrib/client-side/svn_load_dirs/ contrib/hook-scripts/ contrib/s...

Modified: subversion/branches/multi-wc-format/subversion/mod_authz_svn/mod_authz_svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/mod_authz_svn/mod_authz_svn.c?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/mod_authz_svn/mod_authz_svn.c (original)
+++ subversion/branches/multi-wc-format/subversion/mod_authz_svn/mod_authz_svn.c Fri Jan 14 14:01:45 2022
@@ -92,7 +92,7 @@ typedef struct authz_svn_config_rec {
 #    define USE_FORCE_AUTHN 1
 #    define IN_SOME_AUTHN_NOTE "authz_svn-in-some-authn"
 #    define FORCE_AUTHN_NOTE "authz_svn-force-authn"
-#  else 
+#  else
      /* ap_some_auth_required() is busted and no viable alternative exists */
 #    ifndef SVN_ALLOW_BROKEN_HTTPD_AUTH
 #      error This Apache httpd has broken auth (CVE-2015-3184)
@@ -327,16 +327,17 @@ log_access_verdict(LOG_ARGS_SIGNATURE,
     }
 }
 
-/* Log a message indiciating the ERR encountered during the request R.
+/* Log a message at LOG_LEVEL indicating the ERR encountered during
+ * the request R.
  * LOG_ARGS_SIGNATURE expands as in log_access_verdict() above.
  * PREFIX is inserted at the start of the message.  The rest of the
  * message is generated by combining the message for each error in the
  * chain of ERR, excluding for trace errors.  ERR will be cleared
  * when finished. */
 static void
-log_svn_error(LOG_ARGS_SIGNATURE,
-              request_rec *r, const char *prefix,
-              svn_error_t *err, apr_pool_t *scratch_pool)
+log_svn_message(LOG_ARGS_SIGNATURE, int log_level,
+                request_rec *r, const char *prefix,
+                svn_error_t *err, apr_pool_t *scratch_pool)
 {
   svn_error_t *err_pos = svn_error_purge_tracing(err);
   svn_stringbuf_t *buff = svn_stringbuf_create(prefix, scratch_pool);
@@ -360,7 +361,7 @@ log_svn_error(LOG_ARGS_SIGNATURE,
       err_pos = err_pos->child;
     }
 
-  ap_log_rerror(LOG_ARGS_CASCADE, APLOG_ERR,
+  ap_log_rerror(LOG_ARGS_CASCADE, log_level,
                 /* If it is an error code that APR can make sense of, then
                    show it, otherwise, pass zero to avoid putting "APR does
                    not understand this error code" in the error log. */
@@ -372,6 +373,40 @@ log_svn_error(LOG_ARGS_SIGNATURE,
   svn_error_clear(err);
 }
 
+/* Log the error error ERR encountered during the request R.
+ * LOG_ARGS_SIGNATURE expands as in log_access_verdict() above.
+ * PREFIX is inserted at the start of the message.  The rest of the
+ * message is generated by combining the message for each error in the
+ * chain of ERR, excluding for trace errors.  ERR will be cleared
+ * when finished. */
+static APR_INLINE void
+log_svn_error(LOG_ARGS_SIGNATURE,
+              request_rec *r, const char *prefix,
+              svn_error_t *err, apr_pool_t *scratch_pool)
+{
+  log_svn_message(LOG_ARGS_CASCADE, APLOG_ERR,
+                  r, prefix, err, scratch_pool);
+}
+
+/* Baton for log_authz_warning. */
+typedef struct authz_warning_baton_t
+{
+  request_rec *r;
+  const char *prefix;
+} authz_warning_baton_t;
+
+/* Handle an authz parser warning. ERR will *not* be cleared.*/
+static APR_INLINE void
+log_authz_warning(void *baton,
+                  const svn_error_t *err,
+                  apr_pool_t *scratch_pool)
+{
+  const authz_warning_baton_t *const warning_baton = baton;
+  log_svn_message(APLOG_MARK, APLOG_WARNING,
+                  warning_baton->r, warning_baton->prefix,
+                  svn_error_dup(err), scratch_pool);
+}
+
 /* Resolve *PATH into an absolute canonical URL iff *PATH is a repos-relative
  * URL.  If *REPOS_URL is NULL convert REPOS_PATH into a file URL stored
  * in *REPOS_URL, if *REPOS_URL is not null REPOS_PATH is ignored.  The
@@ -472,8 +507,13 @@ get_access_conf(request_rec *r, authz_sv
   access_conf = user_data;
   if (access_conf == NULL)
     {
-      svn_err = svn_repos_authz_read3(&access_conf, access_file,
+      authz_warning_baton_t warning_baton;
+      warning_baton.r = r;
+      warning_baton.prefix = "mod_authz_svn: warning:";
+
+      svn_err = svn_repos_authz_read4(&access_conf, access_file,
                                       groups_file, TRUE, NULL,
+                                      log_authz_warning, &warning_baton,
                                       r->connection->pool,
                                       scratch_pool);
 
@@ -714,9 +754,9 @@ req_check_access(request_rec *r,
    *
    * However, if repos_path == NULL and the request requires write
    * access, then perform a global authz lookup.  The request is
-   * denied if the user commiting isn't granted any access anywhere
+   * denied if the user committing isn't granted any access anywhere
    * in the repository.  This is to avoid operations that involve no
-   * paths (commiting an empty revision, leaving a dangling
+   * paths (committing an empty revision, leaving a dangling
    * transaction in the FS) being granted by default, letting
    * unauthenticated users write some changes to the repository.
    * This was issue #2388.
@@ -921,7 +961,7 @@ access_checker(request_rec *r)
           else
             return HTTP_FORBIDDEN;
         }
-    }    
+    }
 
 #else
   /* Support for older versions of httpd that have a working
@@ -1107,7 +1147,7 @@ register_hooks(apr_pool_t *p)
 module AP_MODULE_DECLARE_DATA authz_svn_module =
 {
   STANDARD20_MODULE_STUFF,
-  create_authz_svn_dir_config,     /* dir config creater */
+  create_authz_svn_dir_config,     /* dir config creator */
   NULL,                            /* dir merger --- default is to override */
   NULL,                            /* server config */
   NULL,                            /* merge server config */

Modified: subversion/branches/multi-wc-format/subversion/mod_dav_svn/dav_svn.h
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/mod_dav_svn/dav_svn.h?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/mod_dav_svn/dav_svn.h (original)
+++ subversion/branches/multi-wc-format/subversion/mod_dav_svn/dav_svn.h Fri Jan 14 14:01:45 2022
@@ -205,7 +205,7 @@ typedef struct dav_svn_root {
   */
   const char *activity_id;
 
-  /* If the root is part of a transaction, this contains the FS's tranaction
+  /* If the root is part of a transaction, this contains the FS's transaction
      name. It may be NULL if this root corresponds to a specific revision.
      It may also be NULL if we have not opened the root yet.
 
@@ -303,6 +303,9 @@ struct dav_resource_private {
   /* whether this resource parameters are fixed and won't change
      between requests. */
   svn_boolean_t idempotent;
+
+  /* resource is accessed by 'public' uri (not under "!svn") */
+  svn_boolean_t is_public_uri;
 };
 
 
@@ -1106,7 +1109,7 @@ int dav_svn__parse_request_skel(svn_skel
 /* Set *YOUNGEST_P to the number of the youngest revision in REPOS.
  *
  * Youngest revision will be cached in REPOS->YOUNGEST_REV to avoid
- * fetching the youngest revision multiple times during proccessing
+ * fetching the youngest revision multiple times during processing
  * the request.
  *
  * Uses SCRATCH_POOL for temporary allocations.

Modified: subversion/branches/multi-wc-format/subversion/mod_dav_svn/mirror.c
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/mod_dav_svn/mirror.c?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/mod_dav_svn/mirror.c (original)
+++ subversion/branches/multi-wc-format/subversion/mod_dav_svn/mirror.c Fri Jan 14 14:01:45 2022
@@ -97,7 +97,7 @@ int dav_svn__proxy_request_fixup(request
            ourselves -- but we need to make sure they aren't aimed at
            resources that only exist on the master server such as
            working resource URIs or the HTTPv2 transaction root and
-           transaction tree resouces. */
+           transaction tree resources. */
         if (r->method_number == M_PROPFIND ||
             r->method_number == M_GET) {
             if ((seg = ap_strstr(r->uri, root_dir))) {

Modified: subversion/branches/multi-wc-format/subversion/mod_dav_svn/mod_dav_svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/mod_dav_svn/mod_dav_svn.c?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/mod_dav_svn/mod_dav_svn.c (original)
+++ subversion/branches/multi-wc-format/subversion/mod_dav_svn/mod_dav_svn.c Fri Jan 14 14:01:45 2022
@@ -231,8 +231,8 @@ merge_server_config(apr_pool_t *p, void
       newconf->compression_level = child->compression_level;
     }
 
-  newconf->use_utf8 = INHERIT_VALUE(parent, child, use_utf8);                 
-  svn_utf_initialize2(newconf->use_utf8, p); 
+  newconf->use_utf8 = INHERIT_VALUE(parent, child, use_utf8);
+  svn_utf_initialize2(newconf->use_utf8, p);
 
   return newconf;
 }
@@ -292,10 +292,14 @@ merge_dir_config(apr_pool_t *p, void *ba
   if (parent->fs_path)
     ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL,
                  "mod_dav_svn: Location '%s' hinders access to '%s' "
-                 "in parent SVNPath Location '%s'",
+                 "in parent SVNPath Location '%s'%s",
                  child->root_dir,
                  svn_urlpath__skip_ancestor(parent->root_dir, child->root_dir),
-                 parent->root_dir);
+                 parent->root_dir,
+                 (strcmp(child->root_dir, parent->root_dir) == 0)
+                   ? " (or the subversion-specific configuration"
+                     " is included twice into httpd.conf)"
+                   : "");
 
   return newconf;
 }
@@ -1467,7 +1471,7 @@ register_hooks(apr_pool_t *pconf)
   /* translate_name hook is LAST so that it doesn't interfere with modules
    * like mod_alias that are MIDDLE. */
   ap_hook_translate_name(dav_svn__translate_name, NULL, NULL, APR_HOOK_LAST);
-  /* map_to_storage hook is LAST to avoid interferring with mod_http's
+  /* map_to_storage hook is LAST to avoid interfering with mod_http's
    * handling of OPTIONS and TRACE. */
   ap_hook_map_to_storage(dav_svn__map_to_storage, NULL, NULL, APR_HOOK_LAST);
 }

Modified: subversion/branches/multi-wc-format/subversion/mod_dav_svn/reports/file-revs.c
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/mod_dav_svn/reports/file-revs.c?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/mod_dav_svn/reports/file-revs.c (original)
+++ subversion/branches/multi-wc-format/subversion/mod_dav_svn/reports/file-revs.c Fri Jan 14 14:01:45 2022
@@ -333,7 +333,7 @@ dav_svn__file_revs_report(const dav_reso
   if ((serr = maybe_send_header(&frb)))
     {
       derr = dav_svn__convert_err(serr, HTTP_INTERNAL_SERVER_ERROR,
-                                  "Error beginning REPORT reponse",
+                                  "Error beginning REPORT response",
                                   resource->pool);
       goto cleanup;
     }
@@ -342,7 +342,7 @@ dav_svn__file_revs_report(const dav_reso
                                     "</S:file-revs-report>" DEBUG_CR)))
     {
       derr = dav_svn__convert_err(serr, HTTP_INTERNAL_SERVER_ERROR,
-                                  "Error ending REPORT reponse",
+                                  "Error ending REPORT response",
                                   resource->pool);
       goto cleanup;
     }

Modified: subversion/branches/multi-wc-format/subversion/mod_dav_svn/reports/list.c
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/mod_dav_svn/reports/list.c?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/mod_dav_svn/reports/list.c (original)
+++ subversion/branches/multi-wc-format/subversion/mod_dav_svn/reports/list.c Fri Jan 14 14:01:45 2022
@@ -141,7 +141,7 @@ list_receiver(const char *path,
     }
 
   SVN_ERR(maybe_send_header(b));
- 
+
   /* If we need to close the element, then send the attributes
      that apply to all changed items and then close the element. */
   SVN_ERR(dav_svn__brigade_printf(b->bb, b->output,
@@ -161,7 +161,7 @@ list_receiver(const char *path,
 
   /* In general APR will flush the brigade every 8000 bytes through the filter
      stack, but log items may not be generated that fast, especially in
-     combination with authz and busy servers. We now explictly flush after
+     combination with authz and busy servers. We now explicitly flush after
      direntry 4, 16, 64 and 256 to produce a few results fast.
 
      This introduces 4 full flushes of our brigade and the installed output
@@ -201,7 +201,7 @@ dav_svn__list_report(const dav_resource
   dav_svn__authz_read_baton arb;
   const dav_svn_repos *repos = resource->info->repos;
   int ns;
-  const char *full_path;
+  const char *full_path = NULL;
   svn_boolean_t path_info_only;
   svn_fs_root_t *root;
   svn_depth_t depth = svn_depth_unknown;
@@ -280,6 +280,12 @@ dav_svn__list_report(const dav_resource
       /* else unknown element; skip it */
     }
 
+  if (! full_path)
+    {
+      return dav_svn__new_error_svn(resource->pool, HTTP_BAD_REQUEST, 0, 0,
+                                    "Request was missing the path argument");
+    }
+
   /* Build authz read baton */
   arb.r = resource->info->r;
   arb.repos = resource->info->repos;

Modified: subversion/branches/multi-wc-format/subversion/mod_dav_svn/reports/log.c
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/mod_dav_svn/reports/log.c?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/mod_dav_svn/reports/log.c (original)
+++ subversion/branches/multi-wc-format/subversion/mod_dav_svn/reports/log.c Fri Jan 14 14:01:45 2022
@@ -61,7 +61,7 @@ struct log_receiver_baton
      callbacks. */
   svn_boolean_t needs_log_item;
 
-  /* How deep we are in the log message tree.  We only need to surpress the
+  /* How deep we are in the log message tree.  We only need to suppress the
      SVN_INVALID_REVNUM message if the stack_depth is 0. */
   int stack_depth;
 
@@ -125,7 +125,7 @@ start_path_with_copy_from(const char **e
 {
   switch (log_item->change_kind)
     {
-      case svn_fs_path_change_add: 
+      case svn_fs_path_change_add:
         *element = "S:added-path";
         break;
 
@@ -244,7 +244,7 @@ log_revision_receiver(void *baton,
   SVN_ERR(maybe_start_log_item(lrb));
   lrb->needs_log_item = TRUE;
 
-  /* Path changes have been processed already. 
+  /* Path changes have been processed already.
      Now send the remaining per-revision info. */
   SVN_ERR(dav_svn__brigade_printf(lrb->bb, lrb->output,
                                   "<D:version-name>%ld"
@@ -325,7 +325,7 @@ log_revision_receiver(void *baton,
 
   /* In general APR will flush the brigade every 8000 bytes through the filter
      stack, but log items may not be generated that fast, especially in
-     combination with authz and busy servers. We now explictly flush after
+     combination with authz and busy servers. We now explicitly flush after
      log-item 4, 16, 64 and 256 to produce a few results fast.
 
      This introduces 4 full flushes of our brigade and the installed output

Modified: subversion/branches/multi-wc-format/subversion/mod_dav_svn/repos.c
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/mod_dav_svn/repos.c?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/mod_dav_svn/repos.c (original)
+++ subversion/branches/multi-wc-format/subversion/mod_dav_svn/repos.c Fri Jan 14 14:01:45 2022
@@ -714,6 +714,8 @@ parse_uri(dav_resource_combined *comb,
       && ((ch = uri[len2]) == '/' || ch == '\0')
       && memcmp(uri, special_uri, len2) == 0)
     {
+      comb->priv.is_public_uri = FALSE;
+
       if (ch == '\0')
         {
           /* URI was "/root/!svn". It exists, but has restricted usage. */
@@ -789,6 +791,8 @@ parse_uri(dav_resource_combined *comb,
       /* The location of these resources corresponds directly to the URI,
          and we keep the leading "/". */
       comb->priv.repos_path = comb->priv.uri_path->data;
+
+      comb->priv.is_public_uri = TRUE;
     }
 
   return FALSE;
@@ -1225,25 +1229,32 @@ create_private_resource(const dav_resour
   return &comb->res;
 }
 
-
-static void log_warning(void *baton, svn_error_t *err)
+static void log_warning_req(void *baton, svn_error_t *err)
 {
   request_rec *r = baton;
   const char *continuation = "";
 
-  /* ### hmm. the FS is cleaned up at request cleanup time. "r" might
-     ### not really be valid. we should probably put the FS into a
-     ### subpool to ensure it gets cleaned before the request.
+  /* Not showing file/line so no point in tracing */
+  err = svn_error_purge_tracing(err);
+  while (err)
+    {
+      ap_log_rerror(APLOG_MARK, APLOG_ERR, APR_EGENERAL, r, "%s%s",
+                    continuation, err->message);
+      continuation = "-";
+      err = err->child;
+    }
+}
 
-     ### is there a good way to create and use a subpool for all
-     ### of our functions ... ??
-  */
+static void log_warning_conn(void *baton, svn_error_t *err)
+{
+  conn_rec *c = baton;
+  const char *continuation = "";
 
   /* Not showing file/line so no point in tracing */
   err = svn_error_purge_tracing(err);
   while (err)
     {
-      ap_log_rerror(APLOG_MARK, APLOG_ERR, APR_EGENERAL, r, "%s%s",
+      ap_log_cerror(APLOG_MARK, APLOG_ERR, APR_EGENERAL, c, "%s%s",
                     continuation, err->message);
       continuation = "-";
       err = err->child;
@@ -1547,6 +1558,24 @@ cleanup_fs_access(void *data)
   return APR_SUCCESS;
 }
 
+/* Context for cleanup handler. */
+struct cleanup_req_logging_baton
+{
+  svn_fs_t *fs;
+  conn_rec *connection;
+};
+
+static apr_status_t
+cleanup_req_logging(void *data)
+{
+  struct cleanup_req_logging_baton *baton = data;
+
+  /* The request about to be freed. Log future warnings with a connection
+   * context instead of a request context. */
+  svn_fs_set_warning_func(baton->fs, log_warning_conn, baton->connection);
+
+  return APR_SUCCESS;
+}
 
 /* Helper func to construct a special 'parentpath' private resource. */
 static dav_error *
@@ -1571,6 +1600,7 @@ get_parentpath_resource(request_rec *r,
   comb->priv.r = r;
   comb->priv.repos_path = "Collection of Repositories";
   comb->priv.root = *droot;
+  comb->priv.is_public_uri = TRUE;
   droot->rev = SVN_INVALID_REVNUM;
 
   comb->priv.repos = repos;
@@ -1945,7 +1975,7 @@ do_out_of_date_check(dav_resource_combin
          We have to check if whatever the node is in HEAD is equivalent
          to what it was in the provided BASE revision.
 
-         If the node was copied, we would process it before its decendants
+         If the node was copied, we would process it before its descendants
          and we already performed quite a few checks when making it mutable
          via its descendant, so what we should really check here is if the
          properties changed since the BASE version.
@@ -2180,6 +2210,7 @@ get_resource(request_rec *r,
   int had_slash;
   dav_locktoken_list *ltl;
   struct cleanup_fs_access_baton *cleanup_baton;
+  struct cleanup_req_logging_baton *cleanup_req_logging_baton;
   void *userdata;
   apr_hash_t *fs_config;
 
@@ -2486,7 +2517,15 @@ get_resource(request_rec *r,
   repos->fs = svn_repos_fs(repos->repos);
 
   /* capture warnings during cleanup of the FS */
-  svn_fs_set_warning_func(repos->fs, log_warning, r);
+  svn_fs_set_warning_func(repos->fs, log_warning_req, r);
+
+  /* We must degrade the logging context when the request is freed. */
+  cleanup_req_logging_baton =
+    apr_pcalloc(r->pool, sizeof(*cleanup_req_logging_baton));
+  cleanup_req_logging_baton->fs = repos->fs;
+  cleanup_req_logging_baton->connection = r->connection;
+  apr_pool_pre_cleanup_register(r->pool, cleanup_req_logging_baton,
+                                cleanup_req_logging);
 
   /* if an authenticated username is present, attach it to the FS */
   if (r->user)
@@ -3185,6 +3224,45 @@ set_headers(request_rec *r, const dav_re
   if (!resource->exists)
     return NULL;
 
+  if ((resource->type == DAV_RESOURCE_TYPE_REGULAR)
+      && resource->info->is_public_uri)
+    {
+      /* Include Last-Modified header for 'external' GET or HEAD requests
+         (i.e. requests to URI's not under /!svn), to support usage of an
+         SVN server as a file server, where the client needs timestamps
+         for instance to use as "last modification time" of files on disk. */
+
+      svn_revnum_t created_rev;
+      svn_string_t *date_str = NULL;
+
+      serr = svn_fs_node_created_rev(&created_rev, resource->info->root.root,
+                                     resource->info->repos_path,
+                                     resource->pool);
+
+      if (serr == NULL)
+        {
+          serr = svn_fs_revision_prop2(&date_str, resource->info->repos->fs,
+                                       created_rev, SVN_PROP_REVISION_DATE,
+                                       TRUE, resource->pool, resource->pool);
+        }
+
+      if ((serr == NULL) && date_str && date_str->data)
+        {
+          apr_time_t mtime;
+          serr = svn_time_from_cstring(&mtime, date_str->data, resource->pool);
+
+          if (serr == NULL)
+            {
+              /* Note the modification time for the requested resource, and
+                 include the Last-Modified header in the response. */
+              ap_update_mtime(r, mtime);
+              ap_set_last_modified(r);
+            }
+        }
+
+      svn_error_clear(serr);
+    }
+
   /* generate our etag and place it into the output */
   apr_table_setn(r->headers_out, "ETag",
                  dav_svn__getetag(resource, resource->pool));
@@ -3491,7 +3569,7 @@ emit_collection_entry(const dav_resource
 
   /* According to httpd-2.0.54/include/httpd.h, ap_os_escape_path()
      behaves differently on different platforms.  It claims to
-     "convert an OS path to a URL in an OS dependant way".
+     "convert an OS path to a URL in an OS dependent way".
      Nevertheless, there appears to be only one implementation
      of the function in httpd, and the code seems completely
      platform independent, so we'll assume it's appropriate for
@@ -4028,7 +4106,7 @@ create_collection(dav_resource *resource
                               "autoversioning is not active.");
 
   /* ### note that the parent was checked out at some point, and this
-     ### is being preformed relative to the working rsrc for that parent */
+     ### is being performed relative to the working rsrc for that parent */
 
   /* Auto-versioning mkcol of regular resource: */
   if (resource->type == DAV_RESOURCE_TYPE_REGULAR)
@@ -4207,7 +4285,7 @@ remove_resource(dav_resource *resource,
     }
 
   /* ### note that the parent was checked out at some point, and this
-     ### is being preformed relative to the working rsrc for that parent */
+     ### is being performed relative to the working rsrc for that parent */
 
   /* NOTE: strictly speaking, we cannot determine whether the parent was
      ever checked out, and that this working resource is relative to that

Modified: subversion/branches/multi-wc-format/subversion/mod_dav_svn/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/mod_dav_svn/util.c?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/mod_dav_svn/util.c (original)
+++ subversion/branches/multi-wc-format/subversion/mod_dav_svn/util.c Fri Jan 14 14:01:45 2022
@@ -525,7 +525,7 @@ dav_svn__brigade_write(apr_bucket_brigad
   if (apr_err)
     return svn_error_create(apr_err, 0, NULL);
   /* Check for an aborted connection, since the brigade functions don't
-     appear to be return useful errors when the connection is dropped. */
+     appear to return useful errors when the connection is dropped. */
   if (output->r->connection->aborted)
     return svn_error_create(SVN_ERR_APMOD_CONNECTION_ABORTED, 0, NULL);
   return SVN_NO_ERROR;
@@ -543,7 +543,7 @@ dav_svn__brigade_puts(apr_bucket_brigade
   if (apr_err)
     return svn_error_create(apr_err, 0, NULL);
   /* Check for an aborted connection, since the brigade functions don't
-     appear to be return useful errors when the connection is dropped. */
+     appear to return useful errors when the connection is dropped. */
   if (output->r->connection->aborted)
     return svn_error_create(SVN_ERR_APMOD_CONNECTION_ABORTED, 0, NULL);
   return SVN_NO_ERROR;
@@ -566,7 +566,7 @@ dav_svn__brigade_printf(apr_bucket_briga
   if (apr_err)
     return svn_error_create(apr_err, 0, NULL);
   /* Check for an aborted connection, since the brigade functions don't
-     appear to be return useful errors when the connection is dropped. */
+     appear to return useful errors when the connection is dropped. */
   if (output->r->connection->aborted)
     return svn_error_create(SVN_ERR_APMOD_CONNECTION_ABORTED, 0, NULL);
   return SVN_NO_ERROR;

Modified: subversion/branches/multi-wc-format/subversion/mod_dav_svn/version.c
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/mod_dav_svn/version.c?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/mod_dav_svn/version.c (original)
+++ subversion/branches/multi-wc-format/subversion/mod_dav_svn/version.c Fri Jan 14 14:01:45 2022
@@ -185,7 +185,7 @@ get_option(const dav_resource *resource,
   svn_version_t *master_version = dav_svn__get_master_version(r);
 
   /* These capabilities are used during commit and when configured as
-     a WebDAV slave (SVNMasterURI is set) their availablity should
+     a WebDAV slave (SVNMasterURI is set) their availability should
      depend on the master version (SVNMasterVersion is set) if it is
      older than our own version.  Also, although SVNDIFF1 is available
      before 1.10 none of those earlier servers advertised it so for
@@ -354,7 +354,7 @@ get_option(const dav_resource *resource,
         }
     }
 
-  /* Report commit capabilites. */
+  /* Report commit capabilities. */
   for (i = 0; i < sizeof(capabilities)/sizeof(capabilities[0]); ++i)
     {
       /* If a master version is declared filter out unsupported

Modified: subversion/branches/multi-wc-format/subversion/po/de.po
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/po/de.po?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/po/de.po [UTF-8] (original)
+++ subversion/branches/multi-wc-format/subversion/po/de.po [UTF-8] Fri Jan 14 14:01:45 2022
@@ -1556,7 +1556,7 @@ msgid "Certificate signature mismatch"
 msgstr "Signatur des Zertifikats stimmt nicht überein"
 
 #: ../include/svn_error_codes.h:1772
-msgid "Certficate verification failed"
+msgid "Certificate verification failed"
 msgstr "Überprüfung des Zertifikats fehlgeschlagen"
 
 #: ../libsvn_auth_gnome_keyring/gnome_keyring.c:290
@@ -6562,7 +6562,7 @@ msgstr "P2L-Indexeintrag für Revision r
 
 #: ../libsvn_fs_fs/verify.c:696
 #, fuzzy, c-format
-msgid "p2l index entry for changes in revision r%ld is item %ld of type %d at offset %s"
+msgid "p2l index entry for changes in revision r%ld is item %s of type %u at offset %s"
 msgstr "P2L-Indexeintrag für Revision r%ld ist nicht zusammenhängend zwischen Offsets  %s und %s"
 
 #: ../libsvn_fs_util/fs-util.c:164
@@ -17977,7 +17977,7 @@ msgid ""
 "Print the names of uncommitted transactions. With -rN skip the output\n"
 "of those that have a base revision more recent than rN.  Transactions\n"
 "with base revisions much older than HEAD are likely to have been\n"
-"abandonded and are candidates to be removed.\n"
+"abandoned and are candidates to be removed.\n"
 msgstr ""
 
 #: ../svnadmin/svnadmin.c:501

Modified: subversion/branches/multi-wc-format/subversion/po/it.po
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/po/it.po?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/po/it.po (original)
+++ subversion/branches/multi-wc-format/subversion/po/it.po Fri Jan 14 14:01:45 2022
@@ -4214,10 +4214,6 @@ msgstr ""
 msgid "authorization failed: %s"
 msgstr "autorizzazione non riuscita: %s"
 
-#: ../libsvn_ra_neon/util.c:630
-msgid "authorization failed"
-msgstr "autorizzazione fallita"
-
 #: ../libsvn_ra_neon/util.c:635
 msgid "could not connect to server"
 msgstr "non ho potuto connettermi al server"

Modified: subversion/branches/multi-wc-format/subversion/po/ja.po
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/po/ja.po?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/po/ja.po [UTF-8] (original)
+++ subversion/branches/multi-wc-format/subversion/po/ja.po [UTF-8] Fri Jan 14 14:01:45 2022
@@ -1688,7 +1688,7 @@ msgstr ""
 
 #: ../include/svn_error_codes.h:1752
 #, fuzzy
-msgid "Certficate verification failed"
+msgid "Certificate verification failed"
 msgstr "競合を解決できませんでした"
 
 #: ../libsvn_auth_gnome_keyring/gnome_keyring.c:152
@@ -17120,7 +17120,7 @@ msgid ""
 "Print the names of uncommitted transactions. With -rN skip the output\n"
 "of those that have a base revision more recent than rN.  Transactions\n"
 "with base revisions much older than HEAD are likely to have been\n"
-"abandonded and are candidates to be removed.\n"
+"abandoned and are candidates to be removed.\n"
 msgstr ""
 
 #: ../svnadmin/svnadmin.c:436

Modified: subversion/branches/multi-wc-format/subversion/po/ko.po
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/po/ko.po?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/po/ko.po [UTF-8] (original)
+++ subversion/branches/multi-wc-format/subversion/po/ko.po [UTF-8] Fri Jan 14 14:01:45 2022
@@ -1487,7 +1487,7 @@ msgstr ""
 
 #: ../include/svn_error_codes.h:1752
 #, fuzzy
-msgid "Certficate verification failed"
+msgid "Certificate verification failed"
 msgstr "충돌상황 해제에 실패하였습니다"
 
 #: ../libsvn_auth_gnome_keyring/gnome_keyring.c:152
@@ -16546,7 +16546,7 @@ msgid ""
 "Print the names of uncommitted transactions. With -rN skip the output\n"
 "of those that have a base revision more recent than rN.  Transactions\n"
 "with base revisions much older than HEAD are likely to have been\n"
-"abandonded and are candidates to be removed.\n"
+"abandoned and are candidates to be removed.\n"
 msgstr ""
 
 #: ../svnadmin/svnadmin.c:436

Modified: subversion/branches/multi-wc-format/subversion/po/pl.po
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/po/pl.po?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/po/pl.po [UTF-8] (original)
+++ subversion/branches/multi-wc-format/subversion/po/pl.po [UTF-8] Fri Jan 14 14:01:45 2022
@@ -1525,7 +1525,7 @@ msgstr ""
 
 #: ../include/svn_error_codes.h:1752
 #, fuzzy
-msgid "Certficate verification failed"
+msgid "Certificate verification failed"
 msgstr "Rozwiązanie konfliktu nie powiodło się"
 
 #: ../libsvn_auth_gnome_keyring/gnome_keyring.c:152
@@ -16715,7 +16715,7 @@ msgid ""
 "Print the names of uncommitted transactions. With -rN skip the output\n"
 "of those that have a base revision more recent than rN.  Transactions\n"
 "with base revisions much older than HEAD are likely to have been\n"
-"abandonded and are candidates to be removed.\n"
+"abandoned and are candidates to be removed.\n"
 msgstr ""
 
 #: ../svnadmin/svnadmin.c:436

Modified: subversion/branches/multi-wc-format/subversion/po/sv.po
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/po/sv.po?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/po/sv.po [UTF-8] (original)
+++ subversion/branches/multi-wc-format/subversion/po/sv.po [UTF-8] Fri Jan 14 14:01:45 2022
@@ -1556,7 +1556,7 @@ msgid "Certificate signature mismatch"
 msgstr "Certifikatssignaturen stämmer ej"
 
 #: ../include/svn_error_codes.h:1772
-msgid "Certficate verification failed"
+msgid "Certificate verification failed"
 msgstr "Certifikatskontrollen misslyckades"
 
 #: ../libsvn_auth_gnome_keyring/gnome_keyring.c:296
@@ -6854,8 +6854,8 @@ msgstr "p2l-indexpost för revision r%ld
 
 #: ../libsvn_fs_fs/verify.c:696
 #, c-format
-msgid "p2l index entry for changes in revision r%ld is item %ld of type %d at offset %s"
-msgstr "p2l-indexpost för ändringar i revision r%ld är objekt %ld av typ %d på position %s"
+msgid "p2l index entry for changes in revision r%ld is item %s of type %u at offset %s"
+msgstr "p2l-indexpost för ändringar i revision r%ld är objekt %s av typ %u på position %s"
 
 #: ../libsvn_fs_util/fs-util.c:164
 msgid "Filesystem object has not been opened yet"
@@ -19164,7 +19164,7 @@ msgid ""
 "Print the names of uncommitted transactions. With -rN skip the output\n"
 "of those that have a base revision more recent than rN.  Transactions\n"
 "with base revisions much older than HEAD are likely to have been\n"
-"abandonded and are candidates to be removed.\n"
+"abandoned and are candidates to be removed.\n"
 msgstr ""
 "Skriv namnen på oarkiverade transaktioner. Med -rN, hoppa över transaktioner\n"
 "med basrevision nyare än rN. Transaktioner med basrevisioner som är mycket\n"

Modified: subversion/branches/multi-wc-format/subversion/svn/blame-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/svn/blame-cmd.c?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/svn/blame-cmd.c (original)
+++ subversion/branches/multi-wc-format/subversion/svn/blame-cmd.c Fri Jan 14 14:01:45 2022
@@ -44,6 +44,7 @@ typedef struct blame_baton_t
   svn_stream_t *out;
   svn_stringbuf_t *sbuf;
 
+  svn_revnum_t start_revnum, end_revnum;
   int rev_maxlength;
 } blame_baton_t;
 
@@ -54,15 +55,13 @@ typedef struct blame_baton_t
    XML to stdout. */
 static svn_error_t *
 blame_receiver_xml(void *baton,
-                   svn_revnum_t start_revnum,
-                   svn_revnum_t end_revnum,
                    apr_int64_t line_no,
                    svn_revnum_t revision,
                    apr_hash_t *rev_props,
                    svn_revnum_t merged_revision,
                    apr_hash_t *merged_rev_props,
                    const char *merged_path,
-                   const char *line,
+                   const svn_string_t *line,
                    svn_boolean_t local_change,
                    apr_pool_t *pool)
 {
@@ -170,15 +169,13 @@ print_line_info(svn_stream_t *out,
 /* This implements the svn_client_blame_receiver3_t interface. */
 static svn_error_t *
 blame_receiver(void *baton,
-               svn_revnum_t start_revnum,
-               svn_revnum_t end_revnum,
                apr_int64_t line_no,
                svn_revnum_t revision,
                apr_hash_t *rev_props,
                svn_revnum_t merged_revision,
                apr_hash_t *merged_rev_props,
                const char *merged_path,
-               const char *line,
+               const svn_string_t *line,
                svn_boolean_t local_change,
                apr_pool_t *pool)
 {
@@ -188,19 +185,19 @@ blame_receiver(void *baton,
   svn_boolean_t use_merged = FALSE;
 
   if (!bb->rev_maxlength)
-    {
-      svn_revnum_t max_revnum = MAX(start_revnum, end_revnum);
-      /* The standard column width for the revision number is 6 characters.
-         If the revision number can potentially be larger (i.e. if the end_revnum
-          is larger than 1000000), we increase the column width as needed. */
-
-      bb->rev_maxlength = 6;
-      while (max_revnum >= 1000000)
-        {
-          bb->rev_maxlength++;
-          max_revnum = max_revnum / 10;
-        }
-    }
+  {
+    svn_revnum_t max_revnum = MAX(bb->start_revnum, bb->end_revnum);
+    /* The standard column width for the revision number is 6 characters.
+       If the revision number can potentially be larger (i.e. if the end_revnum
+        is larger than 1000000), we increase the column width as needed. */
+
+    bb->rev_maxlength = 6;
+    while (max_revnum >= 1000000)
+      {
+        bb->rev_maxlength++;
+        max_revnum = max_revnum / 10;
+      }
+  }
 
   if (opt_state->use_merge_history)
     {
@@ -237,7 +234,7 @@ blame_receiver(void *baton,
                             bb->rev_maxlength,
                             pool));
 
-  return svn_stream_printf(out, pool, "%s%s", line, APR_EOL_STR);
+  return svn_stream_printf(out, pool, "%s%s", line->data, APR_EOL_STR);
 }
 
 
@@ -333,7 +330,7 @@ svn_cl__blame(apr_getopt_t *os,
       const char *target = APR_ARRAY_IDX(targets, i, const char *);
       const char *truepath;
       svn_opt_revision_t peg_revision;
-      svn_client_blame_receiver3_t receiver;
+      svn_client_blame_receiver4_t receiver;
 
       svn_pool_clear(subpool);
       SVN_ERR(svn_cl__check_cancel(ctx->cancel_baton));
@@ -368,7 +365,8 @@ svn_cl__blame(apr_getopt_t *os,
       else
         receiver = blame_receiver;
 
-      err = svn_client_blame5(truepath,
+      err = svn_client_blame6(&bl.start_revnum, &bl.end_revnum,
+                              truepath,
                               &peg_revision,
                               &opt_state->start_revision,
                               &opt_state->end_revision,

Modified: subversion/branches/multi-wc-format/subversion/svn/cl-conflicts.c
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/svn/cl-conflicts.c?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/svn/cl-conflicts.c (original)
+++ subversion/branches/multi-wc-format/subversion/svn/cl-conflicts.c Fri Jan 14 14:01:45 2022
@@ -452,7 +452,7 @@ append_tree_conflict_info_xml(svn_string
                                      repos_root_url, repos_relpath, peg_rev,
                                      node_kind, pool));
 
-  SVN_ERR(svn_client_conflict_get_incoming_old_repos_location(&repos_relpath,
+  SVN_ERR(svn_client_conflict_get_incoming_new_repos_location(&repos_relpath,
                                                               &peg_rev,
                                                               &node_kind,
                                                               conflict,
@@ -529,7 +529,7 @@ svn_cl__append_conflict_info_xml(svn_str
                                          repos_root_url, repos_relpath, peg_rev,
                                          node_kind, scratch_pool));
 
-      SVN_ERR(svn_client_conflict_get_incoming_old_repos_location(
+      SVN_ERR(svn_client_conflict_get_incoming_new_repos_location(
                 &repos_relpath, &peg_rev, &node_kind, conflict,
                 scratch_pool, scratch_pool));
       if (repos_root_url && repos_relpath)
@@ -576,7 +576,7 @@ svn_cl__append_conflict_info_xml(svn_str
                                          repos_root_url, repos_relpath, peg_rev,
                                          node_kind, scratch_pool));
 
-      SVN_ERR(svn_client_conflict_get_incoming_old_repos_location(
+      SVN_ERR(svn_client_conflict_get_incoming_new_repos_location(
                 &repos_relpath, &peg_rev, &node_kind, conflict,
                 scratch_pool, scratch_pool));
       if (repos_root_url && repos_relpath)

Modified: subversion/branches/multi-wc-format/subversion/svn/cl.h
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/svn/cl.h?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/svn/cl.h (original)
+++ subversion/branches/multi-wc-format/subversion/svn/cl.h Fri Jan 14 14:01:45 2022
@@ -32,6 +32,7 @@
 #include <apr_tables.h>
 #include <apr_getopt.h>
 
+#include "svn_types.h"
 #include "svn_wc.h"
 #include "svn_client.h"
 #include "svn_string.h"
@@ -126,6 +127,16 @@ typedef enum svn_cl__show_revs_t {
 svn_cl__show_revs_t
 svn_cl__show_revs_from_word(const char *word);
 
+
+/* Unit types for file size conversion. */
+typedef enum svn_cl__size_unit_t
+  {
+    SVN_CL__SIZE_UNIT_NONE = 0,       /* Default, no conversion. */
+    SVN_CL__SIZE_UNIT_XML = -1,       /* Conversion for XML output. */
+    SVN_CL__SIZE_UNIT_BASE_10 = 1000, /* Use base-10 SI units. */
+    SVN_CL__SIZE_UNIT_BASE_2 = 1024   /* Use base-2 SI units. */
+  } svn_cl__size_unit_t;
+
 
 /*** Command dispatch. ***/
 
@@ -250,6 +261,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 remove_added;      /* reverting added item also removes it */
   svn_boolean_t no_newline;        /* do not output the trailing newline */
   svn_boolean_t show_passwords;    /* show cached passwords */
   svn_boolean_t pin_externals;     /* pin externals to last-changed revisions */
@@ -257,6 +269,7 @@ typedef struct svn_cl__opt_state_t
   svn_boolean_t adds_as_modification; /* update 'add vs add' no tree conflict */
   svn_boolean_t vacuum_pristines; /* remove unreferenced pristines */
   svn_boolean_t drop;             /* drop shelf after successful unshelve */
+  svn_cl__size_unit_t file_size_unit; /* file size format */
   enum svn_cl__viewspec_t {
       svn_cl__viewspec_unspecified = 0 /* default */,
       svn_cl__viewspec_classic,
@@ -276,6 +289,104 @@ typedef struct svn_cl__cmd_baton_t
 } svn_cl__cmd_baton_t;
 
 
+/* Add an identifier here for long options that don't have a short
+   option. Options that have both long and short options should just
+   use the short option letter as identifier.  */
+typedef enum svn_cl__longopt_t {
+  opt_auth_password = SVN_OPT_FIRST_LONGOPT_ID,
+  opt_auth_password_from_stdin,
+  opt_auth_username,
+  opt_autoprops,
+  opt_changelist,
+  opt_config_dir,
+  opt_config_options,
+  /* diff options */
+  opt_diff_cmd,
+  opt_internal_diff,
+  opt_no_diff_added,
+  opt_no_diff_deleted,
+  opt_show_copies_as_adds,
+  opt_notice_ancestry,
+  opt_summarize,
+  opt_use_git_diff_format,
+  opt_ignore_properties,
+  opt_properties_only,
+  opt_patch_compatible,
+  /* end of diff options */
+  opt_dry_run,
+  opt_editor_cmd,
+  opt_encoding,
+  opt_force_log,
+  opt_force,
+  opt_keep_changelists,
+  opt_ignore_ancestry,
+  opt_ignore_externals,
+  opt_incremental,
+  opt_merge_cmd,
+  opt_native_eol,
+  opt_new_cmd,
+  opt_no_auth_cache,
+  opt_no_autoprops,
+  opt_no_ignore,
+  opt_no_unlock,
+  opt_non_interactive,
+  opt_force_interactive,
+  opt_old_cmd,
+  opt_record_only,
+  opt_relocate,
+  opt_remove,
+  opt_revprop,
+  opt_stop_on_copy,
+  opt_strict,                   /* ### DEPRECATED */
+  opt_targets,
+  opt_depth,
+  opt_set_depth,
+  opt_version,
+  opt_xml,
+  opt_keep_local,
+  opt_with_revprop,
+  opt_with_all_revprops,
+  opt_with_no_revprops,
+  opt_parents,
+  opt_accept,
+  opt_show_revs,
+  opt_reintegrate,
+  opt_trust_server_cert,
+  opt_trust_server_cert_failures,
+  opt_strip,
+  opt_ignore_keywords,
+  opt_reverse_diff,
+  opt_ignore_whitespace,
+  opt_diff,
+  opt_allow_mixed_revisions,
+  opt_include_externals,
+  opt_show_inherited_props,
+  opt_search,
+  opt_search_and,
+  opt_mergeinfo_log,
+  opt_remove_unversioned,
+  opt_remove_ignored,
+  opt_remove_added,
+  opt_no_newline,
+  opt_show_passwords,
+  opt_pin_externals,
+  opt_show_item,
+  opt_adds_as_modification,
+  opt_vacuum_pristines,
+  opt_drop,
+  opt_viewspec,
+  opt_compatible_version,
+} svn_cl__longopt_t;
+
+/* Options for giving a log message.  (Some of these also have other uses.)
+ */
+#define SVN_CL__LOG_MSG_OPTIONS 'm', 'F', \
+                                opt_force_log, \
+                                opt_editor_cmd, \
+                                opt_encoding, \
+                                opt_with_revprop
+
+
 /* Declare all the command procedures */
 svn_opt_subcommand_t
   svn_cl__add,
@@ -310,14 +421,6 @@ svn_opt_subcommand_t
   svn_cl__revert,
   svn_cl__resolve,
   svn_cl__resolved,
-  svn_cl__shelf_diff,
-  svn_cl__shelf_drop,
-  svn_cl__shelf_list,
-  svn_cl__shelf_list_by_paths,
-  svn_cl__shelf_log,
-  svn_cl__shelf_save,
-  svn_cl__shelf_shelve,
-  svn_cl__shelf_unshelve,
   svn_cl__status,
   svn_cl__switch,
   svn_cl__unlock,
@@ -326,7 +429,7 @@ svn_opt_subcommand_t
 
 
 /* See definition in svn.c for documentation. */
-extern const svn_opt_subcommand_desc3_t svn_cl__cmd_table[];
+extern const svn_opt_subcommand_desc3_t *svn_cl__cmd_table;
 
 /* See definition in svn.c for documentation. */
 extern const int svn_cl__global_options[];
@@ -400,7 +503,7 @@ svn_error_t *
 svn_cl__print_conflict_stats(svn_cl__conflict_stats_t *conflict_stats,
                              apr_pool_t *scratch_pool);
 
-/* 
+/*
  * Interactively resolve the conflict a @a CONFLICT.
  * TODO: more docs
  */
@@ -417,7 +520,7 @@ svn_cl__resolve_conflict(svn_boolean_t *
                          svn_client_ctx_t *ctx,
                          apr_pool_t *scratch_pool);
 
-/* 
+/*
  * Interactively resolve conflicts for all TARGETS.
  * TODO: more docs
  */
@@ -432,7 +535,7 @@ svn_cl__walk_conflicts(apr_array_header_
 /*** Command-line output functions -- printing to the user. ***/
 
 /* Print out commit information found in COMMIT_INFO to the console.
- * POOL is used for temporay allocations.
+ * POOL is used for temporary allocations.
  * COMMIT_INFO should not be NULL.
  *
  * This function implements svn_commit_callback2_t.
@@ -722,6 +825,24 @@ svn_cl__node_kind_str_xml(svn_node_kind_
 const char *
 svn_cl__node_kind_str_human_readable(svn_node_kind_t kind);
 
+/* Set *RESULT to the size of a file, formatted according to BASE.
+   For base-10 and base-2 units, the size is constrained to at most
+   three significant digits.
+
+   If LONG_UNITS is TRUE, any unit suffixes will be the whole SI symbol,
+   e.g., KiB, MiB, etc; otherwise only the first letters will be used.
+
+   File sizes are never negative, so we don't handle that case other than
+   making sure that the scale adjustment will work.
+
+   The result will be allocated from RESULT_POOL. */
+svn_error_t *
+svn_cl__format_file_size(const char **result,
+                         svn_filesize_t size,
+                         svn_cl__size_unit_t base,
+                         svn_boolean_t long_units,
+                         apr_pool_t *result_pool);
+
 
 /** Provides an XML name for a given OPERATION.
  * Note: POOL is currently not used.
@@ -754,7 +875,7 @@ svn_cl__prop_use_t;
  *
  *   - start with svn: but do not exactly match a known property; or,
  *   - start with a 3-letter prefix that differs in only one letter
- *     from "svn:", and the rest exactly matches a known propery.
+ *     from "svn:", and the rest exactly matches a known properly.
  *
  * If REVPROP is TRUE, only check revision property names; otherwise
  * only check node property names.

Modified: subversion/branches/multi-wc-format/subversion/svn/conflict-callbacks.c
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/svn/conflict-callbacks.c?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/svn/conflict-callbacks.c (original)
+++ subversion/branches/multi-wc-format/subversion/svn/conflict-callbacks.c Fri Jan 14 14:01:45 2022
@@ -234,7 +234,7 @@ merge_prop_conflict(svn_stream_t *output
     my_propval = svn_string_create_empty(pool);
   if (their_propval == NULL)
     their_propval = svn_string_create_empty(pool);
-    
+
   options->ignore_eol_style = TRUE;
   SVN_ERR(svn_diff_mem_string_diff3(&diff, base_propval,
                                     merged_propval ?
@@ -361,7 +361,7 @@ edit_prop_conflict(const svn_string_t **
       svn_stringbuf_t *buf;
 
       SVN_ERR(svn_stringbuf_from_file2(&buf, file_path, scratch_pool));
-      *merged_propval = svn_string_create_from_buf(buf, result_pool); 
+      *merged_propval = svn_string_create_from_buf(buf, result_pool);
     }
 
   return SVN_NO_ERROR;
@@ -446,6 +446,12 @@ static const resolver_option_t builtin_r
   { "m", svn_client_conflict_option_sibling_move_file_text_merge },
   { "m", svn_client_conflict_option_sibling_move_dir_merge },
 
+  /* Options for incoming move vs local move. */
+  { "m", svn_client_conflict_option_both_moved_file_merge },
+  { "M", svn_client_conflict_option_both_moved_file_move_merge },
+  { "m", svn_client_conflict_option_both_moved_dir_merge },
+  { "M", svn_client_conflict_option_both_moved_dir_move_merge },
+
   { NULL }
 };
 
@@ -894,7 +900,7 @@ handle_text_conflict(svn_boolean_t *reso
   const char *their_abspath;
   const char *merged_abspath = svn_client_conflict_get_local_abspath(conflict);
   apr_array_header_t *text_conflict_options;
-  svn_client_conflict_option_id_t option_id; 
+  svn_client_conflict_option_id_t option_id;
 
   option_id = svn_client_conflict_option_unspecified;
 
@@ -1511,7 +1517,7 @@ build_tree_conflict_options(
                                      iterpool));
       if (opt == NULL)
         {
-          /* Unkown option. Assign a dynamic option code. */
+          /* Unknown option. Assign a dynamic option code. */
           opt = apr_pcalloc(result_pool, sizeof(*opt));
           opt->code = apr_psprintf(result_pool, "%d", next_unknown_option_code);
           next_unknown_option_code++;
@@ -1534,16 +1540,16 @@ build_tree_conflict_options(
           id != svn_client_conflict_option_accept_current_wc_state)
         *all_options_are_dumb = FALSE;
 
-        if (*possible_moved_to_repos_relpaths == NULL)
-          SVN_ERR(
-            svn_client_conflict_option_get_moved_to_repos_relpath_candidates2(
-              possible_moved_to_repos_relpaths, builtin_option,
-              result_pool, iterpool));
-
-        if (*possible_moved_to_abspaths == NULL)
-          SVN_ERR(svn_client_conflict_option_get_moved_to_abspath_candidates2(
-                    possible_moved_to_abspaths, builtin_option,
-                    result_pool, iterpool));
+      if (*possible_moved_to_repos_relpaths == NULL)
+        SVN_ERR(
+          svn_client_conflict_option_get_moved_to_repos_relpath_candidates2(
+            possible_moved_to_repos_relpaths, builtin_option,
+            result_pool, iterpool));
+
+      if (*possible_moved_to_abspaths == NULL)
+        SVN_ERR(svn_client_conflict_option_get_moved_to_abspath_candidates2(
+                  possible_moved_to_abspaths, builtin_option,
+                  result_pool, iterpool));
     }
 
   svn_pool_destroy(iterpool);
@@ -1553,11 +1559,11 @@ build_tree_conflict_options(
       /* Add move target choice options only if there are multiple
        * move targets to choose from. */
       if (strcmp(o->code, "d") == 0 &&
-          (*possible_moved_to_repos_relpaths == NULL || 
+          (*possible_moved_to_repos_relpaths == NULL ||
            (*possible_moved_to_repos_relpaths)->nelts <= 1))
         continue;
       if (strcmp(o->code, "w") == 0 &&
-          (*possible_moved_to_abspaths == NULL || 
+          (*possible_moved_to_abspaths == NULL ||
            (*possible_moved_to_abspaths)->nelts <= 1))
         continue;
 
@@ -1683,7 +1689,7 @@ find_conflict_option_with_repos_move_tar
   apr_pool_t *iterpool = svn_pool_create(scratch_pool);
   int i;
   apr_array_header_t *possible_moved_to_repos_relpaths = NULL;
-  
+
   *option_with_move_targets = NULL;
 
   for (i = 0; i < options->nelts; i++)
@@ -1714,7 +1720,7 @@ find_conflict_option_with_working_copy_m
   apr_pool_t *iterpool = svn_pool_create(scratch_pool);
   int i;
   apr_array_header_t *possible_moved_to_abspaths = NULL;
-  
+
   *option_with_move_targets = NULL;
 
   for (i = 0; i < options->nelts; i++)

Modified: subversion/branches/multi-wc-format/subversion/svn/info-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/svn/info-cmd.c?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/svn/info-cmd.c (original)
+++ subversion/branches/multi-wc-format/subversion/svn/info-cmd.c Fri Jan 14 14:01:45 2022
@@ -46,6 +46,8 @@
 #include "svn_private_config.h"
 #include "cl-conflicts.h"
 
+#include "private/svn_string_private.h"
+
 
 /*** Code. ***/
 
@@ -352,6 +354,7 @@ typedef enum
   info_item_relative_url,
   info_item_repos_root_url,
   info_item_repos_uuid,
+  info_item_repos_size,
 
   /* Working copy revision or repository HEAD revision */
   info_item_revision,
@@ -365,6 +368,7 @@ typedef enum
   info_item_wc_root,
   info_item_schedule,
   info_item_depth,
+  info_item_changelist,
   info_item_wc_format,
   info_item_wc_format_min,
   info_item_wc_format_max
@@ -377,27 +381,27 @@ typedef struct info_item_map_t
   const info_item_t print_what;
 } info_item_map_t;
 
-#define MAKE_STRING(x) { x, sizeof(x) - 1 }
 static const info_item_map_t info_item_map[] =
   {
-    { MAKE_STRING("kind"),                info_item_kind },
-    { MAKE_STRING("url"),                 info_item_url },
-    { MAKE_STRING("relative-url"),        info_item_relative_url },
-    { MAKE_STRING("repos-root-url"),      info_item_repos_root_url },
-    { MAKE_STRING("repos-uuid"),          info_item_repos_uuid },
-    { MAKE_STRING("revision"),            info_item_revision },
-    { MAKE_STRING("last-changed-revision"),
-                                          info_item_last_changed_rev },
-    { MAKE_STRING("last-changed-date"),   info_item_last_changed_date },
-    { MAKE_STRING("last-changed-author"), info_item_last_changed_author },
-    { MAKE_STRING("wc-root"),             info_item_wc_root },
-    { MAKE_STRING("schedule"),            info_item_schedule },
-    { MAKE_STRING("depth"),               info_item_depth },
-    { MAKE_STRING("wc-format"),           info_item_wc_format },
-    { MAKE_STRING("wc-format-min"),       info_item_wc_format_min },
-    { MAKE_STRING("wc-format-max"),       info_item_wc_format_max },
+    { SVN__STATIC_STRING("kind"),                info_item_kind },
+    { SVN__STATIC_STRING("url"),                 info_item_url },
+    { SVN__STATIC_STRING("relative-url"),        info_item_relative_url },
+    { SVN__STATIC_STRING("repos-root-url"),      info_item_repos_root_url },
+    { SVN__STATIC_STRING("repos-uuid"),          info_item_repos_uuid },
+    { SVN__STATIC_STRING("repos-size"),          info_item_repos_size },
+    { SVN__STATIC_STRING("revision"),            info_item_revision },
+    { SVN__STATIC_STRING("last-changed-revision"),
+                                                 info_item_last_changed_rev },
+    { SVN__STATIC_STRING("last-changed-date"),   info_item_last_changed_date },
+    { SVN__STATIC_STRING("last-changed-author"), info_item_last_changed_author },
+    { SVN__STATIC_STRING("wc-root"),             info_item_wc_root },
+    { SVN__STATIC_STRING("schedule"),            info_item_schedule },
+    { SVN__STATIC_STRING("depth"),               info_item_depth },
+    { SVN__STATIC_STRING("changelist"),          info_item_changelist },
+    { SVN__STATIC_STRING("wc-format"),           info_item_wc_format },
+    { SVN__STATIC_STRING("wc-format-min"),       info_item_wc_format_min },
+    { SVN__STATIC_STRING("wc-format-max"),       info_item_wc_format_max },
   };
-#undef MAKE_STRING
 
 static const apr_size_t info_item_map_len =
   (sizeof(info_item_map) / sizeof(info_item_map[0]));
@@ -425,6 +429,9 @@ typedef struct print_info_baton_t
   /* Did we already print a line of output? */
   svn_boolean_t start_new_line;
 
+  /* Format for file sizes */
+  svn_cl__size_unit_t file_size_unit;
+
   /* The client context. */
   svn_client_ctx_t *ctx;
 } print_info_baton_t;
@@ -513,21 +520,40 @@ print_info_xml(void *baton,
                apr_pool_t *pool)
 {
   svn_stringbuf_t *sb = svn_stringbuf_create_empty(pool);
-  const char *rev_str;
   print_info_baton_t *const receiver_baton = baton;
 
-  if (SVN_IS_VALID_REVNUM(info->rev))
-    rev_str = apr_psprintf(pool, "%ld", info->rev);
-  else
-    rev_str = apr_pstrdup(pool, _("Resource is not under version control."));
+  const char *const path_str =
+    svn_cl__local_style_skip_ancestor(
+        receiver_baton->path_prefix, target, pool);
+  const char *const kind_str = svn_cl__node_kind_str_xml(info->kind);
+  const char *const rev_str =
+    (SVN_IS_VALID_REVNUM(info->rev)
+     ? apr_psprintf(pool, "%ld", info->rev)
+     : apr_pstrdup(pool, _("Resource is not under version control.")));
 
   /* "<entry ...>" */
-  svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "entry",
-                        "path", svn_cl__local_style_skip_ancestor(
-                                  receiver_baton->path_prefix, target, pool),
-                        "kind", svn_cl__node_kind_str_xml(info->kind),
-                        "revision", rev_str,
-                        SVN_VA_NULL);
+  if (info->kind == svn_node_file && info->size != SVN_INVALID_FILESIZE)
+    {
+      const char *size_str;
+      SVN_ERR(svn_cl__format_file_size(&size_str, info->size,
+                                       SVN_CL__SIZE_UNIT_XML,
+                                       FALSE, pool));
+
+      svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "entry",
+                            "path", path_str,
+                            "kind", kind_str,
+                            "revision", rev_str,
+                            "size", size_str,
+                            SVN_VA_NULL);
+    }
+  else
+    {
+      svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "entry",
+                            "path", path_str,
+                            "kind", kind_str,
+                            "revision", rev_str,
+                            SVN_VA_NULL);
+    }
 
   /* "<url> xx </url>" */
   svn_cl__xml_tagged_cdata(&sb, pool, "url", info->URL);
@@ -749,6 +775,16 @@ print_info(void *baton,
       break;
     }
 
+  if (info->kind == svn_node_file && info->size != SVN_INVALID_FILESIZE)
+    {
+      const char *sizestr;
+      SVN_ERR(svn_cl__format_file_size(&sizestr, info->size,
+                                       receiver_baton->file_size_unit,
+                                       TRUE, pool));
+      SVN_ERR(svn_cmdline_printf(pool, _("Size in Repository: %s\n"),
+                                 sizestr));
+    }
+
   if (info->wc_info)
     {
       switch (info->wc_info->schedule)
@@ -1103,11 +1139,12 @@ print_info_item(void *baton,
                   apr_pool_t *pool)
 {
   print_info_baton_t *const receiver_baton = baton;
+  const char *const actual_target_path =
+    (!receiver_baton->target_is_path ? info->URL
+     : svn_cl__local_style_skip_ancestor(
+         receiver_baton->path_prefix, target, pool));
   const char *const target_path =
-    (!receiver_baton->multiple_targets ? NULL
-     : (!receiver_baton->target_is_path ? info->URL
-        : svn_cl__local_style_skip_ancestor(
-            receiver_baton->path_prefix, target, pool)));
+    (receiver_baton->multiple_targets ? actual_target_path : NULL);
 
   if (receiver_baton->start_new_line)
     SVN_ERR(svn_cmdline_fputs("\n", stdout, pool));
@@ -1136,6 +1173,36 @@ print_info_item(void *baton,
       SVN_ERR(print_info_item_string(info->repos_UUID, target_path, pool));
       break;
 
+    case info_item_repos_size:
+      if (info->kind != svn_node_file)
+        {
+          receiver_baton->start_new_line = FALSE;
+          return SVN_NO_ERROR;
+        }
+
+      if (info->size == SVN_INVALID_FILESIZE)
+        {
+          if (receiver_baton->multiple_targets)
+            {
+              receiver_baton->start_new_line = FALSE;
+              return SVN_NO_ERROR;
+            }
+
+          return svn_error_createf(
+              SVN_ERR_UNSUPPORTED_FEATURE, NULL,
+              _("can't show in-repository size of working copy file '%s'"),
+              actual_target_path);
+        }
+
+      {
+        const char *sizestr;
+        SVN_ERR(svn_cl__format_file_size(&sizestr, info->size,
+                                         receiver_baton->file_size_unit,
+                                         TRUE, pool));
+        SVN_ERR(print_info_item_string(sizestr, target_path, pool));
+      }
+      break;
+
     case info_item_revision:
       SVN_ERR(print_info_item_revision(info->rev, target_path, pool));
       break;
@@ -1196,6 +1263,13 @@ print_info_item(void *baton,
                                   target_path, pool));
       break;
 
+    case info_item_changelist:
+      SVN_ERR(print_info_item_string(
+                  ((info->wc_info && info->wc_info->changelist)
+                   ? info->wc_info->changelist : NULL),
+                  target_path, pool));
+      break;
+
     default:
       SVN_ERR_MALFUNCTION();
     }
@@ -1236,6 +1310,7 @@ svn_cl__info(apr_getopt_t *os,
   svn_opt_push_implicit_dot_target(targets, pool);
 
   receiver_baton.ctx = ctx;
+  receiver_baton.file_size_unit = opt_state->file_size_unit;
 
   if (opt_state->xml)
     {
@@ -1249,6 +1324,10 @@ svn_cl__info(apr_getopt_t *os,
         return svn_error_create(
             SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
             _("--no-newline is not valid in --xml mode"));
+      if (opt_state->file_size_unit != SVN_CL__SIZE_UNIT_NONE)
+        return svn_error_create(
+            SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+            _("--human-readable is not valid in --xml mode"));
 
       /* If output is not incremental, output the XML header and wrap
          everything in a top-level element. This makes the output in

Modified: subversion/branches/multi-wc-format/subversion/svn/list-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/svn/list-cmd.c?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/svn/list-cmd.c (original)
+++ subversion/branches/multi-wc-format/subversion/svn/list-cmd.c Fri Jan 14 14:01:45 2022
@@ -40,8 +40,13 @@
 
 /* Baton used when printing directory entries. */
 struct print_baton {
-  svn_boolean_t verbose;
   svn_client_ctx_t *ctx;
+  svn_boolean_t verbose;
+  svn_cl__size_unit_t file_size_unit;
+
+  /* Keep track of the width of the author field. */
+  int author_width;
+  int max_author_width;
 
   /* To keep track of last seen external information. */
   const char *last_external_parent_url;
@@ -49,12 +54,23 @@ struct print_baton {
   svn_boolean_t in_external;
 };
 
+/* Starting and maximum width of the author field */
+static const int initial_author_width = 8;
+static const int initial_human_readable_author_width = 14;
+static const int maximum_author_width = 16;
+static const int maximum_human_readable_author_width = 22;
+
+/* Width of the size field */
+static const int normal_size_width = 10;
+static const int human_readable_size_width = 4;
+
 /* Field flags required for this function */
 static const apr_uint32_t print_dirent_fields = SVN_DIRENT_KIND;
 static const apr_uint32_t print_dirent_fields_verbose = (
     SVN_DIRENT_KIND  | SVN_DIRENT_SIZE | SVN_DIRENT_TIME |
     SVN_DIRENT_CREATED_REV | SVN_DIRENT_LAST_AUTHOR);
 
+
 /* This implements the svn_client_list_func2_t API, printing a single
    directory entry in text format. */
 static svn_error_t *
@@ -121,7 +137,11 @@ print_dirent(void *baton,
       apr_status_t apr_err;
       apr_size_t size;
       char timestr[20];
-      const char *sizestr, *utf8_timestr;
+      const int sizewidth = (pb->file_size_unit == SVN_CL__SIZE_UNIT_NONE
+                             ? normal_size_width
+                             : human_readable_size_width);
+      const char *sizestr = "";
+      const char *utf8_timestr;
 
       /* svn_time_to_human_cstring gives us something *way* too long
          to use for this, so we have to roll our own.  We include
@@ -146,15 +166,33 @@ print_dirent(void *baton,
       /* we need it in UTF-8. */
       SVN_ERR(svn_utf_cstring_to_utf8(&utf8_timestr, timestr, scratch_pool));
 
-      sizestr = apr_psprintf(scratch_pool, "%" SVN_FILESIZE_T_FMT,
-                             dirent->size);
+      /* We may have to adjust the width of th 'author' field. */
+      if (dirent->last_author)
+        {
+          const int author_width = (int)strlen(dirent->last_author);
+          if (author_width > pb->author_width)
+            {
+              if (author_width < pb->max_author_width)
+                pb->author_width = author_width;
+              else
+                pb->author_width = pb->max_author_width;
+            }
+        }
+
+      if (dirent->kind == svn_node_file)
+        {
+          SVN_ERR(svn_cl__format_file_size(&sizestr, dirent->size,
+                                           pb->file_size_unit,
+                                           FALSE, scratch_pool));
+        }
 
       return svn_cmdline_printf
-              (scratch_pool, "%7ld %-8.8s %c %10s %12s %s%s\n",
+              (scratch_pool, "%7ld %-*.*s %c %*s %12s %s%s\n",
                dirent->created_rev,
+               pb->author_width, pb->author_width,
                dirent->last_author ? dirent->last_author : " ? ",
                lock ? 'O' : ' ',
-               (dirent->kind == svn_node_file) ? sizestr : "",
+               sizewidth, sizestr,
                utf8_timestr,
                entryname,
                (dirent->kind == svn_node_dir) ? "/" : "");
@@ -238,9 +276,11 @@ print_dirent_xml(void *baton,
 
   if (dirent->kind == svn_node_file)
     {
-      svn_cl__xml_tagged_cdata
-        (&sb, scratch_pool, "size",
-         apr_psprintf(scratch_pool, "%" SVN_FILESIZE_T_FMT, dirent->size));
+      const char *sizestr;
+      SVN_ERR(svn_cl__format_file_size(&sizestr, dirent->size,
+                                       SVN_CL__SIZE_UNIT_XML,
+                                       FALSE, scratch_pool));
+      svn_cl__xml_tagged_cdata(&sb, scratch_pool, "size", sizestr);
     }
 
   svn_xml_make_open_tag(&sb, scratch_pool, svn_xml_normal, "commit",
@@ -303,11 +343,17 @@ svn_cl__list(apr_getopt_t *os,
 
   if (opt_state->xml)
     {
-      /* The XML output contains all the information, so "--verbose"
-         does not apply. */
+      /* The XML output contains all the information, so "--verbose" does
+         not apply, and using "--human-readable" with machine-readable
+         output does not make sense. */
       if (opt_state->verbose)
-        return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
-                                _("'verbose' option invalid in XML mode"));
+        return svn_error_create(
+            SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+            _("--verbose is not valid in --xml mode"));
+      if (opt_state->file_size_unit != SVN_CL__SIZE_UNIT_NONE)
+        return svn_error_create(
+            SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+            _("--human-readable is not valid in --xml mode"));
 
       /* If output is not incremental, output the XML header and wrap
          everything in a top-level element. This makes the output in
@@ -318,9 +364,9 @@ svn_cl__list(apr_getopt_t *os,
   else
     {
       if (opt_state->incremental)
-        return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
-                                _("'incremental' option only valid in XML "
-                                  "mode"));
+        return svn_error_create(
+            SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+            _("--incremental is only valid in --xml mode"));
     }
 
   if (opt_state->xml)
@@ -332,6 +378,17 @@ svn_cl__list(apr_getopt_t *os,
 
   pb.ctx = ctx;
   pb.verbose = opt_state->verbose;
+  pb.file_size_unit = opt_state->file_size_unit;
+  if (pb.file_size_unit == SVN_CL__SIZE_UNIT_NONE)
+    {
+      pb.author_width = initial_author_width;
+      pb.max_author_width = maximum_author_width;
+    }
+  else
+    {
+      pb.author_width = initial_human_readable_author_width;
+      pb.max_author_width = maximum_human_readable_author_width;
+    }
 
   if (opt_state->depth == svn_depth_unknown)
     opt_state->depth = svn_depth_immediates;

Modified: subversion/branches/multi-wc-format/subversion/svn/log-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/svn/log-cmd.c?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/svn/log-cmd.c (original)
+++ subversion/branches/multi-wc-format/subversion/svn/log-cmd.c Fri Jan 14 14:01:45 2022
@@ -733,10 +733,6 @@ svn_cl__log(apr_getopt_t *os,
                                   "XML mode"));
     }
 
-  if (opt_state->quiet && opt_state->show_diff)
-    return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
-                            _("'quiet' and 'diff' options are "
-                              "mutually exclusive"));
   if (opt_state->diff.diff_cmd && (! opt_state->show_diff))
     return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
                             _("'diff-cmd' option requires 'diff' "

Modified: subversion/branches/multi-wc-format/subversion/svn/merge-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/svn/merge-cmd.c?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/svn/merge-cmd.c (original)
+++ subversion/branches/multi-wc-format/subversion/svn/merge-cmd.c Fri Jan 14 14:01:45 2022
@@ -545,27 +545,31 @@ retry:
                  "fix invalid mergeinfo in target with 'svn propset'"));
     }
 
-  /* Run the interactive resolver if conflicts were raised. */
-  SVN_ERR(svn_cl__conflict_stats_get_paths(&conflicted_paths, conflict_stats,
-                                           pool, pool));
-  if (conflicted_paths)
+  if (! opt_state->dry_run)
     {
-      SVN_ERR(svn_cl__walk_conflicts(conflicted_paths, conflict_stats,
-                                     opt_state, ctx, pool));
-      if (merge_err &&
-          svn_error_root_cause(merge_err)->apr_err == SVN_ERR_WC_FOUND_CONFLICT)
+      /* Run the interactive resolver if conflicts were raised. */
+      SVN_ERR(svn_cl__conflict_stats_get_paths(&conflicted_paths,
+                                               conflict_stats, pool, pool));
+      if (conflicted_paths)
         {
-          svn_error_t *err;
-
-          /* Check if all conflicts were resolved just now. */
-          err = svn_cl__conflict_stats_get_paths(&conflicted_paths,
-                                                 conflict_stats, pool, pool);
-          if (err)
-            merge_err = svn_error_compose_create(merge_err, err);
-          else if (conflicted_paths == NULL)
+          SVN_ERR(svn_cl__walk_conflicts(conflicted_paths, conflict_stats,
+                                         opt_state, ctx, pool));
+          if (merge_err && svn_error_root_cause(merge_err)->apr_err ==
+              SVN_ERR_WC_FOUND_CONFLICT)
             {
-              svn_error_clear(merge_err);
-              goto retry; /* ### conflicts resolved; continue merging */
+              svn_error_t *err;
+
+              /* Check if all conflicts were resolved just now. */
+              err = svn_cl__conflict_stats_get_paths(&conflicted_paths,
+                                                     conflict_stats,
+                                                     pool, pool);
+              if (err)
+                merge_err = svn_error_compose_create(merge_err, err);
+              else if (conflicted_paths == NULL)
+                {
+                  svn_error_clear(merge_err);
+                  goto retry; /* ### conflicts resolved; continue merging */
+                }
             }
         }
     }

Modified: subversion/branches/multi-wc-format/subversion/svn/notify.c
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/svn/notify.c?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/svn/notify.c (original)
+++ subversion/branches/multi-wc-format/subversion/svn/notify.c Fri Jan 14 14:01:45 2022
@@ -1197,6 +1197,12 @@ notify_body(struct notify_baton *nb,
       SVN_ERR(svn_cmdline_printf(pool, _("Committing transaction...\n")));
       break;
 
+    case svn_wc_notify_warning:
+      /* using handle_error rather than handle_warning in order to show the
+       * whole error chain; the latter only shows one error in the chain */
+      svn_handle_error2(n->err, stderr, FALSE, "svn: warning: ");
+      break;
+
     default:
       break;
     }

Modified: subversion/branches/multi-wc-format/subversion/svn/propedit-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/svn/propedit-cmd.c?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/svn/propedit-cmd.c (original)
+++ subversion/branches/multi-wc-format/subversion/svn/propedit-cmd.c Fri Jan 14 14:01:45 2022
@@ -143,7 +143,9 @@ svn_cl__propedit(apr_getopt_t *os,
       SVN_ERR(svn_cmdline__edit_string_externally(
                &propval, NULL,
                opt_state->editor_cmd, temp_dir,
-               propval, "svn-prop",
+               propval, 
+               apr_psprintf(pool, "svn-revprop-r%ld",
+                            opt_state->start_revision.value.number),
                ctx->config,
                svn_prop_needs_translation(pname),
                opt_state->encoding, pool));

Modified: subversion/branches/multi-wc-format/subversion/svn/resolve-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/svn/resolve-cmd.c?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/svn/resolve-cmd.c (original)
+++ subversion/branches/multi-wc-format/subversion/svn/resolve-cmd.c Fri Jan 14 14:01:45 2022
@@ -109,7 +109,7 @@ svn_cl__walk_conflicts(apr_array_header_
       svn_client_conflict_t *conflict;
 
       svn_pool_clear(iterpool);
- 
+
       SVN_ERR(svn_cl__check_cancel(ctx->cancel_baton));
 
       SVN_ERR(svn_dirent_get_absolute(&local_abspath, target, iterpool));

Modified: subversion/branches/multi-wc-format/subversion/svn/revert-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/svn/revert-cmd.c?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/svn/revert-cmd.c (original)
+++ subversion/branches/multi-wc-format/subversion/svn/revert-cmd.c Fri Jan 14 14:01:45 2022
@@ -71,7 +71,7 @@ svn_cl__revert(apr_getopt_t *os,
                            opt_state->changelists,
                            FALSE /* clear_changelists */,
                            FALSE /* metadata_only */,
-                           TRUE /*added_keep_local*/,
+                           !opt_state->remove_added /*added_keep_local*/,
                            ctx, scratch_pool);
   if (err
       && (err->apr_err == SVN_ERR_WC_INVALID_OPERATION_DEPTH)

Modified: subversion/branches/multi-wc-format/subversion/svn/schema/log.rnc
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/svn/schema/log.rnc?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/svn/schema/log.rnc (original)
+++ subversion/branches/multi-wc-format/subversion/svn/schema/log.rnc Fri Jan 14 14:01:45 2022
@@ -28,7 +28,8 @@ log = element log { logentry* }
 logentry =
   element logentry { attlist.logentry, author?, date?, paths?, msg?, revprops?, logentry* }
 attlist.logentry &=
-  attribute revision { revnum.type }
+  attribute revision { revnum.type },
+  attribute reverse-merge { "true" | "false" }?
 
 ## Changed paths information.
 paths = element paths { path+ }

Modified: subversion/branches/multi-wc-format/subversion/svn/shelf-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/svn/shelf-cmd.c?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/svn/shelf-cmd.c (original)
+++ subversion/branches/multi-wc-format/subversion/svn/shelf-cmd.c Fri Jan 14 14:01:45 2022
@@ -34,11 +34,13 @@
 #include "svn_pools.h"
 #include "svn_utf.h"
 
+#include "shelf-cmd.h"
 #include "cl.h"
 
 #include "svn_private_config.h"
 #include "private/svn_sorts_private.h"
 #include "private/svn_client_private.h"
+#include "private/svn_client_shelf.h"
 
 
 /* Open the newest version of SHELF; error if no versions found. */
@@ -838,8 +840,13 @@ shelf_shelve(int *new_version,
   return SVN_NO_ERROR;
 }
 
+static svn_error_t *
+svn_cl__shelf_shelve(apr_getopt_t *os,
+                     void *baton,
+                     apr_pool_t *pool);
+
 /* This implements the `svn_opt_subcommand_t' interface. */
-svn_error_t *
+static svn_error_t *
 svn_cl__shelf_save(apr_getopt_t *os,
                    void *baton,
                    apr_pool_t *pool)
@@ -852,7 +859,7 @@ svn_cl__shelf_save(apr_getopt_t *os,
 }
 
 /* This implements the `svn_opt_subcommand_t' interface. */
-svn_error_t *
+static svn_error_t *
 svn_cl__shelf_shelve(apr_getopt_t *os,
                      void *baton,
                      apr_pool_t *pool)
@@ -890,7 +897,7 @@ svn_cl__shelf_shelve(apr_getopt_t *os,
     else
       SVN_ERR(err);
 
-      if (! opt_state->quiet)
+    if (! opt_state->quiet)
       {
         if (opt_state->keep_local)
           SVN_ERR(svn_cmdline_printf(pool,
@@ -907,7 +914,7 @@ svn_cl__shelf_shelve(apr_getopt_t *os,
 }
 
 /* This implements the `svn_opt_subcommand_t' interface. */
-svn_error_t *
+static svn_error_t *
 svn_cl__shelf_unshelve(apr_getopt_t *os,
                        void *baton,
                        apr_pool_t *scratch_pool)
@@ -959,7 +966,7 @@ svn_cl__shelf_unshelve(apr_getopt_t *os,
 }
 
 /* This implements the `svn_opt_subcommand_t' interface. */
-svn_error_t *
+static svn_error_t *
 svn_cl__shelf_list(apr_getopt_t *os,
                    void *baton,
                    apr_pool_t *pool)
@@ -1083,7 +1090,7 @@ shelf_list_by_paths(apr_array_header_t *
 }
 
 /* This implements the `svn_opt_subcommand_t' interface. */
-svn_error_t *
+static svn_error_t *
 svn_cl__shelf_list_by_paths(apr_getopt_t *os,
                             void *baton,
                             apr_pool_t *pool)
@@ -1103,7 +1110,7 @@ svn_cl__shelf_list_by_paths(apr_getopt_t
 }
 
 /* This implements the `svn_opt_subcommand_t' interface. */
-svn_error_t *
+static svn_error_t *
 svn_cl__shelf_diff(apr_getopt_t *os,
                    void *baton,
                    apr_pool_t *pool)
@@ -1135,7 +1142,7 @@ svn_cl__shelf_diff(apr_getopt_t *os,
 }
 
 /* This implements the `svn_opt_subcommand_t' interface. */
-svn_error_t *
+static svn_error_t *
 svn_cl__shelf_drop(apr_getopt_t *os,
                    void *baton,
                    apr_pool_t *pool)
@@ -1173,7 +1180,7 @@ svn_cl__shelf_drop(apr_getopt_t *os,
 }
 
 /* This implements the `svn_opt_subcommand_t' interface. */
-svn_error_t *
+static svn_error_t *
 svn_cl__shelf_log(apr_getopt_t *os,
                   void *baton,
                   apr_pool_t *pool)
@@ -1207,3 +1214,192 @@ svn_cl__shelf_log(apr_getopt_t *os,
 
   return SVN_NO_ERROR;
 }
+
+/**************************************************************************/
+
+/* This implements the `svn_opt_subcommand_t' interface. */
+static svn_error_t *
+svn_cl__wc_copy_mods(apr_getopt_t *os,
+                     void *baton,
+                     apr_pool_t *pool)
+{
+  svn_client_ctx_t *ctx = ((svn_cl__cmd_baton_t *) baton)->ctx;
+  const char *src_wc_abspath, *dst_wc_abspath;
+
+  SVN_ERR(get_next_argument(&src_wc_abspath, os, pool, pool));
+  SVN_ERR(svn_dirent_get_absolute(&src_wc_abspath, src_wc_abspath, pool));
+
+  SVN_ERR(get_next_argument(&dst_wc_abspath, os, pool, pool));
+  SVN_ERR(svn_dirent_get_absolute(&dst_wc_abspath, dst_wc_abspath, pool));
+
+  SVN_ERR(svn_client__wc_copy_mods(src_wc_abspath, dst_wc_abspath,
+                                   ctx->notify_func2, ctx->notify_baton2,
+                                   ctx, pool));
+
+  return SVN_NO_ERROR;
+}
+
+const svn_opt_subcommand_desc3_t
+svn_cl__cmd_table_shelf3[] =
+{
+  { "x-shelf-diff", svn_cl__shelf_diff, {0}, {N_(
+     "Show shelved changes as a diff.\n"
+     "usage: x-shelf-diff SHELF [VERSION]\n"
+     "\n"), N_(
+     "  Show the changes in SHELF:VERSION (default: latest) as a diff.\n"
+     "\n"), N_(
+     "  See also: 'svn diff --cl=svn:shelf:SHELF' which supports most options of\n"
+     "  'svn diff'.\n"
+     "\n"), N_(
+     "  The shelving feature is EXPERIMENTAL. This command is likely to change\n"
+     "  in the next release, and there is no promise of backward compatibility.\n"
+    )},
+    {opt_summarize},
+  },
+
+  { "x-shelf-drop", svn_cl__shelf_drop, {0}, {N_(
+     "Delete a shelf.\n"
+     "usage: x-shelf-drop SHELF [PATH ...]\n"
+     "\n"), N_(
+     "  Delete the shelves named SHELF from the working copies containing PATH\n"
+     "  (default PATH is '.')\n"
+     "\n"), N_(
+     "  The shelving feature is EXPERIMENTAL. This command is likely to change\n"
+     "  in the next release, and there is no promise of backward compatibility.\n"
+    )},
+  },
+
+  { "x-shelf-list", svn_cl__shelf_list, {"x-shelves"}, {N_(
+     "List shelves.\n"
+     "usage: x-shelf-list [PATH ...]\n"
+     "\n"), N_(
+     "  List shelves for each working copy containing PATH (default is '.')\n"
+     "  Include the first line of any log message and some details about the\n"
+     "  contents of the shelf, unless '-q' is given.\n"
+     "\n"), N_(
+     "  The shelving feature is EXPERIMENTAL. This command is likely to change\n"
+     "  in the next release, and there is no promise of backward compatibility.\n"
+    )},
+    {'q', 'v'}
+  },
+
+  { "x-shelf-list-by-paths", svn_cl__shelf_list_by_paths, {0}, {N_(
+     "List which shelf affects each path.\n"
+     "usage: x-shelf-list-by-paths [PATH...]\n"
+     "\n"), N_(
+     "  List which shelf most recently affects each path below the given PATHs.\n"
+     "\n"), N_(
+     "  The shelving feature is EXPERIMENTAL. This command is likely to change\n"
+     "  in the next release, and there is no promise of backward compatibility.\n"
+    )},
+  },
+
+  { "x-shelf-log", svn_cl__shelf_log, {0}, {N_(
+     "Show the versions of a shelf.\n"
+     "usage: x-shelf-log SHELF [PATH...]\n"
+     "\n"), N_(
+     "  Show all versions of SHELF for each working copy containing PATH (the\n"
+     "  default PATH is '.').\n"
+     "\n"), N_(
+     "  The shelving feature is EXPERIMENTAL. This command is likely to change\n"
+     "  in the next release, and there is no promise of backward compatibility.\n"
+    )},
+    {'q', 'v'}
+  },
+
+  { "x-shelf-save", svn_cl__shelf_save, {0}, {N_(
+     "Copy local changes onto a new version of a shelf.\n"
+     "usage: x-shelf-save SHELF [PATH...]\n"
+     "\n"), N_(
+     "  Save local changes in the given PATHs as a new version of SHELF.\n"
+     "  The shelf's log message can be set with -m, -F, etc.\n"
+     "\n"), N_(
+     "  The same as 'svn shelve --keep-local'.\n"
+     "\n"), N_(
+     "  The shelving feature is EXPERIMENTAL. This command is likely to change\n"
+     "  in the next release, and there is no promise of backward compatibility.\n"
+    )},
+    {'q', opt_dry_run,
+     opt_depth, opt_targets, opt_changelist,
+     SVN_CL__LOG_MSG_OPTIONS,
+    }
+  },
+
+  { "x-shelve", svn_cl__shelf_shelve, {0}, {N_(
+     "Move local changes onto a shelf.\n"
+     "usage: x-shelve [--keep-local] SHELF [PATH...]\n"
+     "\n"), N_(
+     "  Save the local changes in the given PATHs to a new or existing SHELF.\n"
+     "  Revert those changes from the WC unless '--keep-local' is given.\n"
+     "  The shelf's log message can be set with -m, -F, etc.\n"
+     "\n"), N_(
+     "  'svn shelve --keep-local' is the same as 'svn shelf-save'.\n"
+     "\n"), N_(
+     "  The kinds of change you can shelve are committable changes to files and\n"
+     "  properties, except the following kinds which are not yet supported:\n"
+     "     * copies and moves\n"
+     "     * mkdir and rmdir\n"
+     "  Uncommittable states such as conflicts, unversioned and missing cannot\n"
+     "  be shelved.\n"
+     "\n"), N_(
+     "  To bring back shelved changes, use 'svn unshelve SHELF'.\n"
+     "\n"), N_(
+     "  Shelves are currently stored under <WC>/.svn/experimental/shelves/ .\n"
+     "  (In Subversion 1.10, shelves were stored under <WC>/.svn/shelves/ as\n"
+     "  patch files. To recover a shelf created by 1.10, either use a 1.10\n"
+     "  client to find and unshelve it, or find the patch file and use any\n"
+     "  1.10 or later 'svn patch' to apply it.)\n"
+     "\n"), N_(
+     "  The shelving feature is EXPERIMENTAL. This command is likely to change\n"
+     "  in the next release, and there is no promise of backward compatibility.\n"
+    )},
+    {'q', opt_dry_run, opt_keep_local,
+     opt_depth, opt_targets, opt_changelist,
+     SVN_CL__LOG_MSG_OPTIONS,
+    } },
+
+  { "x-unshelve", svn_cl__shelf_unshelve, {0}, {N_(
+     "Copy shelved changes back into the WC.\n"
+     "usage: x-unshelve [--drop] [SHELF [VERSION]]\n"
+     "\n"), N_(
+     "  Apply the changes stored in SHELF to the working copy.\n"
+     "  SHELF defaults to the newest shelf.\n"
+     "\n"), N_(
+     "  Apply the newest version of the shelf, by default. If VERSION is\n"
+     "  specified, apply that version and discard all versions newer than that.\n"
+     "  In any case, retain the unshelved version and versions older than that\n"
+     "  (unless --drop is specified).\n"
+     "\n"), N_(
+     "  With --drop, delete the entire shelf (like 'svn shelf-drop') after\n"
+     "  successfully unshelving with no conflicts.\n"
+     "\n"), N_(
+     "  The working files involved should be in a clean, unmodified state\n"
+     "  before using this command. To roll back to an older version of the\n"
+     "  shelf, first ensure any current working changes are removed, such as\n"
+     "  by shelving or reverting them, and then unshelve the desired version.\n"
+     "\n"), N_(
+     "  Unshelve normally refuses to apply any changes if any path involved is\n"
+     "  already modified (or has any other abnormal status) in the WC. With\n"
+     "  --force, it does not check and may error out and/or produce partial or\n"
+     "  unexpected results.\n"
+     "\n"), N_(
+     "  The shelving feature is EXPERIMENTAL. This command is likely to change\n"
+     "  in the next release, and there is no promise of backward compatibility.\n"
+    )},
+    {opt_drop, 'q', opt_dry_run, opt_force} },
+
+  { "x-wc-copy-mods", svn_cl__wc_copy_mods, {0}, {N_(
+     "Copy local modifications from one WC to another.\n"
+     "usage: x-wc-copy-mods SRC_WC_PATH DST_WC_PATH\n"
+     "\n"), N_(
+     "  The source and destination WC paths may be in the same WC or in different"
+     "  WCs.\n"
+     "\n"), N_(
+     "  This feature is EXPERIMENTAL. This command is likely to change\n"
+     "  in the next release, and there is no promise of backward compatibility.\n"
+    )},
+  },
+
+  { NULL, NULL, {0}, {NULL}, {0} }
+};
+