Modified: subversion/branches/swig-py3/subversion/include/svn_repos.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/include/svn_repos.h?rev=1862754&r1=1862753&r2=1862754&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/include/svn_repos.h (original)
+++ subversion/branches/swig-py3/subversion/include/svn_repos.h Mon Jul  8 
15:19:03 2019
@@ -4147,6 +4147,19 @@ svn_error_t *
 svn_repos_authz_initialize(apr_pool_t *pool);
 
 /**
+ * Callback for reporting authz file parsing warnings.
+ *
+ * The implementation may use @a scratch_pool for temporary
+ * allocations but should not assume that the lifetime of that pool
+ * persists past the callback invocation.
+ *
+ * The implementation @e must @e not clear @a error.
+ */
+typedef void (*svn_repos_authz_warning_func_t)(void *baton,
+                                               const svn_error_t *error,
+                                               apr_pool_t *scratch_pool);
+
+/**
  * Read authz configuration data from @a path (a dirent, an absolute file url
  * or a registry path) into @a *authz_p, allocated in @a pool.
  *
@@ -4164,8 +4177,31 @@ svn_repos_authz_initialize(apr_pool_t *p
  * repository instance.  Otherwise, set it to NULL and the repositories will
  * be opened as needed.
  *
+ * If the @a warning_func callback is not @c NULL, it is called
+ * (with @a warning_baton) to report non-fatal warnings emitted by
+ * the parser.
+ *
+ * @since New in 1.12.
+ */
+svn_error_t *
+svn_repos_authz_read4(svn_authz_t **authz_p,
+                      const char *path,
+                      const char *groups_path,
+                      svn_boolean_t must_exist,
+                      svn_repos_t *repos_hint,
+                      svn_repos_authz_warning_func_t warning_func,
+                      void *warning_baton,
+                      apr_pool_t *result_pool,
+                      apr_pool_t *scratch_pool);
+
+/**
+ * Similar to svn_repos_authz_read3(), but with @a warning_func and
+ * @a warning_baton set to @c NULL.
+ *
  * @since New in 1.10.
+ * @deprecated Provided for backward compatibility with the 1.11 API.
  */
+SVN_DEPRECATED
 svn_error_t *
 svn_repos_authz_read3(svn_authz_t **authz_p,
                       const char *path,
@@ -4206,12 +4242,35 @@ svn_repos_authz_read(svn_authz_t **authz
 
 /**
  * Read authz configuration data from @a stream into @a *authz_p,
- * allocated in @a pool.
+ * allocated in @a result_pool.
  *
  * If @a groups_stream is set, use the global groups parsed from it.
  *
+ * If the @a warning_func callback is not @c NULL, it is called
+ * (with @a warning_baton) to report non-fatal warnings emitted by
+ * the parser.
+ *
+ * Uses @a scratch_pool for temporary aloocations.
+ *
+ * @since New in 1.12.
+ */
+svn_error_t *
+svn_repos_authz_parse2(svn_authz_t **authz_p,
+                       svn_stream_t *stream,
+                       svn_stream_t *groups_stream,
+                       svn_repos_authz_warning_func_t warning_func,
+                       void *warning_baton,
+                       apr_pool_t *result_pool,
+                       apr_pool_t *scratch_pool);
+
+/**
+ * Similar to svn_repos_authz_parse2(), but with @a warning_func and
+ * @a warning_baton set to @c NULL.
+ *
  * @since New in 1.8.
+ * @deprecated Provided for backward compatibility with the 1.11 API.
  */
+SVN_DEPRECATED
 svn_error_t *
 svn_repos_authz_parse(svn_authz_t **authz_p,
                       svn_stream_t *stream,

Modified: subversion/branches/swig-py3/subversion/include/svn_types.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/include/svn_types.h?rev=1862754&r1=1862753&r2=1862754&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/include/svn_types.h (original)
+++ subversion/branches/swig-py3/subversion/include/svn_types.h Mon Jul  8 
15:19:03 2019
@@ -27,6 +27,8 @@
 #ifndef SVN_TYPES_H
 #define SVN_TYPES_H
 
+#include "svn_types_impl.h"
+
 /* ### this should go away, but it causes too much breakage right now */
 #include <stdlib.h>
 #include <limits.h> /* for ULONG_MAX */
@@ -303,28 +305,7 @@ apr_hash_this_val(apr_hash_index_t *hi);
 
 
 
-/** The various types of nodes in the Subversion filesystem. */
-typedef enum svn_node_kind_t
-{
-  /** absent */
-  svn_node_none,
-
-  /** regular file */
-  svn_node_file,
-
-  /** directory */
-  svn_node_dir,
-
-  /** something's here, but we don't know what */
-  svn_node_unknown,
-
-  /**
-   * symbolic link
-   * @note This value is not currently used by the public API.
-   * @since New in 1.8.
-   */
-  svn_node_symlink
-} svn_node_kind_t;
+/* NOTE: svn_node_kind_t is defined in svn_types_impl.h */
 
 /** Return a constant string expressing @a kind as an English word, e.g.,
  * "file", "dir", etc.  The string is not localized, as it may be used for
@@ -346,23 +327,7 @@ svn_node_kind_t
 svn_node_kind_from_word(const char *word);
 
 
-/** Generic three-state property to represent an unknown value for values
- * that are just like booleans.  The values have been set deliberately to
- * make tristates disjoint from #svn_boolean_t.
- *
- * @note It is unsafe to use apr_pcalloc() to allocate these, since '0' is
- * not a valid value.
- *
- * @since New in 1.7. */
-typedef enum svn_tristate_t
-{
-  /** state known to be false (the constant does not evaulate to false) */
-  svn_tristate_false = 2,
-  /** state known to be true */
-  svn_tristate_true,
-  /** state could be true or false */
-  svn_tristate_unknown
-} svn_tristate_t;
+/* NOTE: svn_tristate_t is defined in svn_types_impl.h */
 
 /** Return a constant string "true", "false" or NULL representing the value of
  * @a tristate.
@@ -422,15 +387,11 @@ svn_tristate__from_word(const char * wor
 
 
 
-/** A revision number. */
-typedef long int svn_revnum_t;
+/* NOTE: svn_revnum_t and SVN_INVALID_REVNUM are defined in svn_types_impl.h */
 
 /** Valid revision numbers begin at 0 */
 #define SVN_IS_VALID_REVNUM(n) ((n) >= 0)
 
-/** The 'official' invalid revision num */
-#define SVN_INVALID_REVNUM ((svn_revnum_t) -1)
-
 /** Not really invalid...just unimportant -- one day, this can be its
  * own unique value, for now, just make it the same as
  * #SVN_INVALID_REVNUM.
@@ -494,55 +455,7 @@ enum svn_recurse_kind
   svn_recursive
 };
 
-/** The concept of depth for directories.
- *
- * @note This is similar to, but not exactly the same as, the WebDAV
- * and LDAP concepts of depth.
- *
- * @since New in 1.5.
- */
-typedef enum svn_depth_t
-{
-  /* The order of these depths is important: the higher the number,
-     the deeper it descends.  This allows us to compare two depths
-     numerically to decide which should govern. */
-
-  /** Depth undetermined or ignored.  In some contexts, this means the
-      client should choose an appropriate default depth.  The server
-      will generally treat it as #svn_depth_infinity. */
-  svn_depth_unknown    = -2,
-
-  /** Exclude (i.e., don't descend into) directory D.
-      @note In Subversion 1.5, svn_depth_exclude is *not* supported
-      anywhere in the client-side (libsvn_wc/libsvn_client/etc) code;
-      it is only supported as an argument to set_path functions in the
-      ra and repos reporters.  (This will enable future versions of
-      Subversion to run updates, etc, against 1.5 servers with proper
-      svn_depth_exclude behavior, once we get a chance to implement
-      client-side support for svn_depth_exclude.)
-  */
-  svn_depth_exclude    = -1,
-
-  /** Just the named directory D, no entries.  Updates will not pull in
-      any files or subdirectories not already present. */
-  svn_depth_empty      =  0,
-
-  /** D + its file children, but not subdirs.  Updates will pull in any
-      files not already present, but not subdirectories. */
-  svn_depth_files      =  1,
-
-  /** D + immediate children (D and its entries).  Updates will pull in
-      any files or subdirectories not already present; those
-      subdirectories' this_dir entries will have depth-empty. */
-  svn_depth_immediates =  2,
-
-  /** D + all descendants (full recursion from D).  Updates will pull
-      in any files or subdirectories not already present; those
-      subdirectories' this_dir entries will have depth-infinity.
-      Equivalent to the pre-1.5 default update behavior. */
-  svn_depth_infinity   =  3
-
-} svn_depth_t;
+/* NOTE: svn_depth_t is defined in svn_types_impl.h */
 
 /** Return a constant string expressing @a depth as an English word,
  * e.g., "infinity", "immediates", etc.  The string is not localized,

Modified: subversion/branches/swig-py3/subversion/include/svn_version.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/include/svn_version.h?rev=1862754&r1=1862753&r2=1862754&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/include/svn_version.h (original)
+++ subversion/branches/swig-py3/subversion/include/svn_version.h Mon Jul  8 
15:19:03 2019
@@ -61,7 +61,7 @@ extern "C" {
  * Modify when new functionality is added or new interfaces are
  * defined, but all changes are backward compatible.
  */
-#define SVN_VER_MINOR      12
+#define SVN_VER_MINOR      13
 
 /**
  * Patch number.

Modified: subversion/branches/swig-py3/subversion/libsvn_client/add.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/libsvn_client/add.c?rev=1862754&r1=1862753&r2=1862754&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_client/add.c (original)
+++ subversion/branches/swig-py3/subversion/libsvn_client/add.c Mon Jul  8 
15:19:03 2019
@@ -983,12 +983,13 @@ svn_client_add5(const char *path,
 
 static svn_error_t *
 path_driver_cb_func(void **dir_baton,
+                    const svn_delta_editor_t *editor,
+                    void *edit_baton,
                     void *parent_baton,
                     void *callback_baton,
                     const char *path,
                     apr_pool_t *pool)
 {
-  const svn_delta_editor_t *editor = callback_baton;
   SVN_ERR(svn_path_check_valid(path, pool));
   return editor->add_directory(path, parent_baton, NULL,
                                SVN_INVALID_REVNUM, pool, dir_baton);
@@ -1177,8 +1178,8 @@ mkdir_urls(const apr_array_header_t *url
 
   /* Call the path-based editor driver. */
   err = svn_error_trace(
-        svn_delta_path_driver2(editor, edit_baton, targets, TRUE,
-                               path_driver_cb_func, (void *)editor, pool));
+        svn_delta_path_driver3(editor, edit_baton, targets, TRUE,
+                               path_driver_cb_func, NULL, pool));
 
   if (err)
     {

Modified: subversion/branches/swig-py3/subversion/libsvn_client/blame.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/libsvn_client/blame.c?rev=1862754&r1=1862753&r2=1862754&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_client/blame.c (original)
+++ subversion/branches/swig-py3/subversion/libsvn_client/blame.c Mon Jul  8 
15:19:03 2019
@@ -656,14 +656,16 @@ normalize_blames(struct blame_chain *cha
 }
 
 svn_error_t *
-svn_client_blame5(const char *target,
+svn_client_blame6(svn_revnum_t *start_revnum_p,
+                  svn_revnum_t *end_revnum_p,
+                  const char *target,
                   const svn_opt_revision_t *peg_revision,
                   const svn_opt_revision_t *start,
                   const svn_opt_revision_t *end,
                   const svn_diff_file_options_t *diff_options,
                   svn_boolean_t ignore_mime_type,
                   svn_boolean_t include_merged_revisions,
-                  svn_client_blame_receiver3_t receiver,
+                  svn_client_blame_receiver4_t receiver,
                   void *receiver_baton,
                   svn_client_ctx_t *ctx,
                   apr_pool_t *pool)
@@ -696,10 +698,13 @@ svn_client_blame5(const char *target,
   SVN_ERR(svn_client__get_revision_number(&start_revnum, NULL, ctx->wc_ctx,
                                           target_abspath_or_url, ra_session,
                                           start, pool));
-
+  if (start_revnum_p)
+    *start_revnum_p = start_revnum;
   SVN_ERR(svn_client__get_revision_number(&end_revnum, NULL, ctx->wc_ctx,
                                           target_abspath_or_url, ra_session,
                                           end, pool));
+  if (end_revnum_p)
+    *end_revnum_p = end_revnum;
 
   {
     svn_client__pathrev_t *loc;
@@ -941,18 +946,21 @@ svn_client_blame5(const char *target,
             SVN_ERR(ctx->cancel_func(ctx->cancel_baton));
           if (!eof || sb->len)
             {
+              svn_string_t line;
+              line.data = sb->data;
+              line.len = sb->len;
               if (walk->rev)
-                SVN_ERR(receiver(receiver_baton, start_revnum, end_revnum,
+                SVN_ERR(receiver(receiver_baton,
                                  line_no, walk->rev->revision,
                                  walk->rev->rev_props, merged_rev,
                                  merged_rev_props, merged_path,
-                                 sb->data, FALSE, iterpool));
+                                 &line, FALSE, iterpool));
               else
-                SVN_ERR(receiver(receiver_baton, start_revnum, end_revnum,
+                SVN_ERR(receiver(receiver_baton,
                                  line_no, SVN_INVALID_REVNUM,
                                  NULL, SVN_INVALID_REVNUM,
                                  NULL, NULL,
-                                 sb->data, TRUE, iterpool));
+                                 &line, TRUE, iterpool));
             }
           if (eof) break;
         }

Modified: subversion/branches/swig-py3/subversion/libsvn_client/client.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/libsvn_client/client.h?rev=1862754&r1=1862753&r2=1862754&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_client/client.h (original)
+++ subversion/branches/swig-py3/subversion/libsvn_client/client.h Mon Jul  8 
15:19:03 2019
@@ -870,6 +870,18 @@ svn_client__condense_commit_items(const
                                   apr_array_header_t *commit_items,
                                   apr_pool_t *pool);
 
+/* Rewrite the COMMIT_ITEMS array to be sorted by URL.
+   Rewrite the items' URLs to be relative to BASE_URL.
+
+   COMMIT_ITEMS is an array of (svn_client_commit_item3_t *) items.
+
+   Afterwards, some of the items in COMMIT_ITEMS may contain data
+   allocated in POOL. */
+svn_error_t *
+svn_client__condense_commit_items2(const char *base_url,
+                                   apr_array_header_t *commit_items,
+                                   apr_pool_t *pool);
+
 /* Commit the items in the COMMIT_ITEMS array using EDITOR/EDIT_BATON
    to describe the committed local mods.  Prior to this call,
    COMMIT_ITEMS should have been run through (and BASE_URL generated

Modified: subversion/branches/swig-py3/subversion/libsvn_client/commit.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/libsvn_client/commit.c?rev=1862754&r1=1862753&r2=1862754&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_client/commit.c (original)
+++ subversion/branches/swig-py3/subversion/libsvn_client/commit.c Mon Jul  8 
15:19:03 2019
@@ -553,11 +553,14 @@ harvest_committables(apr_array_header_t
 }
 
 svn_error_t *
-svn_client__wc_replay(const apr_array_header_t *targets,
+svn_client__wc_replay(const char *src_wc_abspath,
+                      const apr_array_header_t *targets,
                       svn_depth_t depth,
                       const apr_array_header_t *changelists,
                       const svn_delta_editor_t *editor,
                       void *edit_baton,
+                      svn_wc_notify_func2_t notify_func,
+                      void *notify_baton,
                       svn_client_ctx_t *ctx,
                       apr_pool_t *pool)
 {
@@ -565,7 +568,10 @@ svn_client__wc_replay(const apr_array_he
   apr_array_header_t *rel_targets;
   apr_hash_t *lock_tokens;
   apr_array_header_t *commit_items;
+  svn_client__pathrev_t *base;
   const char *base_url;
+  svn_wc_notify_func2_t saved_notify_func;
+  void *saved_notify_baton;
 
   /* Condense the target list. This makes all targets absolute. */
   SVN_ERR(svn_dirent_condense_targets(&base_abspath, &rel_targets, targets,
@@ -592,15 +598,28 @@ svn_client__wc_replay(const apr_array_he
                                FALSE /*just_locked*/,
                                changelists,
                                ctx, pool, pool));
-
-  /* Sort and condense our COMMIT_ITEMS. */
-  SVN_ERR(svn_client__condense_commit_items(&base_url, commit_items, pool));
-
-  ctx->notify_func2 = NULL;
+  if (!commit_items)
+    {
+      return SVN_NO_ERROR;
+    }
+
+  SVN_ERR(svn_client__wc_node_get_base(&base,
+                                       src_wc_abspath, ctx->wc_ctx, pool, 
pool));
+  base_url = base->url;
+  /* Sort our COMMIT_ITEMS by URL and find their relative URL-paths. */
+  SVN_ERR(svn_client__condense_commit_items2(base_url, commit_items, pool));
+
+  saved_notify_func = ctx->notify_func2;
+  saved_notify_baton = ctx->notify_baton2;
+  ctx->notify_func2 = notify_func;
+  ctx->notify_baton2 = notify_baton;
+  /* BASE_URL is only used here in notifications & errors */
   SVN_ERR(svn_client__do_commit(base_url, commit_items,
                                 editor, edit_baton,
                                 NULL /*notify_prefix*/, NULL 
/*sha1_checksums*/,
                                 ctx, pool, pool));
+  ctx->notify_func2 = saved_notify_func;
+  ctx->notify_baton2 = saved_notify_baton;
   return SVN_NO_ERROR;
 }
 

Modified: subversion/branches/swig-py3/subversion/libsvn_client/commit_util.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/libsvn_client/commit_util.c?rev=1862754&r1=1862753&r2=1862754&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/libsvn_client/commit_util.c 
(original)
+++ subversion/branches/swig-py3/subversion/libsvn_client/commit_util.c Mon Jul 
 8 15:19:03 2019
@@ -1392,6 +1392,29 @@ sort_commit_item_urls(const void *a, con
 }
 
 
+svn_error_t *
+svn_client__condense_commit_items2(const char *base_url,
+                                   apr_array_header_t *commit_items,
+                                   apr_pool_t *pool)
+{
+  apr_array_header_t *ci = commit_items; /* convenience */
+  int i;
+
+  /* Sort our commit items by their URLs. */
+  svn_sort__array(ci, sort_commit_item_urls);
+
+  /* Hack BASE_URL off each URL; store the result as session_relpath. */
+  for (i = 0; i < ci->nelts; i++)
+    {
+      svn_client_commit_item3_t *this_item
+        = APR_ARRAY_IDX(ci, i, svn_client_commit_item3_t *);
+
+      this_item->session_relpath = svn_uri_skip_ancestor(base_url,
+                                                         this_item->url, pool);
+    }
+
+  return SVN_NO_ERROR;
+}
 
 svn_error_t *
 svn_client__condense_commit_items(const char **base_url,
@@ -1501,8 +1524,6 @@ struct file_mod_t
 /* A baton for use while driving a path-based editor driver for commit */
 struct item_commit_baton
 {
-  const svn_delta_editor_t *editor;    /* commit editor */
-  void *edit_baton;                    /* commit editor's baton */
   apr_hash_t *file_mods;               /* hash: path->file_mod_t */
   const char *notify_path_prefix;      /* notification path prefix
                                           (NULL is okay, else abs path) */
@@ -1524,6 +1545,8 @@ struct item_commit_baton
  * This implements svn_delta_path_driver_cb_func_t. */
 static svn_error_t *
 do_item_commit(void **dir_baton,
+               const svn_delta_editor_t *editor,
+               void *edit_baton,
                void *parent_baton,
                void *callback_baton,
                const char *path,
@@ -1535,7 +1558,6 @@ do_item_commit(void **dir_baton,
   svn_node_kind_t kind = item->kind;
   void *file_baton = NULL;
   apr_pool_t *file_pool = NULL;
-  const svn_delta_editor_t *editor = icb->editor;
   apr_hash_t *file_mods = icb->file_mods;
   svn_client_ctx_t *ctx = icb->ctx;
   svn_error_t *err;
@@ -1737,7 +1759,7 @@ do_item_commit(void **dir_baton,
             {
               if (! parent_baton)
                 {
-                  err = editor->open_root(icb->edit_baton, item->revision,
+                  err = editor->open_root(edit_baton, item->revision,
                                           pool, dir_baton);
                 }
               else
@@ -1871,8 +1893,6 @@ svn_client__do_commit(const char *base_u
     }
 
   /* Setup the callback baton. */
-  cb_baton.editor = editor;
-  cb_baton.edit_baton = edit_baton;
   cb_baton.file_mods = file_mods;
   cb_baton.notify_path_prefix = notify_path_prefix;
   cb_baton.ctx = ctx;
@@ -1880,7 +1900,7 @@ svn_client__do_commit(const char *base_u
   cb_baton.base_url = base_url;
 
   /* Drive the commit editor! */
-  SVN_ERR(svn_delta_path_driver2(editor, edit_baton, paths, TRUE,
+  SVN_ERR(svn_delta_path_driver3(editor, edit_baton, paths, TRUE,
                                  do_item_commit, &cb_baton, scratch_pool));
 
   /* Transmit outstanding text deltas. */


Reply via email to