You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2012/05/16 22:32:54 UTC

svn commit: r1339349 [3/37] - in /subversion/branches/fix-rdump-editor: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ build/win32/ contrib/client-side/emacs/ contrib/client-side/vim/ contrib/server-side/ notes/ notes/api-errata...

Modified: subversion/branches/fix-rdump-editor/subversion/include/private/svn_auth_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/include/private/svn_auth_private.h?rev=1339349&r1=1339348&r2=1339349&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/include/private/svn_auth_private.h (original)
+++ subversion/branches/fix-rdump-editor/subversion/include/private/svn_auth_private.h Wed May 16 20:32:43 2012
@@ -82,36 +82,45 @@ typedef svn_error_t * (*svn_auth__passwo
    svn_boolean_t non_interactive,
    apr_pool_t *pool);
 
-/* Common implementation for simple_first_creds and
-   windows_simple_first_creds. Uses PARAMETERS, REALMSTRING and the
-   simple auth provider's username and password cache to fill a set of
-   CREDENTIALS. PASSWORD_GET is used to obtain the password value.
-   PASSTYPE identifies the type of the cached password. CREDENTIALS are
-   allocated from POOL. */
-svn_error_t *
-svn_auth__simple_first_creds_helper(void **credentials,
-                                    void **iter_baton,
-                                    void *provider_baton,
-                                    apr_hash_t *parameters,
-                                    const char *realmstring,
-                                    svn_auth__password_get_t password_get,
-                                    const char *passtype,
-                                    apr_pool_t *pool);
-
-/* Common implementation for simple_save_creds and
-   windows_simple_save_creds. Uses PARAMETERS and REALMSTRING to save
-   a set of CREDENTIALS to the simple auth provider's username and
-   password cache. PASSWORD_SET is used to store the password.
-   PASSTYPE identifies the type of the cached password. Allocates from POOL. */
-svn_error_t *
-svn_auth__simple_save_creds_helper(svn_boolean_t *saved,
-                                   void *credentials,
-                                   void *provider_baton,
-                                   apr_hash_t *parameters,
-                                   const char *realmstring,
-                                   svn_auth__password_set_t password_set,
-                                   const char *passtype,
-                                   apr_pool_t *pool);
+/* Use PARAMETERS and REALMSTRING to set *CREDENTIALS to a set of
+   pre-cached authentication credentials pulled from the simple
+   credential cache store identified by PASSTYPE.  PASSWORD_GET is
+   used to obtain the password value.  Allocate *CREDENTIALS from
+   POOL.
+
+   NOTE:  This function is a common implementation of code used by
+   several of the simple credential providers (the default disk cache
+   mechanism, Windows CryptoAPI, GNOME Keyring, etc.), typically in
+   their "first_creds" implementation.  */
+svn_error_t *
+svn_auth__simple_creds_cache_get(void **credentials,
+                                 void **iter_baton,
+                                 void *provider_baton,
+                                 apr_hash_t *parameters,
+                                 const char *realmstring,
+                                 svn_auth__password_get_t password_get,
+                                 const char *passtype,
+                                 apr_pool_t *pool);
+
+/* Use PARAMETERS and REALMSTRING to save CREDENTIALS in the simple
+   credential cache store identified by PASSTYPE.  PASSWORD_SET is
+   used to do the actual storage.  Use POOL for necessary allocations.
+   Set *SAVED according to whether or not the credentials were
+   successfully stored.
+
+   NOTE:  This function is a common implementation of code used by
+   several of the simple credential providers (the default disk cache
+   mechanism, Windows CryptoAPI, GNOME Keyring, etc.) typically in
+   their "save_creds" implementation.  */
+svn_error_t *
+svn_auth__simple_creds_cache_set(svn_boolean_t *saved,
+                                 void *credentials,
+                                 void *provider_baton,
+                                 apr_hash_t *parameters,
+                                 const char *realmstring,
+                                 svn_auth__password_set_t password_set,
+                                 const char *passtype,
+                                 apr_pool_t *pool);
 
 /* Implementation of svn_auth__password_get_t that retrieves
    the plaintext password from CREDS when USERNAME matches the stored
@@ -139,39 +148,45 @@ svn_auth__simple_password_set(svn_boolea
                               apr_pool_t *pool);
 
 
-/* Common implementation for ssl_client_cert_pw_file_first_credentials.
-   Uses PARAMETERS, REALMSTRING and the ssl client passphrase auth provider's
-   passphrase cache to fill the CREDENTIALS. PASSPHRASE_GET is used to obtain
-   the passphrase value. PASSTYPE identifies the type of the cached passphrase.
-   CREDENTIALS are allocated from POOL. */
-svn_error_t *
-svn_auth__ssl_client_cert_pw_file_first_creds_helper
-  (void **credentials,
-   void **iter_baton,
-   void *provider_baton,
-   apr_hash_t *parameters,
-   const char *realmstring,
-   svn_auth__password_get_t passphrase_get,
-   const char *passtype,
-   apr_pool_t *pool);
-
-/* Common implementation for ssl_client_cert_pw_file_save_credentials and
-   windows_ssl_client_cert_pw_file_save_credentials. Uses PARAMETERS and
-   REALMSTRING to save a set of CREDENTIALS to the ssl client cert auth
-   provider's passphrase cache. PASSPHRASE_SET is used to store the
-   passphrase. PASSTYPE identifies the type of the cached passphrase.
-   Allocates from POOL. */
-svn_error_t *
-svn_auth__ssl_client_cert_pw_file_save_creds_helper
-  (svn_boolean_t *saved,
-   void *credentials,
-   void *provider_baton,
-   apr_hash_t *parameters,
-   const char *realmstring,
-   svn_auth__password_set_t passphrase_set,
-   const char *passtype,
-   apr_pool_t *pool);
-
+/* Use PARAMETERS and REALMSTRING to set *CREDENTIALS to a set of
+   pre-cached authentication credentials pulled from the SSL client
+   certificate passphrase credential cache store identified by
+   PASSTYPE.  PASSPHRASE_GET is used to obtain the passphrase value.
+   Allocate *CREDENTIALS from POOL.
+
+   NOTE:  This function is a common implementation of code used by
+   several of the ssl client passphrase credential providers (the
+   default disk cache mechanism, Windows CryptoAPI, GNOME Keyring,
+   etc.), typically in their "first_creds" implementation.  */
+svn_error_t *
+svn_auth__ssl_client_cert_pw_cache_get(void **credentials,
+                                       void **iter_baton,
+                                       void *provider_baton,
+                                       apr_hash_t *parameters,
+                                       const char *realmstring,
+                                       svn_auth__password_get_t passphrase_get,
+                                       const char *passtype,
+                                       apr_pool_t *pool);
+
+/* Use PARAMETERS and REALMSTRING to save CREDENTIALS in the SSL
+   client certificate passphrase credential cache store identified by
+   PASSTYPE.  PASSPHRASE_SET is used to do the actual storage.  Use
+   POOL for necessary allocations.  Set *SAVED according to whether or
+   not the credentials were successfully stored.
+
+   NOTE:  This function is a common implementation of code used by
+   several of the simple credential providers (the default disk cache
+   mechanism, Windows CryptoAPI, GNOME Keyring, etc.) typically in
+   their "save_creds" implementation.  */
+svn_error_t *
+svn_auth__ssl_client_cert_pw_cache_set(svn_boolean_t *saved,
+                                       void *credentials,
+                                       void *provider_baton,
+                                       apr_hash_t *parameters,
+                                       const char *realmstring,
+                                       svn_auth__password_set_t passphrase_set,
+                                       const char *passtype,
+                                       apr_pool_t *pool);
 
 /* This implements the svn_auth__password_get_t interface.
    Set **PASSPHRASE to the plaintext passphrase retrieved from CREDS;

Modified: subversion/branches/fix-rdump-editor/subversion/include/private/svn_cache.h
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/include/private/svn_cache.h?rev=1339349&r1=1339348&r2=1339349&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/include/private/svn_cache.h (original)
+++ subversion/branches/fix-rdump-editor/subversion/include/private/svn_cache.h Wed May 16 20:32:43 2012
@@ -55,7 +55,7 @@ extern "C" {
  * i.e. modify @a data directly and return it in @a *out.
  */
 typedef svn_error_t *(*svn_cache__deserialize_func_t)(void **out,
-                                                      char *data,
+                                                      void *data,
                                                       apr_size_t data_len,
                                                       apr_pool_t *result_pool);
 
@@ -67,7 +67,7 @@ typedef svn_error_t *(*svn_cache__deseri
  * not require the whole structure to be processed.
  */
 typedef svn_error_t *(*svn_cache__partial_getter_func_t)(void **out,
-                                                         const char *data,
+                                                         const void *data,
                                                          apr_size_t data_len,
                                                          void *baton,
                                                          apr_pool_t *result_pool);
@@ -80,7 +80,7 @@ typedef svn_error_t *(*svn_cache__partia
  * values must be passed back in @a *data_len and @a *data, respectively.
  * Allocations will be done from @a result_pool.
  */
-typedef svn_error_t *(*svn_cache__partial_setter_func_t)(char **data,
+typedef svn_error_t *(*svn_cache__partial_setter_func_t)(void **data,
                                                          apr_size_t *data_len,
                                                          void *baton,
                                                          apr_pool_t *result_pool);
@@ -90,7 +90,7 @@ typedef svn_error_t *(*svn_cache__partia
  * function should allocate the serialized value in @a result_pool, set
  * @a *data to the serialized value, and set @a *data_len to its length.
  */
-typedef svn_error_t *(*svn_cache__serialize_func_t)(char **data,
+typedef svn_error_t *(*svn_cache__serialize_func_t)(void **data,
                                                     apr_size_t *data_len,
                                                     void *in,
                                                     apr_pool_t *result_pool);

Modified: subversion/branches/fix-rdump-editor/subversion/include/private/svn_client_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/include/private/svn_client_private.h?rev=1339349&r1=1339348&r2=1339349&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/include/private/svn_client_private.h (original)
+++ subversion/branches/fix-rdump-editor/subversion/include/private/svn_client_private.h Wed May 16 20:32:43 2012
@@ -29,6 +29,7 @@
 
 #include <apr_pools.h>
 
+#include "svn_ra.h"
 #include "svn_client.h"
 #include "svn_types.h"
 
@@ -37,6 +38,67 @@ extern "C" {
 #endif /* __cplusplus */
 
 
+/* A location in a repository. */
+typedef struct svn_client__pathrev_t
+{
+  const char *repos_root_url;
+  const char *repos_uuid;
+  svn_revnum_t rev;
+  const char *url;
+} svn_client__pathrev_t;
+
+/* Return a new path-rev structure, allocated in RESULT_POOL,
+ * initialized with deep copies of REPOS_ROOT_URL, REPOS_UUID, REV and URL. */
+svn_client__pathrev_t *
+svn_client__pathrev_create(const char *repos_root_url,
+                           const char *repos_uuid,
+                           svn_revnum_t rev,
+                           const char *url,
+                           apr_pool_t *result_pool);
+
+/* Return a new path-rev structure, allocated in RESULT_POOL,
+ * initialized with deep copies of REPOS_ROOT_URL, REPOS_UUID, and REV,
+ * and using the repository-relative RELPATH to construct the URL. */
+svn_client__pathrev_t *
+svn_client__pathrev_create_with_relpath(const char *repos_root_url,
+                                        const char *repos_uuid,
+                                        svn_revnum_t rev,
+                                        const char *relpath,
+                                        apr_pool_t *result_pool);
+
+/* Set *PATHREV_P to a new path-rev structure, allocated in RESULT_POOL,
+ * initialized with deep copies of the repository root URL and UUID from
+ * RA_SESSION, and of REV and URL. */
+svn_error_t *
+svn_client__pathrev_create_with_session(svn_client__pathrev_t **pathrev_p,
+                                        svn_ra_session_t *ra_session,
+                                        svn_revnum_t rev,
+                                        const char *url,
+                                        apr_pool_t *result_pool);
+
+/* Return a deep copy of PATHREV, allocated in RESULT_POOL. */
+svn_client__pathrev_t *
+svn_client__pathrev_dup(const svn_client__pathrev_t *pathrev,
+                        apr_pool_t *result_pool);
+
+/* Return a deep copy of PATHREV, with a URI-encoded representation of
+ * RELPATH joined on to the URL.  Allocate the result in RESULT_POOL. */
+svn_client__pathrev_t *
+svn_client__pathrev_join_relpath(const svn_client__pathrev_t *pathrev,
+                                 const char *relpath,
+                                 apr_pool_t *result_pool);
+
+/* Return the repository-relative relpath of PATHREV. */
+const char *
+svn_client__pathrev_relpath(const svn_client__pathrev_t *pathrev,
+                            apr_pool_t *result_pool);
+
+/* Return the repository-relative fspath of PATHREV. */
+const char *
+svn_client__pathrev_fspath(const svn_client__pathrev_t *pathrev,
+                           apr_pool_t *result_pool);
+
+
 /** Return @c SVN_ERR_ILLEGAL_TARGET if TARGETS contains a mixture of
  * URLs and paths; otherwise return SVN_NO_ERROR.
  *
@@ -82,6 +144,101 @@ svn_client__youngest_common_ancestor(con
                                      apr_pool_t *result_pool,
                                      apr_pool_t *scratch_pool);
 
+/* Get the repository location of the base node at LOCAL_ABSPATH.
+ *
+ * A pathrev_t wrapper around svn_wc__node_get_base().
+ *
+ * Set *BASE_P to the location that this node was checked out at or last
+ * updated/switched to, regardless of any uncommitted changes (delete,
+ * replace and/or copy-here/move-here).
+ *
+ * If there is no base node at LOCAL_ABSPATH (such as when there is a
+ * locally added/copied/moved-here node that is not part of a replace),
+ * set *BASE_P to NULL.
+ */
+svn_error_t *
+svn_client__wc_node_get_base(svn_client__pathrev_t **base_p,
+                             const char *wc_abspath,
+                             svn_client_ctx_t *ctx,
+                             apr_pool_t *result_pool,
+                             apr_pool_t *scratch_pool);
+
+/* Get the original location of the WC node at LOCAL_ABSPATH.
+ *
+ * A pathrev_t wrapper around svn_wc__node_get_origin().
+ *
+ * Set *ORIGIN_P to the origin of the WC node at WC_ABSPATH.  If the node
+ * is a local copy, give the copy-from location.  If the node is locally
+ * added or deleted, set *ORIGIN_P to NULL.
+ */
+svn_error_t *
+svn_client__wc_node_get_origin(svn_client__pathrev_t **origin_p,
+                               const char *wc_abspath,
+                               svn_client_ctx_t *ctx,
+                               apr_pool_t *result_pool,
+                               apr_pool_t *scratch_pool);
+
+/* A macro to mark sections of code that belong to the 'symmetric merge'
+ * feature while it's still new. */
+#ifdef SVN_DEBUG
+#define SVN_WITH_SYMMETRIC_MERGE
+#endif
+
+#ifdef SVN_WITH_SYMMETRIC_MERGE
+
+/* Details of a symmetric merge. */
+typedef struct svn_client__symmetric_merge_t svn_client__symmetric_merge_t;
+
+/* Find the information needed to merge all unmerged changes from a source
+ * branch into a target branch.  The information is the locations of the
+ * youngest common ancestor, merge base, and such like.
+ *
+ * Set *MERGE to the information needed to merge all unmerged changes
+ * (up to SOURCE_REVISION) from the source branch SOURCE_PATH_OR_URL @
+ * SOURCE_REVISION into the target WC at TARGET_WCPATH.
+ */
+svn_error_t *
+svn_client__find_symmetric_merge(svn_client__symmetric_merge_t **merge,
+                                 const char *source_path_or_url,
+                                 const svn_opt_revision_t *source_revision,
+                                 const char *target_wcpath,
+                                 svn_boolean_t allow_mixed_rev,
+                                 svn_boolean_t allow_local_mods,
+                                 svn_boolean_t allow_switched_subtrees,
+                                 svn_client_ctx_t *ctx,
+                                 apr_pool_t *result_pool,
+                                 apr_pool_t *scratch_pool);
+
+/* Perform a symmetric merge.
+ *
+ * Merge according to MERGE into the WC at TARGET_WCPATH.
+ *
+ * The other parameters are as in svn_client_merge4().  IGNORE_ANCESTRY
+ * only controls the diffing of files, it doesn't prevent mergeinfo from
+ * being used.
+ *
+ * ### TODO: There's little point in this function being the only way the
+ * caller can use the result of svn_client__find_symmetric_merge().  The
+ * contents of MERGE should be more public, or there should be other ways
+ * the caller can use it, or these two functions should be combined into
+ * one.  I want to make it more public, and also possibly have more ways
+ * to use it in future (for example, do_symmetric_merge_with_step_by_-
+ * step_confirmation).
+ */
+svn_error_t *
+svn_client__do_symmetric_merge(const svn_client__symmetric_merge_t *merge,
+                               const char *target_wcpath,
+                               svn_depth_t depth,
+                               svn_boolean_t ignore_ancestry,
+                               svn_boolean_t force,
+                               svn_boolean_t record_only,
+                               svn_boolean_t dry_run,
+                               const apr_array_header_t *merge_options,
+                               svn_client_ctx_t *ctx,
+                               apr_pool_t *scratch_pool);
+
+#endif /* SVN_WITH_SYMMETRIC_MERGE */
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */

Modified: subversion/branches/fix-rdump-editor/subversion/include/private/svn_fs_util.h
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/include/private/svn_fs_util.h?rev=1339349&r1=1339348&r2=1339349&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/include/private/svn_fs_util.h (original)
+++ subversion/branches/fix-rdump-editor/subversion/include/private/svn_fs_util.h Wed May 16 20:32:43 2012
@@ -59,6 +59,13 @@ svn_fs__canonicalize_abspath(const char 
 svn_error_t *
 svn_fs__check_fs(svn_fs_t *fs, svn_boolean_t expect_open);
 
+/* An identifier for FS to be used in the text of error messages.
+   (Not used anywhere but in this header.)
+
+   Note: we log the UUID, rather than (fs)->path, since some of these
+   errors are marshalled to the client. */
+#define svn_fs__identifier(fs) ((fs)->uuid)
+
 /* Constructing nice error messages for roots.  */
 
 /* Build an SVN_ERR_FS_NOT_FOUND error, with a detailed error text,
@@ -79,17 +86,17 @@ svn_fs__check_fs(svn_fs_t *fs, svn_boole
 
 /* Build a detailed `file already exists' message for PATH in ROOT.
    ROOT is of type svn_fs_root_t *. */
-#define SVN_FS__ALREADY_EXISTS(root, path_str, pool) (                         \
+#define SVN_FS__ALREADY_EXISTS(root, path_str) (                               \
   root->is_txn_root ?                                                          \
     svn_error_createf                                                          \
       (SVN_ERR_FS_ALREADY_EXISTS, 0,                                           \
        _("File already exists: filesystem '%s', transaction '%s', path '%s'"), \
-       svn_dirent_local_style(root->fs->path, pool), root->txn, path_str)      \
+       svn_fs__identifier(root->fs), root->txn, path_str)      \
   :                                                                            \
     svn_error_createf                                                          \
       (SVN_ERR_FS_ALREADY_EXISTS, 0,                                           \
        _("File already exists: filesystem '%s', revision %ld, path '%s'"),     \
-       svn_dirent_local_style(root->fs->path, pool), root->rev, path_str)      \
+       svn_fs__identifier(root->fs), root->rev, path_str)      \
   )
 
 /* ROOT is of type svn_fs_root_t *. */
@@ -100,64 +107,64 @@ svn_fs__check_fs(svn_fs_t *fs, svn_boole
 
 /* SVN_FS__ERR_NOT_MUTABLE: the caller attempted to change a node
    outside of a transaction. FS is of type "svn_fs_t *". */
-#define SVN_FS__ERR_NOT_MUTABLE(fs, rev, path_in_repo, scratch_pool)     \
+#define SVN_FS__ERR_NOT_MUTABLE(fs, rev, path_in_repo)                   \
   svn_error_createf(                                                     \
      SVN_ERR_FS_NOT_MUTABLE, 0,                                          \
      _("File is not mutable: filesystem '%s', revision %ld, path '%s'"), \
-     svn_dirent_local_style(fs->path, scratch_pool), rev, path_in_repo)
+     svn_fs__identifier(fs), rev, path_in_repo)
 
-/* FS is of type "svn fs_t *".*/
-#define SVN_FS__ERR_NOT_DIRECTORY(fs, path_in_repo, scratch_pool) \
+/* FS is of type "svn_fs_t *".*/
+#define SVN_FS__ERR_NOT_DIRECTORY(fs, path_in_repo)               \
   svn_error_createf(                                              \
      SVN_ERR_FS_NOT_DIRECTORY, 0,                                 \
      _("'%s' is not a directory in filesystem '%s'"),             \
-     path_in_repo, svn_dirent_local_style(fs->path, scratch_pool))
+     path_in_repo, svn_fs__identifier(fs))
 
-/* FS is of type "svn fs_t *".   */
-#define SVN_FS__ERR_NOT_FILE(fs, path_in_repo, scratch_pool)      \
+/* FS is of type "svn_fs_t *".   */
+#define SVN_FS__ERR_NOT_FILE(fs, path_in_repo)                    \
   svn_error_createf(                                              \
      SVN_ERR_FS_NOT_FILE, 0,                                      \
      _("'%s' is not a file in filesystem '%s'"),                  \
-     path_in_repo, svn_dirent_local_style(fs->path, scratch_pool))
+     path_in_repo, svn_fs__identifier(fs))
 
 
-/* FS is of type "svn fs_t *", LOCK is of type "svn_lock_t *".   */
-#define SVN_FS__ERR_PATH_ALREADY_LOCKED(fs, lock, scratch_pool)             \
+/* FS is of type "svn_fs_t *", LOCK is of type "svn_lock_t *".   */
+#define SVN_FS__ERR_PATH_ALREADY_LOCKED(fs, lock)                           \
   svn_error_createf(                                                        \
      SVN_ERR_FS_PATH_ALREADY_LOCKED, 0,                                     \
      _("Path '%s' is already locked by user '%s' in filesystem '%s'"),      \
-     lock->path, lock->owner, svn_dirent_local_style(fs->path, scratch_pool))
+     (lock)->path, (lock)->owner, svn_fs__identifier(fs))
 
-/* FS is of type "svn fs_t *". */
-#define SVN_FS__ERR_NO_SUCH_LOCK(fs, path_in_repo, scratch_pool)  \
+/* FS is of type "svn_fs_t *". */
+#define SVN_FS__ERR_NO_SUCH_LOCK(fs, path_in_repo)                \
   svn_error_createf(                                              \
      SVN_ERR_FS_NO_SUCH_LOCK, 0,                                  \
      _("No lock on path '%s' in filesystem '%s'"),                \
-     path_in_repo, svn_dirent_local_style(fs->path, scratch_pool))
+     path_in_repo, svn_fs__identifier(fs))
 
-/* FS is of type "svn fs_t *". */
-#define SVN_FS__ERR_LOCK_EXPIRED(fs, token, scratch_pool)        \
+/* FS is of type "svn_fs_t *". */
+#define SVN_FS__ERR_LOCK_EXPIRED(fs, token)                      \
   svn_error_createf(                                             \
      SVN_ERR_FS_LOCK_EXPIRED, 0,                                 \
      _("Lock has expired: lock-token '%s' in filesystem '%s'"),  \
-     token, svn_dirent_local_style(fs->path, scratch_pool))
+     token, svn_fs__identifier(fs))
 
-/* FS is of type "svn fs_t *". */
-#define SVN_FS__ERR_NO_USER(fs, scratch_pool)                       \
+/* FS is of type "svn_fs_t *". */
+#define SVN_FS__ERR_NO_USER(fs)                                     \
   svn_error_createf(                                                \
      SVN_ERR_FS_NO_USER, 0,                                         \
      _("No username is currently associated with filesystem '%s'"), \
-     svn_dirent_local_style(fs->path, scratch_pool))
+     svn_fs__identifier(fs))
 
 /* SVN_FS__ERR_LOCK_OWNER_MISMATCH: trying to use a lock whose
    LOCK_OWNER doesn't match the USERNAME associated with FS.
-   FS is of type "svn fs_t *". */
-#define SVN_FS__ERR_LOCK_OWNER_MISMATCH(fs, username, lock_owner, pool) \
+   FS is of type "svn_fs_t *". */
+#define SVN_FS__ERR_LOCK_OWNER_MISMATCH(fs, username, lock_owner)       \
   svn_error_createf(                                                    \
      SVN_ERR_FS_LOCK_OWNER_MISMATCH, 0,                                 \
      _("User '%s' is trying to use a lock owned by '%s' in "            \
        "filesystem '%s'"),                                              \
-     username, lock_owner, svn_dirent_local_style(fs->path, pool))
+     username, lock_owner, svn_fs__identifier(fs))
 
 /* Return a NULL-terminated copy of the first component of PATH,
    allocated in POOL.  If path is empty, or consists entirely of

Modified: subversion/branches/fix-rdump-editor/subversion/include/private/svn_mergeinfo_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/include/private/svn_mergeinfo_private.h?rev=1339349&r1=1339348&r2=1339349&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/include/private/svn_mergeinfo_private.h (original)
+++ subversion/branches/fix-rdump-editor/subversion/include/private/svn_mergeinfo_private.h Wed May 16 20:32:43 2012
@@ -185,7 +185,8 @@ svn_mergeinfo__to_formatted_string(svn_s
                                    apr_pool_t *pool);
 
 /* Set *YOUNGEST_REV and *OLDEST_REV to the youngest and oldest revisions
-   found in the rangelists within MERGEINFO.  If MERGEINFO is NULL or empty
+   found in the rangelists within MERGEINFO.  Note that *OLDEST_REV is
+   exclusive and *YOUNGEST_REV is inclusive.  If MERGEINFO is NULL or empty
    set *YOUNGEST_REV and *OLDEST_REV to SVN_INVALID_REVNUM. */
 svn_error_t *
 svn_mergeinfo__get_range_endpoints(svn_revnum_t *youngest_rev,
@@ -194,9 +195,9 @@ svn_mergeinfo__get_range_endpoints(svn_r
                                    apr_pool_t *pool);
 
 /* Set *FILTERED_MERGEINFO to a deep copy of MERGEINFO, allocated in
-   RESULT_POOL, less any rangelists that fall outside of the range
-   OLDEST_REV:YOUNGEST_REV (inclusive) if INCLUDE_RANGE is true, or less
-   any rangelists within the range OLDEST_REV:YOUNGEST_REV if INCLUDE_RANGE
+   RESULT_POOL, less any revision ranges that fall outside of the range
+   OLDEST_REV:YOUNGEST_REV (exclusive:inclusive) if INCLUDE_RANGE is true,
+   or less any ranges within OLDEST_REV:YOUNGEST_REV if INCLUDE_RANGE
    is false.  If all the rangelists mapped to a given path are filtered
    then filter that path as well.  If all paths are filtered or MERGEINFO is
    empty or NULL then *FILTERED_MERGEINFO is set to an empty hash.

Modified: subversion/branches/fix-rdump-editor/subversion/include/private/svn_mutex.h
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/include/private/svn_mutex.h?rev=1339349&r1=1339348&r2=1339349&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/include/private/svn_mutex.h (original)
+++ subversion/branches/fix-rdump-editor/subversion/include/private/svn_mutex.h Wed May 16 20:32:43 2012
@@ -103,13 +103,11 @@ svn_mutex__unlock(svn_mutex__t *mutex,
  * @note Prefer using this macro instead of explicit lock aquisition and
  * release.
  */
-#define SVN_MUTEX__WITH_LOCK(mutex, expr) \
-do {                                      \
-  svn_mutex__t *m = (mutex);              \
-  svn_error_t *e = svn_mutex__lock(m);    \
-  if (e) return svn_error_trace(e);       \
-  e = svn_mutex__unlock(m, (expr));       \
-  if (e) return svn_error_trace(e);       \
+#define SVN_MUTEX__WITH_LOCK(mutex, expr)               \
+do {                                                    \
+  svn_mutex__t *svn_mutex__m = (mutex);                 \
+  SVN_ERR(svn_mutex__lock(svn_mutex__m));               \
+  SVN_ERR(svn_mutex__unlock(svn_mutex__m, (expr)));     \
 } while (0)
 
 #ifdef __cplusplus

Propchange: subversion/branches/fix-rdump-editor/subversion/include/private/svn_mutex.h
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: subversion/branches/fix-rdump-editor/subversion/include/private/svn_ra_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/include/private/svn_ra_private.h?rev=1339349&r1=1339348&r2=1339349&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/include/private/svn_ra_private.h (original)
+++ subversion/branches/fix-rdump-editor/subversion/include/private/svn_ra_private.h Wed May 16 20:32:43 2012
@@ -32,6 +32,8 @@
 #include "svn_error.h"
 #include "svn_ra.h"
 #include "svn_delta.h"
+#include "svn_editor.h"
+#include "svn_io.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -132,6 +134,154 @@ svn_error_t *
 svn_ra__register_editor_shim_callbacks(svn_ra_session_t *ra_session,
                                        svn_delta_shim_callbacks_t *callbacks);
 
+
+/* Using information from BATON, provide the (file's) pristine contents
+   for REPOS_RELPATH. They are returned in *CONTENTS, and correspond to
+   *REVISION.
+
+   If a pristine is not available (ie. a locally-added node), then set
+   *CONTENTS to NULL; *REVISION will not be examined in this case.
+
+   These are allocated in RESULT_POOL. SCRATCH_POOL can be used
+   for temporary allocations.  */
+typedef svn_error_t *(*svn_ra__provide_base_cb_t)(
+  svn_stream_t **contents,
+  svn_revnum_t *revision,
+  void *baton,
+  const char *repos_relpath,
+  apr_pool_t *result_pool,
+  apr_pool_t *scratch_pool);
+
+/* Using information from BATON, provide the pristine properties for
+   REPOS_RELPATH. They are returned in *PROPS, and correspond to *REVISION.
+
+   If properties are not available (ie. a locally-added node), then set
+   *PROPS to NULL; *REVISION will not be examined in this case.
+
+   The properties are allocated in RESULT_POOL. SCRATCH_POOL can be used
+   for temporary allocations.  */
+typedef svn_error_t *(*svn_ra__provide_props_cb_t)(
+  apr_hash_t **props,
+  svn_revnum_t *revision,
+  void *baton,
+  const char *repos_relpath,
+  apr_pool_t *result_pool,
+  apr_pool_t *scratch_pool);
+
+/* Using information from BATON, fetch the kind of REPOS_RELPATH at revision
+   SRC_REVISION, returning it in *KIND.
+
+   If the kind cannot be determined, then set *KIND to svn_kind_unknown.
+
+   Temporary allocations can be made in SCRATCH_POOL.  */
+typedef svn_error_t *(*svn_ra__get_copysrc_kind_cb_t)(
+  svn_kind_t *kind,
+  void *baton,
+  const char *repos_relpath,
+  svn_revnum_t src_revision,
+  apr_pool_t *scratch_pool);
+
+
+/* Return an Ev2-based editor for performing commits.
+
+   The editor is associated with the given SESSION, and its implied target
+   repository.
+
+   REVPROPS contains all the revision properties that should be stored onto
+   the newly-committed revision. SVN_PROP_REVISION_AUTHOR will be set to
+   the username as determined by the session; overwriting any prior value
+   that may be present in REVPROPS.
+
+   COMMIT_CB/BATON contain the callback to receive post-commit information.
+
+   LOCK_TOKENS should contain all lock tokens necessary to modify paths
+   within the commit. If KEEP_LOCKS is FALSE, then the paths associated
+   with these tokens will be unlocked.
+   ### today, LOCK_TOKENS is session_relpath:token_value. in the future,
+   ### it should be repos_relpath:token_value.
+
+   PROVIDE_BASE_CB is a callback to fetch pristine contents, used to send
+   an svndiff over the wire to the server. This may be NULL, indicating
+   pristine contents are not available (eg. URL-based operations or import).
+
+   PROVIDE_PROPS_CB is a callback to fetch pristine properties, used to
+   send property deltas over the wire to the server. This may be NULL,
+   indicating pristine properties are not available (eg. URL-based operations
+   or an import).
+
+   GET_COPYSRC_KIND_CB is a callback to determine the kind of a copy-source.
+   This is necessary when an Ev2/Ev1 shim is required by the RA provider,
+   in order to determine whether to use delta->add_directory() or the
+   delta->add_file() vtable entry to perform the copy.
+   ### unclear on impact if this is NULL.
+   ### this callback will disappear when "everything" is running Ev2
+
+   CB_BATON is the baton used/shared by the above three callbacks.
+
+   CANCEL_FUNC/BATON is a standard cancellation function, and is used for
+   the returned Ev2 editor, and possibly other RA-specific operations.
+
+   *EDITOR will be allocated in RESULT_POOL, and all temporary allocations
+   will be performed in SCRATCH_POOL.
+*/
+svn_error_t *
+svn_ra__get_commit_ev2(svn_editor_t **editor,
+                       svn_ra_session_t *session,
+                       apr_hash_t *revprops,
+                       svn_commit_callback2_t commit_cb,
+                       void *commit_baton,
+                       apr_hash_t *lock_tokens,
+                       svn_boolean_t keep_locks,
+                       svn_ra__provide_base_cb_t provide_base_cb,
+                       svn_ra__provide_props_cb_t provide_props_cb,
+                       svn_ra__get_copysrc_kind_cb_t get_copysrc_kind_cb,
+                       void *cb_baton,
+                       svn_cancel_func_t cancel_func,
+                       void *cancel_baton,
+                       apr_pool_t *result_pool,
+                       apr_pool_t *scratch_pool);
+
+
+/* Similar to #svn_ra_replay_revstart_callback_t, but with an Ev2 editor. */
+typedef svn_error_t *(*svn_ra__replay_revstart_ev2_callback_t)(
+  svn_revnum_t revision,
+  void *replay_baton,
+  svn_editor_t **editor,
+  apr_hash_t *rev_props,
+  apr_pool_t *pool);
+
+/* Similar to #svn_ra_replay_revfinish_callback_t, but with an Ev2 editor. */
+typedef svn_error_t *(*svn_ra__replay_revfinish_ev2_callback_t)(
+  svn_revnum_t revision,
+  void *replay_baton,
+  svn_editor_t *editor,
+  apr_hash_t *rev_props,
+  apr_pool_t *pool);
+
+/* Similar to svn_ra_replay_range(), but uses Ev2 versions of the callback
+   functions. */
+svn_error_t *
+svn_ra__replay_range_ev2(svn_ra_session_t *session,
+                         svn_revnum_t start_revision,
+                         svn_revnum_t end_revision,
+                         svn_revnum_t low_water_mark,
+                         svn_boolean_t send_deltas,
+                         svn_ra__replay_revstart_ev2_callback_t revstart_func,
+                         svn_ra__replay_revfinish_ev2_callback_t revfinish_func,
+                         void *replay_baton,
+                         apr_pool_t *pool);
+
+/* Similar to svn_ra_replay(), but with an Ev2 editor. */
+svn_error_t *
+svn_ra__replay_ev2(svn_ra_session_t *session,
+                   svn_revnum_t revision,
+                   svn_revnum_t low_water_mark,
+                   svn_boolean_t send_deltas,
+                   const svn_delta_editor_t *editor,
+                   void *edit_baton,
+                   apr_pool_t *pool);
+
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */

Modified: subversion/branches/fix-rdump-editor/subversion/include/private/svn_repos_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/include/private/svn_repos_private.h?rev=1339349&r1=1339348&r2=1339349&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/include/private/svn_repos_private.h (original)
+++ subversion/branches/fix-rdump-editor/subversion/include/private/svn_repos_private.h Wed May 16 20:32:43 2012
@@ -29,8 +29,9 @@
 
 #include <apr_pools.h>
 
-#include "svn_repos.h"
 #include "svn_types.h"
+#include "svn_repos.h"
+#include "svn_editor.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -81,6 +82,29 @@ const char *
 svn_repos__post_commit_error_str(svn_error_t *err,
                                  apr_pool_t *pool);
 
+/* A repos version of svn_fs_type */
+svn_error_t *
+svn_repos__fs_type(const char **fs_type,
+                   const char *repos_path,
+                   apr_pool_t *pool);
+
+
+/* Create a commit editor for REPOS, based on REVISION.  */
+svn_error_t *
+svn_repos__get_commit_ev2(svn_editor_t **editor,
+                          svn_repos_t *repos,
+                          svn_authz_t *authz,
+                          const char *authz_repos_name,
+                          const char *authz_user,
+                          apr_hash_t *revprops,
+                          svn_commit_callback2_t commit_cb,
+                          void *commit_baton,
+                          svn_cancel_func_t cancel_func,
+                          void *cancel_baton,
+                          apr_pool_t *result_pool,
+                          apr_pool_t *scratch_pool);
+
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */

Modified: subversion/branches/fix-rdump-editor/subversion/include/private/svn_sqlite.h
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/include/private/svn_sqlite.h?rev=1339349&r1=1339348&r2=1339349&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/include/private/svn_sqlite.h (original)
+++ subversion/branches/fix-rdump-editor/subversion/include/private/svn_sqlite.h Wed May 16 20:32:43 2012
@@ -151,7 +151,9 @@ svn_sqlite__get_statement(svn_sqlite__st
    Spec  Argument type             Item type
    ----  -----------------         ---------
    n     <none, absent>            Column assignment skip
-   i     apr_int64_t               Number
+   d     int                       Number
+   L     apr_int64_t               Number
+   i     apr_int64_t               Number (deprecated format spec)
    s     const char *              String
    b     const void *              Blob data
          apr_size_t                Blob length

Modified: subversion/branches/fix-rdump-editor/subversion/include/private/svn_string_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/include/private/svn_string_private.h?rev=1339349&r1=1339348&r2=1339349&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/include/private/svn_string_private.h (original)
+++ subversion/branches/fix-rdump-editor/subversion/include/private/svn_string_private.h Wed May 16 20:32:43 2012
@@ -58,6 +58,26 @@ svn_stringbuf__morph_into_string(svn_str
  *  with APR 0.9 */
 apr_status_t
 svn__strtoff(apr_off_t *offset, const char *buf, char **end, int base);
+
+/** Number of chars needed to represent signed (19 places + sign + NUL) or
+ * unsigned (20 places + NUL) integers as strings.
+ */
+#define SVN_INT64_BUFFER_SIZE 21
+
+/** Writes the @a number as string into @a dest. The latter must provide
+ * space for at least #SVN_INT64_BUFFER_SIZE characters. Returns the number
+ * chars written excluding the terminating NUL.
+ */
+apr_size_t
+svn__ui64toa(char * dest, apr_uint64_t number);
+
+/** Writes the @a number as string into @a dest. The latter must provide
+ * space for at least #SVN_INT64_BUFFER_SIZE characters. Returns the number
+ * chars written excluding the terminating NUL.
+ */
+apr_size_t
+svn__i64toa(char * dest, apr_int64_t number);
+
 /** @} */
 
 /** @} */

Modified: subversion/branches/fix-rdump-editor/subversion/include/private/svn_subr_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/include/private/svn_subr_private.h?rev=1339349&r1=1339348&r2=1339349&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/include/private/svn_subr_private.h (original)
+++ subversion/branches/fix-rdump-editor/subversion/include/private/svn_subr_private.h Wed May 16 20:32:43 2012
@@ -201,6 +201,108 @@ svn_stream__from_spillbuf(apr_size_t blo
 
 /** @} */
 
+/**
+ * Internal function for creating a MD5 checksum from a binary digest.
+ *
+ * @since New in 1.8
+ */
+svn_checksum_t *
+svn_checksum__from_digest_md5(const unsigned char *digest,
+                              apr_pool_t *result_pool);
+
+/**
+ * Internal function for creating a SHA1 checksum from a binary
+ * digest.
+ *
+ * @since New in 1.8
+ */
+svn_checksum_t *
+svn_checksum__from_digest_sha1(const unsigned char *digest,
+                               apr_pool_t *result_pool);
+
+
+/**
+ * @defgroup svn_hash_support Hash table serialization support
+ * @{
+ */
+
+/*----------------------------------------------------*/
+
+/**
+ * @defgroup svn_hash_misc Miscellaneous hash APIs
+ * @{
+ */
+
+/**
+ * Clear any key/value pairs in the hash table.  A wrapper for a
+ * apr_hash_clear(), which isn't available until APR 1.3.0.
+ *
+ * @since New in 1.5.
+ */
+svn_error_t *
+svn_hash__clear(apr_hash_t *hash, apr_pool_t *pool);
+
+/** @} */
+
+
+/**
+ * @defgroup svn_hash_getters Specialized getter APIs for hashes
+ * @{
+ */
+
+/** Find the value of a @a key in @a hash, return the value.
+ *
+ * If @a hash is @c NULL or if the @a key cannot be found, the
+ * @a default_value will be returned.
+ *
+ * @since New in 1.7.
+ */
+const char *
+svn_hash__get_cstring(apr_hash_t *hash,
+                      const char *key,
+                      const char *default_value);
+
+/** Like svn_hash_get_cstring(), but for boolean values.
+ *
+ * Parses the value as a boolean value. The recognized representations
+ * are 'TRUE'/'FALSE', 'yes'/'no', 'on'/'off', '1'/'0'; case does not
+ * matter.
+ *
+ * @since New in 1.7.
+ */
+svn_boolean_t
+svn_hash__get_bool(apr_hash_t *hash,
+                   const char *key,
+                   svn_boolean_t default_value);
+
+/** @} */
+
+/**
+ * @defgroup svn_hash_create Create optimized APR hash tables
+ * @{
+ */
+
+/** Returns a hash table, allocated in @a pool, with the same ordering of
+ * elements as APR 1.4.5 or earlier (using apr_hashfunc_default) but uses
+ * a faster hash function implementation.
+ *
+ * @since New in 1.8.
+ */
+apr_hash_t *
+svn_hash__make(apr_pool_t *pool);
+
+/** Returns a hash table, allocated in @a pool, that is faster to modify
+ * and access then the ones returned by @ref svn_hash__make. The element
+ * order does not match any APR default and is platform dependent.
+ *
+ * @since New in 1.8.
+ */
+apr_hash_t *
+svn_hash__make_fast(apr_pool_t *pool);
+
+/** @} */
+
+/** @} */
 
 #ifdef __cplusplus
 }

Propchange: subversion/branches/fix-rdump-editor/subversion/include/private/svn_subr_private.h
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: subversion/branches/fix-rdump-editor/subversion/include/private/svn_temp_serializer.h
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/include/private/svn_temp_serializer.h?rev=1339349&r1=1339348&r2=1339349&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/include/private/svn_temp_serializer.h (original)
+++ subversion/branches/fix-rdump-editor/subversion/include/private/svn_temp_serializer.h Wed May 16 20:32:43 2012
@@ -188,10 +188,10 @@ svn_temp_deserializer__resolve(void *buf
 /**
  * Similar to svn_temp_deserializer__resolve() but instead of modifying
  * the buffer content, the resulting pointer is passed back to the caller
- * a the return value.
+ * as the return value.
  */
 const void *
-svn_temp_deserializer__ptr(const void *buffer, const void **ptr);
+svn_temp_deserializer__ptr(const void *buffer, const void *const *ptr);
 
 #ifdef __cplusplus
 }

Modified: subversion/branches/fix-rdump-editor/subversion/include/private/svn_wc_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/include/private/svn_wc_private.h?rev=1339349&r1=1339348&r2=1339349&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/include/private/svn_wc_private.h (original)
+++ subversion/branches/fix-rdump-editor/subversion/include/private/svn_wc_private.h Wed May 16 20:32:43 2012
@@ -477,8 +477,9 @@ svn_wc__node_get_url(const char **url,
 
 /**
  * Retrieves the origin of the node as it is known in the repository. For
- * added nodes this retrieves where the node is copied from, and the repository
- * location for other nodes.
+ * a copied node this retrieves where the node is copied from, for an added
+ * node this returns NULL/INVALID outputs, and for any other node this
+ * retrieves the repository location.
  *
  * All output arguments may be NULL.
  *
@@ -627,21 +628,31 @@ svn_wc__node_has_working(svn_boolean_t *
 
 
 /**
- * Get the base revision of @a local_abspath using @a wc_ctx.  If
- * @a local_abspath is not in the working copy, return
- * @c SVN_ERR_WC_PATH_NOT_FOUND.
+ * Get the repository location of the base node at @a local_abspath.
  *
- * In @a *base_revision, return the revision of the revert-base, i.e. the
- * revision that this node was checked out at or last updated/switched to,
+ * Set *REVISION, *REPOS_RELPATH, *REPOS_ROOT_URL and *REPOS_UUID to the
+ * location that this node was checked out at or last updated/switched to,
  * regardless of any uncommitted changes (delete, replace and/or
- * copy-here/move-here).  For a locally added/copied/moved-here node that is
- * not part of a replace, return @c SVN_INVALID_REVNUM.
+ * copy-here/move-here).
+ *
+ * If there is no base node at @a local_abspath (such as when there is a
+ * locally added/copied/moved-here node that is not part of a replace),
+ * return @c SVN_INVALID_REVNUM/NULL/NULL/NULL.
+ *
+ * All output arguments may be NULL.
+ *
+ * Allocate the results in @a result_pool. Perform temporary allocations in
+ * @a scratch_pool.
  */
 svn_error_t *
-svn_wc__node_get_base_rev(svn_revnum_t *base_revision,
-                          svn_wc_context_t *wc_ctx,
-                          const char *local_abspath,
-                          apr_pool_t *scratch_pool);
+svn_wc__node_get_base(svn_revnum_t *revision,
+                      const char **repos_relpath,
+                      const char **repos_root_url,
+                      const char **repos_uuid,
+                      svn_wc_context_t *wc_ctx,
+                      const char *local_abspath,
+                      apr_pool_t *result_pool,
+                      apr_pool_t *scratch_pool);
 
 
 /* Get the working revision of @a local_abspath using @a wc_ctx. If @a
@@ -678,34 +689,33 @@ svn_wc__node_get_pre_ng_status_data(svn_
                                     apr_pool_t *scratch_pool);
 
 
-/** This whole function is for legacy, and it sucks. It does not really
- * make sense to get the copy-from revision number without the copy-from
- * URL, but higher level code currently wants that. This should go away.
- * (This function serves to get away from entry_t->revision without having to
- * change the public API.)
+/**
+ * Return the location of the base for this node's next commit,
+ * reflecting any local tree modifications affecting this node.
  *
- * Get the base revision of @a local_abspath using @a wc_ctx.  If @a
+ * Get the base location of @a local_abspath using @a wc_ctx.  If @a
  * local_abspath is not in the working copy, return @c
  * SVN_ERR_WC_PATH_NOT_FOUND.
  *
- * Return the revision number of the base for this node's next commit,
- * reflecting any local tree modifications affecting this node.
- *
- * If this node has no uncommitted changes, return the same as
- * svn_wc__node_get_base_rev().
+ * If this node has no uncommitted changes, return the same location as
+ * svn_wc__node_get_base().
  *
  * If this node is moved-here or copied-here (possibly as part of a replace),
- * return the revision of the copy/move source. Do the same even when the node
+ * return the location of the copy/move source. Do the same even when the node
  * has been removed from a recursive copy (subpath excluded from the copy).
  *
- * Else, if this node is locally added, return SVN_INVALID_REVNUM, or if this
- * node is locally deleted or replaced, return the revert-base revision.
+ * Else, if this node is locally added, return SVN_INVALID_REVNUM/NULL, or
+ * if locally deleted or replaced, return the revert-base location.
  */
 svn_error_t *
-svn_wc__node_get_commit_base_rev(svn_revnum_t *base_revision,
-                                 svn_wc_context_t *wc_ctx,
-                                 const char *local_abspath,
-                                 apr_pool_t *scratch_pool);
+svn_wc__node_get_commit_base(svn_revnum_t *revision,
+                             const char **repos_relpath,
+                             const char **repos_root_url,
+                             const char **repos_uuid,
+                             svn_wc_context_t *wc_ctx,
+                             const char *local_abspath,
+                             apr_pool_t *result_pool,
+                             apr_pool_t *scratch_pool);
 
 /**
  * Fetch lock information (if any) for @a local_abspath using @a wc_ctx:
@@ -837,7 +847,7 @@ svn_wc__call_with_write_lock(svn_wc__wit
     SVN_ERR(svn_wc__acquire_write_lock(&svn_wc__lock_root_abspath, wc_ctx,    \
                                        local_abspath, lock_anchor,            \
                                        scratch_pool, scratch_pool));          \
-    svn_wc__err1 = svn_error_trace(expr);                                     \
+    svn_wc__err1 = (expr);                                                    \
     svn_wc__err2 = svn_wc__release_write_lock(                                \
                      wc_ctx, svn_wc__lock_root_abspath, scratch_pool);        \
     SVN_ERR(svn_error_compose_create(svn_wc__err1, svn_wc__err2));            \
@@ -1024,6 +1034,16 @@ svn_wc__rename_wc(svn_wc_context_t *wc_c
                   const char *dst_abspath,
                   apr_pool_t *scratch_pool);
 
+/* Set *TMPDIR_ABSPATH to a directory that is suitable for temporary
+   files which may need to be moved (atomically and same-device) into
+   the working copy indicated by WRI_ABSPATH.  */
+svn_error_t *
+svn_wc__get_tmpdir(const char **tmpdir_abspath,
+                   svn_wc_context_t *wc_ctx,
+                   const char *wri_abspath,
+                   apr_pool_t *result_pool,
+                   apr_pool_t *scratch_pool);
+
 /* Gets information needed by the commit harvester.
  *
  * ### Currently this API is work in progress and is designed for just this
@@ -1031,23 +1051,14 @@ svn_wc__rename_wc(svn_wc_context_t *wc_c
  * ### it's caller will eventually move into a wc and maybe wc_db api.
  */
 svn_error_t *
-svn_wc__node_get_commit_status(svn_node_kind_t *kind,
-                               svn_boolean_t *added,
+svn_wc__node_get_commit_status(svn_boolean_t *added,
                                svn_boolean_t *deleted,
-                               svn_boolean_t *replaced,
-                               svn_boolean_t *not_present,
-                               svn_boolean_t *excluded,
+                               svn_boolean_t *is_replace_root,
                                svn_boolean_t *is_op_root,
-                               svn_boolean_t *symlink,
                                svn_revnum_t *revision,
-                               const char **repos_relpath,
                                svn_revnum_t *original_revision,
                                const char **original_repos_relpath,
-                               svn_boolean_t *conflicted,
-                               const char **changelist,
-                               svn_boolean_t *props_mod,
                                svn_boolean_t *update_root,
-                               const char **lock_token,
                                svn_wc_context_t *wc_ctx,
                                const char *local_abspath,
                                apr_pool_t *result_pool,
@@ -1066,6 +1077,17 @@ svn_wc__node_get_md5_from_sha1(const svn
                                apr_pool_t *result_pool,
                                apr_pool_t *scratch_pool);
 
+/* Like svn_wc_get_pristine_contents2(), but keyed on the
+   SHA1_CHECKSUM rather than on the local absolute path of the working
+   file.  WRI_ABSPATH is any versioned path of the working copy in
+   whose pristine database we'll be looking for these contents.  */
+svn_error_t *
+svn_wc__get_pristine_contents_by_checksum(svn_stream_t **contents,
+                                          svn_wc_context_t *wc_ctx,
+                                          const char *wri_abspath,
+                                          const svn_checksum_t *sha1_checksum,
+                                          apr_pool_t *result_pool,
+                                          apr_pool_t *scratch_pool);
 
 /* Gets an array of const char *repos_relpaths of descendants of LOCAL_ABSPATH,
  * which must be the op root of an addition, copy or move. The descendants
@@ -1621,6 +1643,76 @@ svn_wc__get_diff_editor(const svn_delta_
                         apr_pool_t *result_pool,
                         apr_pool_t *scratch_pool);
 
+/**
+ * Assuming @a local_abspath itself or any of its children are under version
+ * control or a tree conflict victim and in a state of conflict, take these
+ * nodes out of this state. 
+ *
+ * If @a resolve_text is TRUE then any text conflict is resolved,
+ * if @a resolve_tree is TRUE then any tree conflicts are resolved.
+ * If @a resolve_prop is set to "" all property conflicts are resolved,
+ * if it is set to any other string value, conflicts on that specific
+ * property are resolved and when resolve_prop is NULL, no property
+ * conflicts are resolved.
+ *
+ * If @a depth is #svn_depth_empty, act only on @a local_abspath; if
+ * #svn_depth_files, resolve @a local_abspath and its conflicted file
+ * children (if any); if #svn_depth_immediates, resolve @a local_abspath
+ * and all its immediate conflicted children (both files and directories,
+ * if any); if #svn_depth_infinity, resolve @a local_abspath and every
+ * conflicted file or directory anywhere beneath it.
+ *
+ * If @a conflict_choice is #svn_wc_conflict_choose_base, resolve the
+ * conflict with the old file contents; if
+ * #svn_wc_conflict_choose_mine_full, use the original working contents;
+ * if #svn_wc_conflict_choose_theirs_full, the new contents; and if
+ * #svn_wc_conflict_choose_merged, don't change the contents at all,
+ * just remove the conflict status, which is the pre-1.5 behavior.
+ *
+ * If @a conflict_choice is #svn_wc_conflict_choose_unspecified, invoke the
+ * @a conflict_func with the @a conflict_baton argument to obtain a
+ * resolution decision for each conflict.
+ *
+ * #svn_wc_conflict_choose_theirs_conflict and
+ * #svn_wc_conflict_choose_mine_conflict are not legal for binary
+ * files or properties.
+ *
+ * @a wc_ctx is a working copy context, with a write lock, for @a
+ * local_abspath.
+ *
+ * The implementation details are opaque, as our "conflicted" criteria
+ * might change over time.  (At the moment, this routine removes the
+ * three fulltext 'backup' files and any .prej file created in a conflict,
+ * and modifies @a local_abspath's entry.)
+ *
+ * If @a local_abspath is not under version control and not a tree
+ * conflict, return #SVN_ERR_ENTRY_NOT_FOUND. If @a path isn't in a
+ * state of conflict to begin with, do nothing, and return #SVN_NO_ERROR.
+ *
+ * If @c local_abspath was successfully taken out of a state of conflict,
+ * report this information to @c notify_func (if non-@c NULL.)  If only
+ * text, only property, or only tree conflict resolution was requested,
+ * and it was successful, then success gets reported.
+ *
+ * Temporary allocations will be performed in @a scratch_pool.
+ *
+ * @since New in 1.8.
+ */
+svn_error_t *
+svn_wc__resolve_conflicts(svn_wc_context_t *wc_ctx,
+                          const char *local_abspath,
+                          svn_depth_t depth,
+                          svn_boolean_t resolve_text,
+                          const char *resolve_prop,
+                          svn_boolean_t resolve_tree,
+                          svn_wc_conflict_choice_t conflict_choice,
+                          svn_wc_conflict_resolver_func2_t conflict_func,
+                          void *conflict_baton,
+                          svn_cancel_func_t cancel_func,
+                          void *cancel_baton,
+                          svn_wc_notify_func2_t notify_func,
+                          void *notify_baton,
+                          apr_pool_t *scratch_pool);
 
 #ifdef __cplusplus
 }

Modified: subversion/branches/fix-rdump-editor/subversion/include/svn_checksum.h
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/include/svn_checksum.h?rev=1339349&r1=1339348&r2=1339349&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/include/svn_checksum.h (original)
+++ subversion/branches/fix-rdump-editor/subversion/include/svn_checksum.h Wed May 16 20:32:43 2012
@@ -100,7 +100,8 @@ svn_checksum_match(const svn_checksum_t 
 
 
 /**
- * Return a deep copy of @a checksum, allocated in @a pool.
+ * Return a deep copy of @a checksum, allocated in @a pool.  If @a
+ * checksum is NULL then NULL is returned.
  *
  * @since New in 1.6.
  */
@@ -269,18 +270,6 @@ svn_checksum_mismatch_err(const svn_chec
                           ...)
   __attribute__ ((format(printf, 4, 5)));
 
-
-/**
- * Internal function for creating a checksum from a binary digest.
- *
- * @since New in 1.6
- */
-svn_checksum_t *
-svn_checksum__from_digest(const unsigned char *digest,
-                          svn_checksum_kind_t kind,
-                          apr_pool_t *result_pool);
-
-
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */

Modified: subversion/branches/fix-rdump-editor/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/include/svn_client.h?rev=1339349&r1=1339348&r2=1339349&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/include/svn_client.h (original)
+++ subversion/branches/fix-rdump-editor/subversion/include/svn_client.h Wed May 16 20:32:43 2012
@@ -1768,6 +1768,30 @@ svn_client_delete(svn_client_commit_info
  * @{
  */
 
+/**
+ * The callback invoked by svn_client_import5() before adding a node to the
+ * list of nodes to be imported.
+ *
+ * @a baton is the value passed to @a svn_client_import5 as filter_baton.
+ *
+ * The callback receives the @a local_abspath for each node and the @a dirent
+ * for it when walking the directory tree. Only the kind of node, including
+ * special status is available in @a dirent.
+ *
+ * Implementations can set @a *filtered to TRUE, to make the import filter the
+ * node and (if the node is a directory) all its descendants.
+ *
+ * @a scratch_pool can be used for temporary allocations.
+ *
+ * @since New in 1.8.
+ */
+typedef svn_error_t *(*svn_client_import_filter_func_t)(
+  void *baton,
+  svn_boolean_t *filtered,
+  const char *local_abspath,
+  const svn_io_dirent2_t *dirent,
+  apr_pool_t *scratch_pool);
+
 /** Import file or directory @a path into repository directory @a url at
  * head, authenticating with the authentication baton cached in @a ctx,
  * and using @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to get a log message
@@ -1823,12 +1847,38 @@ svn_client_delete(svn_client_commit_info
  * If @a ignore_unknown_node_types is @c FALSE, ignore files of which the
  * node type is unknown, such as device files and pipes.
  *
+ * If @a filter_callback is non-NULL, call it for each node that isn't ignored
+ * for other reasons with @a filter_baton, to allow third party to ignore
+ * specific nodes during importing.
+ *
  * If @a commit_callback is non-NULL, then for each successful commit, call
  * @a commit_callback with @a commit_baton and a #svn_commit_info_t for
  * the commit.
  *
+ * @since New in 1.8.
+ */
+svn_error_t *
+svn_client_import5(const char *path,
+                   const char *url,
+                   svn_depth_t depth,
+                   svn_boolean_t no_ignore,
+                   svn_boolean_t ignore_unknown_node_types,
+                   const apr_hash_t *revprop_table,
+                   svn_client_import_filter_func_t filter_callback,
+                   void *filter_baton,
+                   svn_commit_callback2_t commit_callback,
+                   void *commit_baton,
+                   svn_client_ctx_t *ctx,
+                   apr_pool_t *scratch_pool);
+
+/**
+ * Similar to svn_client_import5(), but without support for an optional
+ * @a filter_callback.
+ *
  * @since New in 1.7.
+ * @deprecated Provided for backward compatibility with the 1.7 API.
  */
+SVN_DEPRECATED
 svn_error_t *
 svn_client_import4(const char *path,
                    const char *url,
@@ -2833,6 +2883,11 @@ svn_client_blame(const char *path_or_url
  * will be used.
  * ### Do we need to say more about the format? A reference perhaps?
  *
+ * If @a ignore_properties is TRUE, do not show property differences.
+ * If @a properties_only is TRUE, show only property changes.
+ * The above two options are mutually exclusive. It is an error to set
+ * both to TRUE.
+ *
  * Generated headers are encoded using @a header_encoding.
  *
  * Diff output will not be generated for binary files, unless @a
@@ -2877,7 +2932,8 @@ svn_client_diff6(const apr_array_header_
                  svn_boolean_t no_diff_deleted,
                  svn_boolean_t show_copies_as_adds,
                  svn_boolean_t ignore_content_type,
-                 svn_boolean_t ignore_prop_diff,
+                 svn_boolean_t ignore_properties,
+                 svn_boolean_t properties_only,
                  svn_boolean_t use_git_diff_format,
                  const char *header_encoding,
                  svn_stream_t *outstream,
@@ -3037,7 +3093,8 @@ svn_client_diff_peg6(const apr_array_hea
                      svn_boolean_t no_diff_deleted,
                      svn_boolean_t show_copies_as_adds,
                      svn_boolean_t ignore_content_type,
-                     svn_boolean_t ignore_prop_diff,
+                     svn_boolean_t ignore_properties,
+                     svn_boolean_t properties_only,
                      svn_boolean_t use_git_diff_format,
                      const char *header_encoding,
                      svn_stream_t *outstream,

Modified: subversion/branches/fix-rdump-editor/subversion/include/svn_config.h
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/include/svn_config.h?rev=1339349&r1=1339348&r2=1339349&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/include/svn_config.h (original)
+++ subversion/branches/fix-rdump-editor/subversion/include/svn_config.h Wed May 16 20:32:43 2012
@@ -303,6 +303,32 @@ svn_config_set_bool(svn_config_t *cfg,
                     const char *option,
                     svn_boolean_t value);
 
+/** Like svn_config_get(), but for 64 bit signed integers.
+ *
+ * Parses the option as an integer value. Returns an error if the option
+ * could not be converted to an integer.
+ *
+ * @since New in 1.8
+ */
+svn_error_t *
+svn_config_get_int64(svn_config_t *cfg,
+                     apr_int64_t *valuep,
+                     const char *section,
+                     const char *option,
+                     apr_int64_t default_value);
+
+/** Like svn_config_set(), but for 64 bit signed integers.
+ *
+ * Sets the option to the signed decimal @a value.
+ *
+ * @since New in 1.8
+ */
+void
+svn_config_set_int64(svn_config_t *cfg,
+                     const char *section,
+                     const char *option,
+                     apr_int64_t value);
+
 /** Like svn_config_get(), but only for yes/no/ask values.
  *
  * Parse @a option in @a section and set @a *valuep to one of

Modified: subversion/branches/fix-rdump-editor/subversion/include/svn_delta.h
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/include/svn_delta.h?rev=1339349&r1=1339348&r2=1339349&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/include/svn_delta.h (original)
+++ subversion/branches/fix-rdump-editor/subversion/include/svn_delta.h Wed May 16 20:32:43 2012
@@ -1170,6 +1170,8 @@ svn_editor__insert_shims(const svn_delta
                          void **dedit_baton_out,
                          const svn_delta_editor_t *deditor_in,
                          void *dedit_baton_in,
+                         const char *repos_root,
+                         const char *base_dir,
                          svn_delta_shim_callbacks_t *shim_callbacks,
                          apr_pool_t *result_pool,
                          apr_pool_t *scratch_pool);
@@ -1283,17 +1285,40 @@ typedef svn_error_t *(*svn_delta_path_dr
   apr_pool_t *pool);
 
 
-/** Drive @a editor (with its @a edit_baton) in such a way that
- * each path in @a paths is traversed in a depth-first fashion.  As
- * each path is hit as part of the editor drive, use @a
- * callback_func and @a callback_baton to allow the caller to handle
+/** Drive @a editor (with its @a edit_baton) to visit each path in @a paths.
+ * As each path is hit as part of the editor drive, use
+ * @a callback_func and @a callback_baton to allow the caller to handle
  * the portion of the editor drive related to that path.
  *
- * Use @a revision as the revision number passed to intermediate
- * directory openings.
+ * Each path in @a paths is a const char *. The editor drive will be
+ * performed in the same order as @a paths. The paths should be sorted
+ * using something like svn_sort_compare_paths to ensure that a depth-first
+ * pattern is observed for directory/file baton creation. Some callers may
+ * need further customization of the order (ie. libsvn_delta/compat.c).
  *
- * Use @a pool for all necessary allocations.
+ * Use @a scratch_pool for all necessary allocations.
+ *
+ * @since New in 1.8.
+ */
+svn_error_t *
+svn_delta_path_driver2(const svn_delta_editor_t *editor,
+                       void *edit_baton,
+                       const apr_array_header_t *paths,
+                       svn_delta_path_driver_cb_func_t callback_func,
+                       void *callback_baton,
+                       apr_pool_t *scratch_pool);
+
+
+/** Similar to svn_delta_path_driver2, but takes an (unused) revision,
+ * and will sort the provided @a paths using svn_sort_compare_paths.
+ *
+ * @note In versions prior to 1.8, this function would modify the order
+ * of elements in @a paths, despite the 'const' marker on the parameter.
+ * This has been fixed in 1.8.
+ *
+ * @deprecated Provided for backward compatibility with the 1.7 API.
  */
+SVN_DEPRECATED
 svn_error_t *
 svn_delta_path_driver(const svn_delta_editor_t *editor,
                       void *edit_baton,
@@ -1301,7 +1326,7 @@ svn_delta_path_driver(const svn_delta_ed
                       const apr_array_header_t *paths,
                       svn_delta_path_driver_cb_func_t callback_func,
                       void *callback_baton,
-                      apr_pool_t *pool);
+                      apr_pool_t *scratch_pool);
 
 /** @} */
 

Modified: subversion/branches/fix-rdump-editor/subversion/include/svn_diff.h
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/include/svn_diff.h?rev=1339349&r1=1339348&r2=1339349&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/include/svn_diff.h (original)
+++ subversion/branches/fix-rdump-editor/subversion/include/svn_diff.h Wed May 16 20:32:43 2012
@@ -1045,7 +1045,7 @@ typedef struct svn_patch_t {
   const char *new_filename;
 
   /**
-   * An array containing an svn_diff_hunk_t object for each hunk parsed
+   * An array containing an svn_diff_hunk_t * for each hunk parsed
    * from the patch. */
   apr_array_header_t *hunks;
 

Modified: subversion/branches/fix-rdump-editor/subversion/include/svn_editor.h
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/include/svn_editor.h?rev=1339349&r1=1339348&r2=1339349&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/include/svn_editor.h (original)
+++ subversion/branches/fix-rdump-editor/subversion/include/svn_editor.h Wed May 16 20:32:43 2012
@@ -153,6 +153,15 @@ extern "C" {
  * "should", "should not", "recommended", "may", and "optional" in this
  * document are to be interpreted as described in RFC 2119.
  *
+ * @note The editor objects are *not* reentrant. The receiver should not
+ * directly or indirectly invoke an editor API with the same object unless
+ * it has been marked as explicitly supporting reentrancy during a
+ * receiver's callback. This limitation extends to the cancellation
+ * callback, too. (This limitation is due to the scratch_pool shared by
+ * all callbacks, and cleared after each callback; a reentrant call could
+ * clear the outer call's pool). Note that the code itself is reentrant, so
+ * there is no problem using the APIs on different editor objects.
+ *
  * \n
  * <h3>Life-Cycle</h3>
  *
@@ -237,6 +246,10 @@ extern "C" {
  * In order to reduce complexity of callback receivers, the editor callbacks
  * must be driven in adherence to these rules:
  *
+ * - If any path is added (with add_*) or deleted/moved/rotated, then
+ *   an svn_editor_alter_directory() call must be made for its parent
+ *   directory with the target/eventual set of children.
+ *
  * - svn_editor_add_directory() -- Another svn_editor_add_*() call must
  *   follow for each child mentioned in the @a children argument of any
  *   svn_editor_add_directory() call.
@@ -247,9 +260,8 @@ extern "C" {
  *   This allows the parent directory to properly mark the child as
  *   "incomplete" until the child's add_* call arrives.
  *
- * - A path should
- *   never be referenced more than once by the add_*, alter_*, and
- *   delete operations (the "Once Rule"). The source path of a copy (and
+ * - A path should never be referenced more than once by the add_*, alter_*,
+ *   and delete operations (the "Once Rule"). The source path of a copy (and
  *   its children, if a directory) may be copied many times, and are
  *   otherwise subject to the Once Rule. The destination path of a copy
  *   or move may have alter_* operations applied, but not add_* or delete.
@@ -333,14 +345,19 @@ extern "C" {
  *
  * <h3>Paths</h3>
  * Each driver/receiver implementation of this editor interface must
- * establish the expected root path for the paths sent and received via the
- * callbacks' @a relpath arguments.
+ * establish the expected root for all the paths sent and received via
+ * the callbacks' @a relpath arguments.
  *
- * For example, during an "update", the driver has a working copy checked
- * out at a specific repository URL. The receiver sees the repository as a
- * whole. Here, the receiver could tell the driver which repository
- * URL the working copy refers to, and thus the driver could send
- * @a relpath arguments that are relative to the receiver's working copy.
+ * For example, during an "update", the driver is the repository, as a
+ * whole. The receiver may have just a portion of that repository. Here,
+ * the receiver could tell the driver which repository URL the working
+ * copy refers to, and thus the driver could send @a relpath arguments
+ * that are relative to the receiver's working copy.
+ *
+ * @note Because the source of a copy may be located *anywhere* in the
+ * repository, editor drives should typically use the repository root
+ * as the negotiated root. This allows the @a src_relpath argument in
+ * svn_editor_copy() to specify any possible source.
  * \n\n
  *
  * <h3>Pool Usage</h3>
@@ -466,6 +483,7 @@ typedef svn_error_t *(*svn_editor_cb_alt
   void *baton,
   const char *relpath,
   svn_revnum_t revision,
+  const apr_array_header_t *children,
   apr_hash_t *props,
   apr_pool_t *scratch_pool);
 
@@ -572,6 +590,17 @@ svn_editor_create(svn_editor_t **editor,
                   apr_pool_t *scratch_pool);
 
 
+/** Return an editor's private baton.
+ *
+ * In some cases, the baton is required outside of the callbacks. This
+ * function returns the private baton for use.
+ *
+ * @since New in 1.8.
+ */
+void *
+svn_editor_get_baton(const svn_editor_t *editor);
+
+
 /** Sets the #svn_editor_cb_add_directory_t callback in @a editor
  * to @a callback.
  * @a scratch_pool is used for temporary allocations (if any).
@@ -853,14 +882,24 @@ svn_editor_add_absent(svn_editor_t *edit
 
 /** Drive @a editor's #svn_editor_cb_alter_directory_t callback.
  *
- * Alter the properties of the directory at @a relpath. @a revision
- * specifies the expected revision of the directory. This is used to
- * catched attempts at altering out-of-date directories. If the
+ * Alter the properties of the directory at @a relpath.
+ *
+ * @a revision specifies the expected revision of the directory and is
+ * used to catch attempts at altering out-of-date directories. If the
  * directory does not have a corresponding revision in the repository
  * (e.g. it has not yet been committed), then @a revision should be
  * #SVN_INVALID_REVNUM.
  *
- * For a description of @a props, see svn_editor_add_file().
+ * If any changes to the set of children will be made in the future of
+ * the edit drive, then @a children MUST specify the resulting set of
+ * children. See svn_editor_add_directory() for the format of @a children.
+ * If not changes will be made, then NULL may be specified.
+ *
+ * For a description of @a props, see svn_editor_add_file(). If no changes
+ * to the properties will be made (ie. only future changes to the set of
+ * children), then @a props may be NULL.
+ *
+ * It is an error to pass NULL for both @a children and @a props.
  *
  * For all restrictions on driving the editor, see #svn_editor_t.
  * @since New in 1.8.
@@ -869,6 +908,7 @@ svn_error_t *
 svn_editor_alter_directory(svn_editor_t *editor,
                            const char *relpath,
                            svn_revnum_t revision,
+                           const apr_array_header_t *children,
                            apr_hash_t *props);
 
 /** Drive @a editor's #svn_editor_cb_alter_file_t callback.
@@ -948,6 +988,11 @@ svn_editor_delete(svn_editor_t *editor,
  *
  * For a description of @a replaces_rev, see svn_editor_add_file().
  *
+ * @note See the general instructions on paths for this API. Since the
+ * @a src_relpath argument must generally be able to reference any node
+ * in the repository, the implication is that the editor's root must be
+ * the repository root.
+ *
  * For all restrictions on driving the editor, see #svn_editor_t.
  * @since New in 1.8.
  */
@@ -964,6 +1009,9 @@ svn_editor_copy(svn_editor_t *editor,
  *
  * For a description of @a replaces_rev, see svn_editor_add_file().
  *
+ * ### what happens if one side of this move is not "within" the receiver's
+ * ### set of paths?
+ *
  * For all restrictions on driving the editor, see #svn_editor_t.
  * @since New in 1.8.
  */
@@ -993,6 +1041,9 @@ svn_editor_move(svn_editor_t *editor,
  * restrictions against multiple moves of a single node, the rotation
  * operation is needed for certain types of tree edits.
  *
+ * ### what happens if one of the paths of the rotation is not "within" the
+ * ### receiver's set of paths?
+ *
  * For all restrictions on driving the editor, see #svn_editor_t.
  * @since New in 1.8.
  */

Modified: subversion/branches/fix-rdump-editor/subversion/include/svn_error.h
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/include/svn_error.h?rev=1339349&r1=1339348&r2=1339349&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/include/svn_error.h (original)
+++ subversion/branches/fix-rdump-editor/subversion/include/svn_error.h Wed May 16 20:32:43 2012
@@ -317,7 +317,10 @@ svn_handle_warning(FILE *stream,
 #ifdef SVN_ERR__TRACING
 #define SVN_ERR__TRACED "traced call"
 
-#define svn_error_trace(expr)  svn_error_quick_wrap((expr), SVN_ERR__TRACED)
+svn_error_t *
+svn_error__trace(const char *file, long line, svn_error_t *err);
+
+#define svn_error_trace(expr)  svn_error__trace(__FILE__, __LINE__, (expr))
 #else
 #define svn_error_trace(expr)  (expr)
 #endif
@@ -460,6 +463,31 @@ svn_error_t *svn_error_purge_tracing(svn
     abort();                                                 \
   } while (1)
 
+/** Like SVN_ERR_ASSERT(), but append ERR to the returned error chain.
+ *
+ * If EXPR is false, return a malfunction error whose chain includes ERR.
+ * If EXPR is true, do nothing.  (In particular, this does not clear ERR.)
+ *
+ * Types: (svn_boolean_t expr, svn_error_t *err)
+ *
+ * @since New in 1.8.
+ */
+#ifdef __clang_analyzer__
+#include <assert.h>
+/* Just ignore ERR.  If the assert triggers, it'll be our least concern. */
+#define SVN_ERR_ASSERT_E(expr, err)       assert((expr))
+#else
+#define SVN_ERR_ASSERT_E(expr, err)                                      \
+  do {                                                                  \
+    if (!(expr)) {                                                      \
+      return svn_error_compose_create(                                  \
+               svn_error__malfunction(TRUE, __FILE__, __LINE__, #expr), \
+               (err));                                                  \
+    }                                                                   \
+  } while (0)
+#endif
+
+
 /** Check that a condition is true: if not, report an error and possibly
  * terminate the program.
  *
@@ -478,6 +506,8 @@ svn_error_t *svn_error_purge_tracing(svn
  * evaluation of this expression is not compiled out in release-mode builds.
  *
  * @since New in 1.6.
+ *
+ * @see SVN_ERR_ASSERT_E()
  */
 #ifdef __clang_analyzer__
 #include <assert.h>

Modified: subversion/branches/fix-rdump-editor/subversion/include/svn_error_codes.h
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/include/svn_error_codes.h?rev=1339349&r1=1339348&r2=1339349&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/include/svn_error_codes.h (original)
+++ subversion/branches/fix-rdump-editor/subversion/include/svn_error_codes.h Wed May 16 20:32:43 2012
@@ -224,6 +224,11 @@ SVN_ERROR_START
              SVN_ERR_BAD_CATEGORY_START + 14,
              "Invalid changelist name")
 
+  /** @since New in 1.8. */
+  SVN_ERRDEF(SVN_ERR_BAD_ATOMIC,
+             SVN_ERR_BAD_CATEGORY_START + 15,
+             "Invalid atomic")
+
   /* xml errors */
 
   SVN_ERRDEF(SVN_ERR_XML_ATTRIB_NOT_FOUND,
@@ -762,6 +767,11 @@ SVN_ERROR_START
              "Property value in filesystem differs from the provided "
              "base value")
 
+  /** @since New in 1.8. */
+  SVN_ERRDEF(SVN_ERR_FS_INCORRECT_EDITOR_COMPLETION,
+             SVN_ERR_FS_CATEGORY_START + 50,
+             "The filesystem editor completion process was not followed")
+
   /* repos errors */
 
   SVN_ERRDEF(SVN_ERR_REPOS_LOCKED,

Modified: subversion/branches/fix-rdump-editor/subversion/include/svn_fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/include/svn_fs.h?rev=1339349&r1=1339348&r2=1339349&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/include/svn_fs.h (original)
+++ subversion/branches/fix-rdump-editor/subversion/include/svn_fs.h Wed May 16 20:32:43 2012
@@ -39,6 +39,7 @@
 #include "svn_io.h"
 #include "svn_mergeinfo.h"
 #include "svn_checksum.h"
+#include "svn_editor.h"
 
 
 #ifdef __cplusplus
@@ -85,6 +86,12 @@ typedef struct svn_fs_t svn_fs_t;
  */
 #define SVN_FS_CONFIG_FSFS_CACHE_FULLTEXTS      "fsfs-cache-fulltexts"
 
+/** Enable / disable revprop caching for a FSFS repository.
+ *
+ * @since New in 1.8.
+ */
+#define SVN_FS_CONFIG_FSFS_CACHE_REVPROPS       "fsfs-cache-revprops"
+
 /* See also svn_fs_type(). */
 /** @since New in 1.1. */
 #define SVN_FS_CONFIG_FS_TYPE                   "fs-type"
@@ -801,6 +808,7 @@ typedef struct svn_fs_txn_t svn_fs_txn_t
  * if a caller tries to edit a locked item without having rights to the lock.
  */
 #define SVN_FS_TXN_CHECK_LOCKS                   0x00002
+
 /** @} */
 
 /**
@@ -857,7 +865,7 @@ svn_fs_begin_txn(svn_fs_txn_t **txn_p,
  * If @a conflict_p is non-zero, use it to provide details on any
  * conflicts encountered merging @a txn with the most recent committed
  * revisions.  If a conflict occurs, set @a *conflict_p to the path of
- * the conflict in @a txn, with the same lifetime as @a txn;
+ * the conflict in @a txn, allocated within @a pool;
  * otherwise, set @a *conflict_p to NULL.
  *
  * If the commit succeeds, @a txn is invalid.
@@ -872,6 +880,25 @@ svn_fs_begin_txn(svn_fs_txn_t **txn_p,
  * the value is a valid revision number, the commit was successful,
  * even though a non-@c NULL function return value may indicate that
  * something else went wrong in post commit FS processing.
+ *
+ * @note See api-errata/1.8/fs001.txt for information on how this
+ * function was documented in versions prior to 1.8.
+ *
+ * ### need to document this better. there are four combinations of
+ * ### return values:
+ * ### 1) err=NULL. conflict=NULL. new_rev is valid
+ * ### 2) err=SVN_ERR_FS_CONFLICT. conflict is set. new_rev=SVN_INVALID_REVNUM
+ * ### 3) err=!NULL. conflict=NULL. new_rev is valid
+ * ### 4) err=!NULL. conflict=NULL. new_rev=SVN_INVALID_REVNUM
+ * ###
+ * ### some invariants:
+ * ###   *conflict_p will be non-NULL IFF SVN_ERR_FS_CONFLICT
+ * ###   if *conflict_p is set (and SVN_ERR_FS_CONFLICT), then new_rev
+ * ###     will always be SVN_INVALID_REVNUM
+ * ###   *conflict_p will always be initialized to NULL, or to a valid
+ * ###     conflict string
+ * ###   *new_rev will always be initialized to SVN_INVALID_REVNUM, or
+ * ###     to a valid, committed revision number
  */
 svn_error_t *
 svn_fs_commit_txn(const char **conflict_p,
@@ -999,6 +1026,118 @@ svn_fs_change_txn_props(svn_fs_txn_t *tx
 /** @} */
 
 
+/** Editors
+ *
+ * ### docco
+ *
+ * @defgroup svn_fs_editor Transaction editors
+ * @{
+ */
+
+/**
+ * Create a new filesystem transaction, based on based on the youngest
+ * revision of @a fs, and return its name @a *txn_name and an @a *editor
+ * that can be used to make changes into it.
+ *
+ * @a flags determines transaction enforcement behaviors, and is composed
+ * from the constants SVN_FS_TXN_* (#SVN_FS_TXN_CHECK_OOD etc.). It is a
+ * property of the underlying transaction, and will not change if multiple
+ * editors are used to refer to that transaction (see @a autocommit, below).
+ * 
+ * @note If you're building a txn for committing, you probably don't want
+ * to call this directly.  Instead, call svn_repos__get_commit_ev2(), which
+ * honors the repository's hook configurations.
+ *
+ * When svn_editor_complete() is called for @a editor, internal resources
+ * will be cleaned and nothing more will happen. If you wish to commit the
+ * transaction, call svn_fs_editor_commit() instead. It is illegal to call
+ * both; the second call will return #SVN_ERR_FS_INCORRECT_EDITOR_COMPLETION.
+ *
+ * @see svn_fs_commit_txn()
+ *
+ * @since New in 1.8.
+ */
+svn_error_t *
+svn_fs_editor_create(svn_editor_t **editor,
+                     const char **txn_name,
+                     svn_fs_t *fs,
+                     apr_uint32_t flags,
+                     svn_cancel_func_t cancel_func,
+                     void *cancel_baton,
+                     apr_pool_t *result_pool,
+                     apr_pool_t *scratch_pool);
+
+
+/**
+ * Like svn_fs_editor_create(), but open an existing transaction
+ * @a txn_name and continue editing it.
+ *
+ * @since New in 1.8.
+ */
+svn_error_t *
+svn_fs_editor_create_for(svn_editor_t **editor,
+                         svn_fs_t *fs,
+                         const char *txn_name,
+                         svn_cancel_func_t cancel_func,
+                         void *cancel_baton,
+                         apr_pool_t *result_pool,
+                         apr_pool_t *scratch_pool);
+
+
+/**
+ * Commit the transaction represented by @a editor.
+ *
+ * If the commit to the filesystem succeeds, then @a *revision will be set
+ * to the resulting revision number. Note that further errors may occur,
+ * as described below. If the commit process does not succeed, for whatever
+ * reason, then @a *revision will be set to #SVN_INVALID_REVNUM.
+ *
+ * If a conflict occurs during the commit, then @a *conflict_path will
+ * be set to a path that caused the conflict. #SVN_NO_ERROR will be returned.
+ * Callers may want to construct an #SVN_ERR_FS_CONFLICT error with a
+ * message that incorporates @a *conflict_path.
+ *
+ * If a non-conflict error occurs during the commit, then that error will
+ * be returned.
+ * As is standard with any Subversion API, @a revision, @a post_commit_err,
+ * and @a conflict_path (the OUT parameters) have an indeterminate value if
+ * an error is returned.
+ *
+ * If the commit completes (and a revision is returned in @a *revision), then
+ * it is still possible for an error to occur during the cleanup process.
+ * Any such error will be returned in @a *post_commit_err. The caller must
+ * properly use or clear that error.
+ *
+ * If svn_editor_complete() has already been called on @a editor, then
+ * #SVN_ERR_FS_INCORRECT_EDITOR_COMPLETION will be returned.
+ *
+ * @note After calling this function, @a editor will be marked as completed
+ * and no further operations may be performed on it. The underlying
+ * transaction will either be committed or aborted once this function is
+ * called. It cannot be recovered for additional work.
+ *
+ * @a result_pool will be used to allocate space for @a conflict_path.
+ * @a scratch_pool will be used for all temporary allocations.
+ *
+ * @note To summarize, there are three possible outcomes of this function:
+ * successful commit (with or without an associated @a *post_commit_err);
+ * failed commit due to a conflict (reported via @a *conflict_path); and
+ * failed commit for some other reason (reported via the returned error.)
+ *
+ * @since New in 1.8.
+ */
+svn_error_t *
+svn_fs_editor_commit(svn_revnum_t *revision,
+                     svn_error_t **post_commit_err,
+                     const char **conflict_path,
+                     svn_editor_t *editor,
+                     apr_pool_t *result_pool,
+                     apr_pool_t *scratch_pool);
+
+
+/** @} */
+
+
 /** Roots.
  *
  * An #svn_fs_root_t object represents the root directory of some