You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ph...@apache.org on 2012/03/14 14:07:09 UTC
svn commit: r1300532 [2/9] - in /subversion/branches/multi-layer-moves: ./
build/ build/ac-macros/ build/generator/ build/generator/templates/
build/win32/ notes/ notes/directory-index/ subversion/bindings/javahl/
subversion/bindings/javahl/native/ sub...
Modified: subversion/branches/multi-layer-moves/subversion/include/svn_delta.h
URL: http://svn.apache.org/viewvc/subversion/branches/multi-layer-moves/subversion/include/svn_delta.h?rev=1300532&r1=1300531&r2=1300532&view=diff
==============================================================================
--- subversion/branches/multi-layer-moves/subversion/include/svn_delta.h (original)
+++ subversion/branches/multi-layer-moves/subversion/include/svn_delta.h Wed Mar 14 13:07:02 2012
@@ -651,7 +651,7 @@ svn_txdelta_skip_svndiff_window(apr_file
* Each of these takes a directory baton, indicating the directory
* in which the change takes place, and a @a path argument, giving the
* path of the file, subdirectory, or directory entry to change.
- *
+ *
* The @a path argument to each of the callbacks is relative to the
* root of the edit. Editors will usually want to join this relative
* path with some base stored in the edit baton (e.g. a URL, or a
Modified: subversion/branches/multi-layer-moves/subversion/include/svn_editor.h
URL: http://svn.apache.org/viewvc/subversion/branches/multi-layer-moves/subversion/include/svn_editor.h?rev=1300532&r1=1300531&r2=1300532&view=diff
==============================================================================
--- subversion/branches/multi-layer-moves/subversion/include/svn_editor.h (original)
+++ subversion/branches/multi-layer-moves/subversion/include/svn_editor.h Wed Mar 14 13:07:02 2012
@@ -383,6 +383,13 @@ extern "C" {
*/
typedef struct svn_editor_t svn_editor_t;
+/** The kind of the checksum to be used throughout the #svn_editor_t APIs.
+ *
+ * @note ### This may change before Ev2 is official released, so just like
+ * everything else in this file, please don't rely upon it until then.
+ */
+#define SVN_EDITOR_CHECKSUM_KIND svn_checksum_sha1
+
/** These function types define the callback functions a tree delta consumer
* implements.
@@ -971,7 +978,7 @@ svn_editor_move(svn_editor_t *editor,
*
* Perform a rotation among multiple nodes in the target tree.
*
- * The @relpaths and @revisions arrays (pair-wise) specify nodes in the
+ * The @a relpaths and @a revisions arrays (pair-wise) specify nodes in the
* tree which are located at a path and expected to be at a specific
* revision. These nodes are simultaneously moved in a rotation pattern.
* For example, the node at index 0 of @a relpaths and @a revisions will
Modified: subversion/branches/multi-layer-moves/subversion/include/svn_error.h
URL: http://svn.apache.org/viewvc/subversion/branches/multi-layer-moves/subversion/include/svn_error.h?rev=1300532&r1=1300531&r2=1300532&view=diff
==============================================================================
--- subversion/branches/multi-layer-moves/subversion/include/svn_error.h (original)
+++ subversion/branches/multi-layer-moves/subversion/include/svn_error.h Wed Mar 14 13:07:02 2012
@@ -479,11 +479,16 @@ svn_error_t *svn_error_purge_tracing(svn
*
* @since New in 1.6.
*/
+#ifdef __clang_analyzer__
+#include <assert.h>
+#define SVN_ERR_ASSERT(expr) assert((expr))
+#else
#define SVN_ERR_ASSERT(expr) \
do { \
if (!(expr)) \
SVN_ERR(svn_error__malfunction(TRUE, __FILE__, __LINE__, #expr)); \
} while (0)
+#endif
/** Similar to SVN_ERR_ASSERT(), but without the option of returning
* an error to the calling function.
Modified: subversion/branches/multi-layer-moves/subversion/include/svn_fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/multi-layer-moves/subversion/include/svn_fs.h?rev=1300532&r1=1300531&r2=1300532&view=diff
==============================================================================
--- subversion/branches/multi-layer-moves/subversion/include/svn_fs.h (original)
+++ subversion/branches/multi-layer-moves/subversion/include/svn_fs.h Wed Mar 14 13:07:02 2012
@@ -250,6 +250,10 @@ svn_fs_upgrade(const char *path,
* to the Subversion filesystem located in the directory @a path.
* Use @a pool for necessary allocations.
*
+ * @a start and @a end may be #SVN_INVALID_REVNUM, in which case
+ * svn_repos_verify_fs2()'s semantics apply. When @c r0 is being
+ * verified, global invariants may be verified as well.
+ *
* @note You probably don't want to use this directly. Take a look at
* svn_repos_verify_fs2() instead, which does non-backend-specific
* verifications as well.
@@ -260,7 +264,9 @@ svn_error_t *
svn_fs_verify(const char *path,
svn_cancel_func_t cancel_func,
void *cancel_baton,
- apr_pool_t *pool);
+ svn_revnum_t start,
+ svn_revnum_t end,
+ apr_pool_t *scratch_pool);
/**
* Return, in @a *fs_type, a string identifying the back-end type of
Modified: subversion/branches/multi-layer-moves/subversion/include/svn_ra_svn.h
URL: http://svn.apache.org/viewvc/subversion/branches/multi-layer-moves/subversion/include/svn_ra_svn.h?rev=1300532&r1=1300531&r2=1300532&view=diff
==============================================================================
--- subversion/branches/multi-layer-moves/subversion/include/svn_ra_svn.h (original)
+++ subversion/branches/multi-layer-moves/subversion/include/svn_ra_svn.h Wed Mar 14 13:07:02 2012
@@ -157,6 +157,15 @@ typedef struct svn_ra_svn_item_t
typedef svn_error_t *(*svn_ra_svn_edit_callback)(void *baton);
+/**
+ * Set the shim callbacks to be used by @a conn to @a shim_callbacks.
+ *
+ * @note This is a private API, external consumers should not use it.
+ */
+svn_error_t *
+svn_ra_svn__set_shim_callbacks(svn_ra_svn_conn_t *conn,
+ svn_delta_shim_callbacks_t *shim_callbacks);
+
/** Initialize a connection structure for the given socket or
* input/output files.
*
Modified: subversion/branches/multi-layer-moves/subversion/include/svn_repos.h
URL: http://svn.apache.org/viewvc/subversion/branches/multi-layer-moves/subversion/include/svn_repos.h?rev=1300532&r1=1300531&r2=1300532&view=diff
==============================================================================
--- subversion/branches/multi-layer-moves/subversion/include/svn_repos.h (original)
+++ subversion/branches/multi-layer-moves/subversion/include/svn_repos.h Wed Mar 14 13:07:02 2012
@@ -532,7 +532,7 @@ svn_repos_hotcopy2(const char *src_path,
void *cancel_baton,
apr_pool_t *pool);
-/**
+/**
* Like svn_repos_hotcopy2(), but without the @a incremental parameter
* and without cancellation support.
*
@@ -1780,6 +1780,8 @@ svn_repos_get_logs(svn_repos_t *repos,
* set @a *catalog to a catalog of this mergeinfo. @a *catalog will
* never be @c NULL but may be empty.
*
+ * The paths in @a paths, and the keys of @a catalog, start with '/'.
+ *
* @a inherit indicates whether explicit, explicit or inherited, or
* only inherited mergeinfo for @a paths is fetched.
*
@@ -3027,6 +3029,10 @@ svn_repos_authz_read(svn_authz_t **authz
* For compatibility with 1.6, and earlier, @a repos_name can be NULL
* in which case it is equivalent to a @a repos_name of "".
*
+ * @note Presently, @a repos_name must byte-for-byte match the repos_name
+ * specified in the authz file; it is treated as an opaque string, and not
+ * as a dirent.
+ *
* @since New in 1.3.
*/
svn_error_t *
Modified: subversion/branches/multi-layer-moves/subversion/include/svn_wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/multi-layer-moves/subversion/include/svn_wc.h?rev=1300532&r1=1300531&r2=1300532&view=diff
==============================================================================
--- subversion/branches/multi-layer-moves/subversion/include/svn_wc.h (original)
+++ subversion/branches/multi-layer-moves/subversion/include/svn_wc.h Wed Mar 14 13:07:02 2012
@@ -3059,7 +3059,7 @@ svn_wc_entry_dup(const svn_wc_entry_t *e
*/
typedef struct svn_wc_info_t
{
- /** The schedule of this item
+ /** The schedule of this item
* ### Do we still need schedule? */
svn_wc_schedule_t schedule;
@@ -3657,7 +3657,7 @@ typedef struct svn_wc_status3_t
* This will be NULL for moved-here nodes that are just part of a subtree
* that was moved along (and are not themselves a root of a different move
* operation).
- *
+ *
* @since New in 1.8. */
const char *moved_from_abspath;
Modified: subversion/branches/multi-layer-moves/subversion/libsvn_client/add.c
URL: http://svn.apache.org/viewvc/subversion/branches/multi-layer-moves/subversion/libsvn_client/add.c?rev=1300532&r1=1300531&r2=1300532&view=diff
==============================================================================
--- subversion/branches/multi-layer-moves/subversion/libsvn_client/add.c (original)
+++ subversion/branches/multi-layer-moves/subversion/libsvn_client/add.c Wed Mar 14 13:07:02 2012
@@ -47,6 +47,7 @@
#include "private/svn_client_private.h"
#include "private/svn_wc_private.h"
+#include "private/svn_ra_private.h"
#include "private/svn_magic.h"
#include "svn_private_config.h"
@@ -896,6 +897,9 @@ mkdir_urls(const apr_array_header_t *url
ctx, pool));
/* Fetch RA commit editor */
+ SVN_ERR(svn_ra__register_editor_shim_callbacks(ra_session,
+ svn_client__get_shim_callbacks(ctx->wc_ctx,
+ NULL, pool)));
SVN_ERR(svn_ra_get_commit_editor3(ra_session, &editor, &edit_baton,
commit_revprops,
commit_callback,
Modified: subversion/branches/multi-layer-moves/subversion/libsvn_client/checkout.c
URL: http://svn.apache.org/viewvc/subversion/branches/multi-layer-moves/subversion/libsvn_client/checkout.c?rev=1300532&r1=1300531&r2=1300532&view=diff
==============================================================================
--- subversion/branches/multi-layer-moves/subversion/libsvn_client/checkout.c (original)
+++ subversion/branches/multi-layer-moves/subversion/libsvn_client/checkout.c Wed Mar 14 13:07:02 2012
@@ -73,7 +73,6 @@ svn_client__checkout_internal(svn_revnum
const char *local_abspath,
const svn_opt_revision_t *peg_revision,
const svn_opt_revision_t *revision,
- const svn_client__ra_session_from_path_results *ra_cache,
svn_depth_t depth,
svn_boolean_t ignore_externals,
svn_boolean_t allow_unver_obstructions,
@@ -88,6 +87,10 @@ svn_client__checkout_internal(svn_revnum
const char *session_url;
svn_node_kind_t kind;
const char *uuid, *repos_root;
+ apr_pool_t *session_pool = svn_pool_create(pool);
+ svn_ra_session_t *ra_session;
+ svn_revnum_t tmp_revnum;
+ const char *tmp_session_url;
/* Sanity check. Without these, the checkout is meaningless. */
SVN_ERR_ASSERT(local_abspath != NULL);
@@ -100,60 +103,19 @@ svn_client__checkout_internal(svn_revnum
&& (revision->kind != svn_opt_revision_head))
return svn_error_create(SVN_ERR_CLIENT_BAD_REVISION, NULL, NULL);
- {
- svn_boolean_t have_repos_root_url;
- svn_boolean_t have_repos_uuid;
- svn_boolean_t have_session_url;
- svn_boolean_t have_revnum;
- svn_boolean_t have_kind;
-
- if ((have_repos_root_url = (ra_cache && ra_cache->repos_root_url)))
- repos_root = ra_cache->repos_root_url;
-
- if ((have_repos_uuid = (ra_cache && ra_cache->repos_uuid)))
- uuid = ra_cache->repos_uuid;
-
- if ((have_session_url = (ra_cache && ra_cache->ra_session_url)))
- session_url = ra_cache->ra_session_url;
-
- if ((have_revnum = (ra_cache && SVN_IS_VALID_REVNUM(ra_cache->ra_revnum))))
- revnum = ra_cache->ra_revnum;
-
- if ((have_kind = (ra_cache && ra_cache->kind != svn_node_unknown)))
- kind = ra_cache->kind;
-
- if (! have_repos_root_url || ! have_repos_uuid || ! have_session_url ||
- ! have_revnum || ! have_kind)
- {
- apr_pool_t *session_pool = svn_pool_create(pool);
- svn_ra_session_t *ra_session;
- svn_revnum_t tmp_revnum;
- const char *tmp_session_url;
-
- /* Get the RA connection. */
- SVN_ERR(svn_client__ra_session_from_path(&ra_session, &tmp_revnum,
- &tmp_session_url, url, NULL,
- peg_revision, revision, ctx,
- session_pool));
-
- if (! have_repos_root_url)
- SVN_ERR(svn_ra_get_repos_root2(ra_session, &repos_root, pool));
-
- if (! have_repos_uuid)
- SVN_ERR(svn_ra_get_uuid2(ra_session, &uuid, pool));
-
- if (! have_session_url)
- session_url = apr_pstrdup(pool, tmp_session_url);
-
- if (! have_revnum)
- revnum = tmp_revnum;
-
- if (! have_kind)
- SVN_ERR(svn_ra_check_path(ra_session, "", revnum, &kind, pool));
-
- svn_pool_destroy(session_pool);
- }
- }
+ /* Get the RA connection. */
+ SVN_ERR(svn_client__ra_session_from_path(&ra_session, &tmp_revnum,
+ &tmp_session_url, url, NULL,
+ peg_revision, revision, ctx,
+ session_pool));
+
+ SVN_ERR(svn_ra_get_repos_root2(ra_session, &repos_root, pool));
+ SVN_ERR(svn_ra_get_uuid2(ra_session, &uuid, pool));
+ session_url = apr_pstrdup(pool, tmp_session_url);
+ revnum = tmp_revnum;
+ SVN_ERR(svn_ra_check_path(ra_session, "", revnum, &kind, pool));
+
+ svn_pool_destroy(session_pool);
if (kind == svn_node_none)
return svn_error_createf(SVN_ERR_RA_ILLEGAL_URL, NULL,
@@ -253,7 +215,7 @@ svn_client_checkout3(svn_revnum_t *resul
SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, pool));
return svn_client__checkout_internal(result_rev, URL, local_abspath,
- peg_revision, revision, NULL, depth,
+ peg_revision, revision, depth,
ignore_externals,
allow_unver_obstructions, NULL,
ctx, pool);
Modified: subversion/branches/multi-layer-moves/subversion/libsvn_client/client.h
URL: http://svn.apache.org/viewvc/subversion/branches/multi-layer-moves/subversion/libsvn_client/client.h?rev=1300532&r1=1300531&r2=1300532&view=diff
==============================================================================
--- subversion/branches/multi-layer-moves/subversion/libsvn_client/client.h (original)
+++ subversion/branches/multi-layer-moves/subversion/libsvn_client/client.h Wed Mar 14 13:07:02 2012
@@ -499,36 +499,6 @@ svn_client__update_internal(svn_revnum_t
svn_client_ctx_t *ctx,
apr_pool_t *pool);
-/* Structure holding the results of svn_client__ra_session_from_path()
- plus the repository root URL and UUID and the node kind for the
- input URL, REVISION and PEG_REVISION . See
- svn_client__ra_session_from_path() for the meaning of these fields.
- This structure is used by svn_client__checkout_internal() to save
- one or more round-trips if the client already gathered some of this
- information. Not all the fields need to be filled in. */
-typedef struct svn_client__ra_session_from_path_results
-{
- /* The repository root URL. A NULL value means the root URL is
- unknown.*/
- const char *repos_root_url;
-
- /* The repository UUID. A NULL value means the UUID is unknown. */
- const char *repos_uuid;
-
- /* The actual final resulting URL for the input URL. This may be
- different because of copy history. A NULL value means the
- resulting URL is unknown. */
- const char *ra_session_url;
-
- /* The actual final resulting revision for the input URL. An
- invalid revnum as determined by SVN_IS_VALID_REVNUM() means the
- revnum is unknown. */
- svn_revnum_t ra_revnum;
-
- /* An optional node kind for the URL. svn_node_unknown if unknown */
- svn_node_kind_t kind;
-} svn_client__ra_session_from_path_results;
-
/* Checkout into LOCAL_ABSPATH a working copy of URL at REVISION, and (if not
NULL) set RESULT_REV to the checked out revision.
@@ -565,7 +535,6 @@ svn_client__checkout_internal(svn_revnum
const char *local_abspath,
const svn_opt_revision_t *peg_revision,
const svn_opt_revision_t *revision,
- const svn_client__ra_session_from_path_results *ra_cache,
svn_depth_t depth,
svn_boolean_t ignore_externals,
svn_boolean_t allow_unver_obstructions,
@@ -1104,6 +1073,11 @@ svn_client__get_normalized_stream(svn_st
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
+/* Return a set of callbacks to use with the Ev2 shims. */
+svn_delta_shim_callbacks_t *
+svn_client__get_shim_callbacks(svn_wc_context_t *wc_ctx,
+ const char *anchor_abspath,
+ apr_pool_t *result_pool);
/* Return true if KIND is a revision kind that is dependent on the working
* copy. Otherwise, return false. */
Modified: subversion/branches/multi-layer-moves/subversion/libsvn_client/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/multi-layer-moves/subversion/libsvn_client/commit.c?rev=1300532&r1=1300531&r2=1300532&view=diff
==============================================================================
--- subversion/branches/multi-layer-moves/subversion/libsvn_client/commit.c (original)
+++ subversion/branches/multi-layer-moves/subversion/libsvn_client/commit.c Wed Mar 14 13:07:02 2012
@@ -49,6 +49,7 @@
#include "client.h"
#include "private/svn_wc_private.h"
+#include "private/svn_ra_private.h"
#include "private/svn_magic.h"
#include "svn_private_config.h"
@@ -645,6 +646,7 @@ get_ra_editor(svn_ra_session_t **ra_sess
apr_pool_t *pool)
{
apr_hash_t *commit_revprops;
+ const char *anchor_abspath;
/* Open an RA session to URL. */
SVN_ERR(svn_client__open_ra_session_internal(ra_session, NULL, base_url,
@@ -669,7 +671,28 @@ get_ra_editor(svn_ra_session_t **ra_sess
SVN_ERR(svn_client__ensure_revprop_table(&commit_revprops, revprop_table,
log_msg, ctx, pool));
+#ifdef ENABLE_EDITOR_SHIMS
+ /* We need this for the shims. */
+ if (base_dir_abspath)
+ {
+ const char *relpath;
+ const char *wcroot_abspath;
+
+ SVN_ERR(svn_wc__get_wc_root(&wcroot_abspath, ctx->wc_ctx,
+ base_dir_abspath, pool, pool));
+
+ SVN_ERR(svn_ra_get_path_relative_to_root(*ra_session, &relpath, base_url,
+ pool));
+ anchor_abspath = svn_dirent_join(wcroot_abspath, relpath, pool);
+ }
+ else
+#endif
+ anchor_abspath = NULL;
+
/* Fetch RA commit editor. */
+ SVN_ERR(svn_ra__register_editor_shim_callbacks(*ra_session,
+ svn_client__get_shim_callbacks(ctx->wc_ctx,
+ anchor_abspath, pool)));
SVN_ERR(svn_ra_get_commit_editor3(*ra_session, editor, edit_baton,
commit_revprops, commit_callback,
commit_baton, lock_tokens, keep_locks,
@@ -1256,7 +1279,7 @@ append_externals_as_explicit_targets(apr
rel_target = svn_dirent_skip_ancestor(base_abspath,
xinfo->local_abspath);
-
+
SVN_ERR_ASSERT(rel_target != NULL && *rel_target != '\0');
APR_ARRAY_PUSH(rel_targets, const char *) =
@@ -1492,7 +1515,7 @@ svn_client_commit6(const apr_array_heade
svn_boolean_t found_delete_half =
(apr_hash_get(committables->by_path, delete_op_root_abspath,
APR_HASH_KEY_STRING) != NULL);
-
+
if (!found_delete_half)
{
const char *delete_half_parent_abspath;
Modified: subversion/branches/multi-layer-moves/subversion/libsvn_client/copy.c
URL: http://svn.apache.org/viewvc/subversion/branches/multi-layer-moves/subversion/libsvn_client/copy.c?rev=1300532&r1=1300531&r2=1300532&view=diff
==============================================================================
--- subversion/branches/multi-layer-moves/subversion/libsvn_client/copy.c (original)
+++ subversion/branches/multi-layer-moves/subversion/libsvn_client/copy.c Wed Mar 14 13:07:02 2012
@@ -44,6 +44,7 @@
#include "svn_private_config.h"
#include "private/svn_wc_private.h"
+#include "private/svn_ra_private.h"
#include "private/svn_mergeinfo_private.h"
@@ -1089,6 +1090,9 @@ repos_to_repos_copy(const apr_array_head
message, ctx, pool));
/* Fetch RA commit editor. */
+ SVN_ERR(svn_ra__register_editor_shim_callbacks(ra_session,
+ svn_client__get_shim_callbacks(ctx->wc_ctx,
+ NULL, pool)));
SVN_ERR(svn_ra_get_commit_editor3(ra_session, &editor, &edit_baton,
commit_revprops,
commit_callback,
@@ -1401,6 +1405,9 @@ wc_to_repos_copy(const apr_array_header_
FALSE, FALSE, ctx, pool));
/* Fetch RA commit editor. */
+ SVN_ERR(svn_ra__register_editor_shim_callbacks(ra_session,
+ svn_client__get_shim_callbacks(ctx->wc_ctx,
+ NULL, pool)));
SVN_ERR(svn_ra_get_commit_editor3(ra_session, &editor, &edit_baton,
commit_revprops,
commit_callback,
@@ -1503,7 +1510,7 @@ repos_to_wc_copy_single(svn_client__copy
pair->src_original,
tmp_abspath,
&pair->src_peg_revision,
- &pair->src_op_revision, NULL,
+ &pair->src_op_revision,
svn_depth_infinity,
ignore_externals, FALSE,
&sleep_needed, ctx, pool);
Modified: subversion/branches/multi-layer-moves/subversion/libsvn_client/delete.c
URL: http://svn.apache.org/viewvc/subversion/branches/multi-layer-moves/subversion/libsvn_client/delete.c?rev=1300532&r1=1300531&r2=1300532&view=diff
==============================================================================
--- subversion/branches/multi-layer-moves/subversion/libsvn_client/delete.c (original)
+++ subversion/branches/multi-layer-moves/subversion/libsvn_client/delete.c Wed Mar 14 13:07:02 2012
@@ -39,6 +39,7 @@
#include "private/svn_client_private.h"
#include "private/svn_wc_private.h"
+#include "private/svn_ra_private.h"
#include "svn_private_config.h"
@@ -187,6 +188,9 @@ single_repos_delete(svn_ra_session_t *ra
log_msg, ctx, pool));
/* Fetch RA commit editor */
+ SVN_ERR(svn_ra__register_editor_shim_callbacks(ra_session,
+ svn_client__get_shim_callbacks(ctx->wc_ctx,
+ NULL, pool)));
SVN_ERR(svn_ra_get_commit_editor3(ra_session, &editor, &edit_baton,
commit_revprops,
commit_callback,
Modified: subversion/branches/multi-layer-moves/subversion/libsvn_client/diff.c
URL: http://svn.apache.org/viewvc/subversion/branches/multi-layer-moves/subversion/libsvn_client/diff.c?rev=1300532&r1=1300531&r2=1300532&view=diff
==============================================================================
--- subversion/branches/multi-layer-moves/subversion/libsvn_client/diff.c (original)
+++ subversion/branches/multi-layer-moves/subversion/libsvn_client/diff.c Wed Mar 14 13:07:02 2012
@@ -678,9 +678,9 @@ display_prop_diffs(const apr_array_heade
/* The last character in a property is often not a newline.
An eol character is appended to prevent the diff API to add a
- ' \ No newline at end of file' line. We add
+ ' \ No newline at end of file' line. We add
' \ No newline at end of property' manually if needed. */
- tmp = original_value ? original_value
+ tmp = original_value ? original_value
: svn_string_create_empty(iterpool);
orig = maybe_append_eol(tmp, NULL, iterpool);
@@ -1336,7 +1336,7 @@ static const svn_wc_diff_callbacks4_t di
diff_dir_opened,
diff_dir_added,
diff_dir_props_changed,
- diff_dir_closed
+ diff_dir_closed
};
/*-----------------------------------------------------------------*/
Modified: subversion/branches/multi-layer-moves/subversion/libsvn_client/externals.c
URL: http://svn.apache.org/viewvc/subversion/branches/multi-layer-moves/subversion/libsvn_client/externals.c?rev=1300532&r1=1300531&r2=1300532&view=diff
==============================================================================
--- subversion/branches/multi-layer-moves/subversion/libsvn_client/externals.c (original)
+++ subversion/branches/multi-layer-moves/subversion/libsvn_client/externals.c Wed Mar 14 13:07:02 2012
@@ -138,6 +138,8 @@ switch_dir_external(const char *local_ab
svn_revnum_t external_peg_rev = SVN_INVALID_REVNUM;
svn_revnum_t external_rev = SVN_INVALID_REVNUM;
apr_pool_t *subpool = svn_pool_create(pool);
+ const char *repos_root_url;
+ const char *repos_uuid;
SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
@@ -168,9 +170,6 @@ switch_dir_external(const char *local_ab
if (node_url)
{
- const char *repos_root_url;
- const char *repos_uuid;
-
/* If we have what appears to be a version controlled
subdir, and its top-level URL matches that of our
externals definition, perform an update. */
@@ -183,7 +182,7 @@ switch_dir_external(const char *local_ab
timestamp_sleep,
ctx, subpool));
svn_pool_destroy(subpool);
- return SVN_NO_ERROR;
+ goto cleanup;
}
SVN_ERR(svn_wc__node_get_repos_info(&repos_root_url, &repos_uuid,
@@ -243,7 +242,7 @@ switch_dir_external(const char *local_ab
subpool));
svn_pool_destroy(subpool);
- return SVN_NO_ERROR;
+ goto cleanup;
}
}
}
@@ -277,29 +276,29 @@ switch_dir_external(const char *local_ab
/* ... Hello, new hotness. */
SVN_ERR(svn_client__checkout_internal(NULL, url, local_abspath, peg_revision,
- revision, NULL, svn_depth_infinity,
+ revision, svn_depth_infinity,
FALSE, FALSE, timestamp_sleep,
ctx, pool));
- {
- const char *repos_root_url;
- const char *repos_uuid;
+ SVN_ERR(svn_wc__node_get_repos_info(&repos_root_url,
+ &repos_uuid,
+ ctx->wc_ctx, local_abspath,
+ pool, pool));
+
+ SVN_ERR(svn_wc__external_register(ctx->wc_ctx,
+ defining_abspath,
+ local_abspath, svn_node_dir,
+ repos_root_url, repos_uuid,
+ svn_uri_skip_ancestor(repos_root_url,
+ url, pool),
+ external_peg_rev,
+ external_rev,
+ pool));
- SVN_ERR(svn_wc__node_get_repos_info(&repos_root_url,
- &repos_uuid,
- ctx->wc_ctx, local_abspath,
- pool, pool));
-
- SVN_ERR(svn_wc__external_register(ctx->wc_ctx,
- defining_abspath,
- local_abspath, svn_node_dir,
- repos_root_url, repos_uuid,
- svn_uri_skip_ancestor(repos_root_url,
- url, pool),
- external_peg_rev,
- external_rev,
- pool));
- }
+ cleanup:
+ /* Issues #4123 and #4130: We don't need to keep the newly checked
+ out external's DB open. */
+ SVN_ERR(svn_wc__close_db(local_abspath, ctx->wc_ctx, pool));
return SVN_NO_ERROR;
}
@@ -604,11 +603,12 @@ handle_external_item_change(const struct
apr_pool_t *scratch_pool)
{
svn_ra_session_t *ra_session;
- svn_client__ra_session_from_path_results ra_cache = { 0 };
+ svn_revnum_t ra_revnum;
+ const char *ra_session_url;
+ const char *repos_root_url;
+ const char *repos_uuid;
const char *new_url;
- svn_node_kind_t kind;
-
- ra_cache.kind = svn_node_unknown;
+ svn_node_kind_t ext_kind;
SVN_ERR_ASSERT(eb->repos_root_url && parent_dir_url);
SVN_ERR_ASSERT(new_item != NULL);
@@ -628,34 +628,28 @@ handle_external_item_change(const struct
/* Determine if the external is a file or directory. */
/* Get the RA connection. */
SVN_ERR(svn_client__ra_session_from_path(&ra_session,
- &ra_cache.ra_revnum,
- &ra_cache.ra_session_url,
+ &ra_revnum,
+ &ra_session_url,
new_url, NULL,
&(new_item->peg_revision),
&(new_item->revision), eb->ctx,
scratch_pool));
- SVN_ERR(svn_ra_get_uuid2(ra_session, &ra_cache.repos_uuid,
- scratch_pool));
- SVN_ERR(svn_ra_get_repos_root2(ra_session, &ra_cache.repos_root_url,
- scratch_pool));
- SVN_ERR(svn_ra_check_path(ra_session, "", ra_cache.ra_revnum, &kind,
+ SVN_ERR(svn_ra_get_uuid2(ra_session, &repos_uuid, scratch_pool));
+ SVN_ERR(svn_ra_get_repos_root2(ra_session, &repos_root_url, scratch_pool));
+ SVN_ERR(svn_ra_check_path(ra_session, "", ra_revnum, &ext_kind,
scratch_pool));
- if (svn_node_none == kind)
+ if (svn_node_none == ext_kind)
return svn_error_createf(SVN_ERR_RA_ILLEGAL_URL, NULL,
_("URL '%s' at revision %ld doesn't exist"),
- ra_cache.ra_session_url,
- ra_cache.ra_revnum);
+ ra_session_url, ra_revnum);
- if (svn_node_dir != kind && svn_node_file != kind)
+ if (svn_node_dir != ext_kind && svn_node_file != ext_kind)
return svn_error_createf(SVN_ERR_RA_ILLEGAL_URL, NULL,
_("URL '%s' at revision %ld is not a file "
"or a directory"),
- ra_cache.ra_session_url,
- ra_cache.ra_revnum);
-
- ra_cache.kind = kind;
+ ra_session_url, ra_revnum);
/* Not protecting against recursive externals. Detecting them in
@@ -682,7 +676,7 @@ handle_external_item_change(const struct
scratch_pool));
}
- switch (ra_cache.kind)
+ switch (ext_kind)
{
case svn_node_dir:
SVN_ERR(switch_dir_external(local_abspath, new_url,
@@ -693,20 +687,60 @@ handle_external_item_change(const struct
scratch_pool));
break;
case svn_node_file:
- if (strcmp(eb->repos_root_url, ra_cache.repos_root_url))
- return svn_error_createf(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
- _("Unsupported external: "
- "url of file external '%s' is not in repository '%s'"),
- new_url, eb->repos_root_url);
+ if (strcmp(eb->repos_root_url, repos_root_url))
+ {
+ const char *local_repos_root_url;
+ const char *local_repos_uuid;
+ const char *ext_repos_relpath;
+
+ /*
+ * The working copy library currently requires that all files
+ * in the working copy have the same repository root URL.
+ * The URL from the file external's definition differs from the
+ * one used by the working copy. As a workaround, replace the
+ * root URL portion of the file external's URL, after making
+ * sure both URLs point to the same repository. See issue #4087.
+ */
+
+ SVN_ERR(svn_wc__node_get_repos_info(&local_repos_root_url,
+ &local_repos_uuid,
+ eb->ctx->wc_ctx,
+ parent_dir_abspath,
+ scratch_pool, scratch_pool));
+ ext_repos_relpath = svn_uri_skip_ancestor(repos_root_url,
+ new_url, scratch_pool);
+ if (local_repos_uuid == NULL || local_repos_root_url == NULL ||
+ ext_repos_relpath == NULL ||
+ strcmp(local_repos_uuid, repos_uuid) != 0)
+ return svn_error_createf(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
+ _("Unsupported external: URL of file external '%s' "
+ "is not in repository '%s'"),
+ new_url, eb->repos_root_url);
+
+ new_url = svn_path_url_add_component2(local_repos_root_url,
+ ext_repos_relpath,
+ scratch_pool);
+ SVN_ERR(svn_client__ra_session_from_path(&ra_session,
+ &ra_revnum,
+ &ra_session_url,
+ new_url,
+ NULL,
+ &(new_item->peg_revision),
+ &(new_item->revision),
+ eb->ctx, scratch_pool));
+ SVN_ERR(svn_ra_get_repos_root2(ra_session, &repos_root_url,
+ scratch_pool));
+ }
+
SVN_ERR(switch_file_external(local_abspath,
new_url,
&new_item->peg_revision,
&new_item->revision,
parent_dir_abspath,
ra_session,
- ra_cache.ra_session_url,
- ra_cache.ra_revnum,
- ra_cache.repos_root_url,
+ ra_session_url,
+ ra_revnum,
+ repos_root_url,
eb->timestamp_sleep, eb->ctx,
scratch_pool));
break;
@@ -743,10 +777,6 @@ wrap_external_error(const struct externa
return err;
}
-/* This implements the 'svn_hash_diff_func_t' interface.
- BATON is of type 'struct handle_externals_desc_change_baton *'.
- KEY is a 'const char *'.
-*/
static svn_error_t *
handle_externals_change(const struct external_change_baton_t *eb,
const char *local_abspath,
Modified: subversion/branches/multi-layer-moves/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/multi-layer-moves/subversion/libsvn_client/merge.c?rev=1300532&r1=1300531&r2=1300532&view=diff
==============================================================================
--- subversion/branches/multi-layer-moves/subversion/libsvn_client/merge.c (original)
+++ subversion/branches/multi-layer-moves/subversion/libsvn_client/merge.c Wed Mar 14 13:07:02 2012
@@ -48,6 +48,7 @@
#include "svn_props.h"
#include "svn_time.h"
#include "svn_sorts.h"
+#include "svn_subst.h"
#include "svn_ra.h"
#include "client.h"
#include "mergeinfo.h"
@@ -1393,7 +1394,7 @@ check_moved_away(svn_boolean_t *moved_aw
{
const char *moved_to_abspath;
svn_error_t *err;
-
+
*moved_away = FALSE;
err = svn_wc__node_was_moved_away(&moved_to_abspath, NULL,
@@ -1423,7 +1424,7 @@ check_moved_here(svn_boolean_t *moved_he
{
const char *moved_from_abspath;
svn_error_t *err;
-
+
*moved_here = FALSE;
err = svn_wc__node_was_moved_here(&moved_from_abspath, NULL,
@@ -1995,10 +1996,14 @@ files_same_p(svn_boolean_t *same,
svn_opt_revision_t working_rev = { svn_opt_revision_working, { 0 } };
/* Compare the file content, translating 'mine' to 'normal' form. */
- SVN_ERR(svn_client__get_normalized_stream(&mine_stream, wc_ctx,
- mine_abspath, &working_rev,
- FALSE, TRUE, NULL, NULL,
- scratch_pool, scratch_pool));
+ if (svn_prop_get_value(working_props, SVN_PROP_SPECIAL) != NULL)
+ SVN_ERR(svn_subst_read_specialfile(&mine_stream, mine_abspath,
+ scratch_pool, scratch_pool));
+ else
+ SVN_ERR(svn_client__get_normalized_stream(&mine_stream, wc_ctx,
+ mine_abspath, &working_rev,
+ FALSE, TRUE, NULL, NULL,
+ scratch_pool, scratch_pool));
SVN_ERR(svn_stream_open_readonly(&older_stream, older_abspath,
scratch_pool, scratch_pool));
@@ -3471,8 +3476,8 @@ fix_deleted_subtree_ranges(const merge_s
is older than START, then the base revision is used as the younger
bound in place of START.
- RA_SESSION is an open RA session to the repository in which SOURCE lives.
- It may be temporarily reparented as needed by this function.
+ RA_SESSION is an RA session open to the repository in which TARGET_ABSPATH
+ lives. It may be temporarily reparented as needed by this function.
Allocate *RECORDED_MERGEINFO and *IMPLICIT_MERGEINFO in RESULT_POOL.
Use SCRATCH_POOL for any temporary allocations. */
@@ -3565,7 +3570,7 @@ get_full_mergeinfo(svn_mergeinfo_t *reco
/* Helper for ensure_implicit_mergeinfo().
- PARENT, CHILD, REVISION1, REVISION2, RA_SESSION, and CTX
+ PARENT, CHILD, REVISION1, REVISION2 and CTX
are all cascaded from the arguments of the same names in
ensure_implicit_mergeinfo(). PARENT and CHILD must both exist, i.e.
this function should never be called where CHILD is the merge target.
@@ -3575,6 +3580,9 @@ get_full_mergeinfo(svn_mergeinfo_t *reco
Set CHILD->IMPLICIT_MERGEINFO to the mergeinfo inherited from
PARENT->IMPLICIT_MERGEINFO. CHILD->IMPLICIT_MERGEINFO is allocated
in RESULT_POOL.
+
+ RA_SESSION is an RA session open to the repository that contains CHILD.
+ It may be temporarily reparented by this function.
*/
static svn_error_t *
inherit_implicit_mergeinfo_from_parent(svn_client__merge_path_t *parent,
@@ -3625,7 +3633,10 @@ inherit_implicit_mergeinfo_from_parent(s
PARENT->IMPLICIT_MERGEINFO, otherwise contact the repository. Use
SCRATCH_POOL for all temporary allocations.
- PARENT, CHILD, REVISION1, REVISION2, RA_SESSION, and
+ RA_SESSION is an RA session open to the repository that contains CHILD.
+ It may be temporarily reparented by this function.
+
+ PARENT, CHILD, REVISION1, REVISION2 and
CTX are all cascaded from the arguments of the same name in
filter_merged_revisions() and the same conditions for that function
hold here. */
@@ -7540,7 +7551,7 @@ flag_subtrees_needing_mergeinfo(svn_bool
operational depth is empty or files, then the mere
existence of operative immediate children means we
must record non-inheritable mergeinfo.
-
+
### What about svn_depth_immediates? In that case
### the merge target needs only normal inheritable
### mergeinfo and the target's immediate children will
Modified: subversion/branches/multi-layer-moves/subversion/libsvn_client/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/multi-layer-moves/subversion/libsvn_client/mergeinfo.c?rev=1300532&r1=1300531&r2=1300532&view=diff
==============================================================================
--- subversion/branches/multi-layer-moves/subversion/libsvn_client/mergeinfo.c (original)
+++ subversion/branches/multi-layer-moves/subversion/libsvn_client/mergeinfo.c Wed Mar 14 13:07:02 2012
@@ -1147,7 +1147,7 @@ svn_client__elide_mergeinfo_catalog(svn_
const char *top;
const char *path_suffix;
svn_boolean_t elides = FALSE;
-
+
svn_pool_clear(iterpool);
/* Pop off any paths which are not ancestors of PATH. */
Modified: subversion/branches/multi-layer-moves/subversion/libsvn_client/prop_commands.c
URL: http://svn.apache.org/viewvc/subversion/branches/multi-layer-moves/subversion/libsvn_client/prop_commands.c?rev=1300532&r1=1300531&r2=1300532&view=diff
==============================================================================
--- subversion/branches/multi-layer-moves/subversion/libsvn_client/prop_commands.c (original)
+++ subversion/branches/multi-layer-moves/subversion/libsvn_client/prop_commands.c Wed Mar 14 13:07:02 2012
@@ -41,6 +41,7 @@
#include "svn_private_config.h"
#include "private/svn_wc_private.h"
+#include "private/svn_ra_private.h"
#include "private/svn_client_private.h"
@@ -242,6 +243,9 @@ propset_on_url(const char *propname,
message, ctx, pool));
/* Fetch RA commit editor. */
+ SVN_ERR(svn_ra__register_editor_shim_callbacks(ra_session,
+ svn_client__get_shim_callbacks(ctx->wc_ctx,
+ NULL, pool)));
SVN_ERR(svn_ra_get_commit_editor3(ra_session, &editor, &edit_baton,
commit_revprops,
commit_callback,
Modified: subversion/branches/multi-layer-moves/subversion/libsvn_client/repos_diff.c
URL: http://svn.apache.org/viewvc/subversion/branches/multi-layer-moves/subversion/libsvn_client/repos_diff.c?rev=1300532&r1=1300531&r2=1300532&view=diff
==============================================================================
--- subversion/branches/multi-layer-moves/subversion/libsvn_client/repos_diff.c (original)
+++ subversion/branches/multi-layer-moves/subversion/libsvn_client/repos_diff.c Wed Mar 14 13:07:02 2012
@@ -1317,7 +1317,10 @@ fetch_kind_func(svn_kind_t *kind,
struct edit_baton *eb = baton;
svn_node_kind_t node_kind;
- SVN_ERR(svn_ra_check_path(eb->ra_session, path, eb->revision, &node_kind,
+ if (!SVN_IS_VALID_REVNUM(base_revision))
+ base_revision = eb->revision;
+
+ SVN_ERR(svn_ra_check_path(eb->ra_session, path, base_revision, &node_kind,
scratch_pool));
*kind = svn__kind_from_node_kind(node_kind, FALSE);
@@ -1335,12 +1338,15 @@ fetch_props_func(apr_hash_t **props,
struct edit_baton *eb = baton;
svn_node_kind_t node_kind;
- SVN_ERR(svn_ra_check_path(eb->ra_session, path, eb->revision, &node_kind,
+ if (!SVN_IS_VALID_REVNUM(base_revision))
+ base_revision = eb->revision;
+
+ SVN_ERR(svn_ra_check_path(eb->ra_session, path, base_revision, &node_kind,
scratch_pool));
if (node_kind == svn_node_file)
{
- SVN_ERR(svn_ra_get_file(eb->ra_session, path, eb->revision,
+ SVN_ERR(svn_ra_get_file(eb->ra_session, path, base_revision,
NULL, NULL, props, result_pool));
}
else if (node_kind == svn_node_dir)
@@ -1348,7 +1354,7 @@ fetch_props_func(apr_hash_t **props,
apr_array_header_t *tmp_props;
SVN_ERR(svn_ra_get_dir2(eb->ra_session, NULL, NULL, props, path,
- eb->revision, 0 /* Dirent fields */,
+ base_revision, 0 /* Dirent fields */,
result_pool));
tmp_props = svn_prop_hash_to_array(*props, result_pool);
SVN_ERR(svn_categorize_props(tmp_props, NULL, NULL, &tmp_props,
@@ -1375,11 +1381,14 @@ fetch_base_func(const char **filename,
svn_stream_t *fstream;
svn_error_t *err;
+ if (!SVN_IS_VALID_REVNUM(base_revision))
+ base_revision = eb->revision;
+
SVN_ERR(svn_stream_open_unique(&fstream, filename, NULL,
svn_io_file_del_on_pool_cleanup,
result_pool, scratch_pool));
- err = svn_ra_get_file(eb->ra_session, path, eb->revision,
+ err = svn_ra_get_file(eb->ra_session, path, base_revision,
fstream, NULL, NULL, scratch_pool);
if (err && err->apr_err == SVN_ERR_FS_NOT_FOUND)
{
@@ -1391,7 +1400,7 @@ fetch_base_func(const char **filename,
}
else if (err)
return svn_error_trace(err);
-
+
SVN_ERR(svn_stream_close(fstream));
return SVN_NO_ERROR;
Modified: subversion/branches/multi-layer-moves/subversion/libsvn_client/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/multi-layer-moves/subversion/libsvn_client/util.c?rev=1300532&r1=1300531&r2=1300532&view=diff
==============================================================================
--- subversion/branches/multi-layer-moves/subversion/libsvn_client/util.c (original)
+++ subversion/branches/multi-layer-moves/subversion/libsvn_client/util.c Wed Mar 14 13:07:02 2012
@@ -240,3 +240,163 @@ svn_client__assert_homogeneous_target_ty
return SVN_NO_ERROR;
}
+
+struct shim_callbacks_baton
+{
+ svn_wc_context_t *wc_ctx;
+ const char *anchor_abspath;
+};
+
+static svn_error_t *
+rationalize_shim_path(const char **local_abspath,
+ struct shim_callbacks_baton *scb,
+ const char *path,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
+{
+ if (svn_path_is_url(path))
+ {
+ /* This is a copyfrom URL */
+ const char *wcroot_abspath;
+ const char *wcroot_url;
+ const char *relpath;
+
+ SVN_ERR(svn_wc__get_wc_root(&wcroot_abspath, scb->wc_ctx,
+ scb->anchor_abspath,
+ scratch_pool, scratch_pool));
+ SVN_ERR(svn_wc__node_get_url(&wcroot_url, scb->wc_ctx, wcroot_abspath,
+ scratch_pool, scratch_pool));
+ relpath = svn_uri_skip_ancestor(wcroot_url, path, scratch_pool);
+ *local_abspath = svn_dirent_join(wcroot_abspath, relpath, result_pool);
+ }
+ else
+ *local_abspath = svn_dirent_join(scb->anchor_abspath, path, result_pool);
+
+ return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+fetch_props_func(apr_hash_t **props,
+ void *baton,
+ const char *path,
+ svn_revnum_t base_revision,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
+{
+ struct shim_callbacks_baton *scb = baton;
+ const char *local_abspath;
+
+ /* Early out: if we didn't get an anchor_abspath, it means we don't have a
+ working copy, and hence no method of fetching the requisite information. */
+ if (!scb->anchor_abspath)
+ {
+ *props = apr_hash_make(result_pool);
+ return SVN_NO_ERROR;
+ }
+
+ SVN_ERR(rationalize_shim_path(&local_abspath, scb, path, scratch_pool,
+ scratch_pool));
+
+ SVN_ERR(svn_wc_get_pristine_props(props, scb->wc_ctx, local_abspath,
+ result_pool, scratch_pool));
+
+ if (!*props)
+ *props = apr_hash_make(result_pool);
+
+ return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+fetch_kind_func(svn_kind_t *kind,
+ void *baton,
+ const char *path,
+ svn_revnum_t base_revision,
+ apr_pool_t *scratch_pool)
+{
+ struct shim_callbacks_baton *scb = baton;
+ svn_node_kind_t node_kind;
+ const char *local_abspath;
+
+ /* Early out: if we didn't get an anchor_abspath, it means we don't have a
+ working copy, and hence no method of fetching the requisite information. */
+ if (!scb->anchor_abspath)
+ {
+ *kind = svn_kind_unknown;
+ return SVN_NO_ERROR;
+ }
+
+ SVN_ERR(rationalize_shim_path(&local_abspath, scb, path, scratch_pool,
+ scratch_pool));
+
+ SVN_ERR(svn_wc_read_kind(&node_kind, scb->wc_ctx, local_abspath, FALSE,
+ scratch_pool));
+ *kind = svn__kind_from_node_kind(node_kind, FALSE);
+
+ return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+fetch_base_func(const char **filename,
+ void *baton,
+ const char *path,
+ svn_revnum_t base_revision,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
+{
+ struct shim_callbacks_baton *scb = baton;
+ const char *local_abspath;
+ svn_stream_t *pristine_stream;
+ svn_stream_t *temp_stream;
+ svn_error_t *err;
+
+ /* Early out: if we didn't get an anchor_abspath, it means we don't have a
+ working copy, and hence no method of fetching the requisite information. */
+ if (!scb->anchor_abspath)
+ {
+ *filename = NULL;
+ return SVN_NO_ERROR;
+ }
+
+ SVN_ERR(rationalize_shim_path(&local_abspath, scb, path, scratch_pool,
+ scratch_pool));
+
+ err = svn_wc_get_pristine_contents2(&pristine_stream, scb->wc_ctx,
+ local_abspath, scratch_pool,
+ scratch_pool);
+ if (err && err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
+ {
+ svn_error_clear(err);
+ *filename = NULL;
+ return SVN_NO_ERROR;
+ }
+ else if (err)
+ return svn_error_trace(err);
+
+ SVN_ERR(svn_stream_open_unique(&temp_stream, filename, NULL,
+ svn_io_file_del_on_pool_cleanup,
+ result_pool, scratch_pool));
+ SVN_ERR(svn_stream_copy3(pristine_stream, temp_stream, NULL, NULL,
+ scratch_pool));
+
+ return SVN_NO_ERROR;
+}
+
+svn_delta_shim_callbacks_t *
+svn_client__get_shim_callbacks(svn_wc_context_t *wc_ctx,
+ const char *anchor_abspath,
+ apr_pool_t *result_pool)
+{
+ svn_delta_shim_callbacks_t *callbacks =
+ svn_delta_shim_callbacks_default(result_pool);
+ struct shim_callbacks_baton *scb = apr_pcalloc(result_pool, sizeof(*scb));
+
+ scb->wc_ctx = wc_ctx;
+ scb->anchor_abspath = apr_pstrdup(result_pool, anchor_abspath);
+
+ callbacks->fetch_props_func = fetch_props_func;
+ callbacks->fetch_kind_func = fetch_kind_func;
+ callbacks->fetch_base_func = fetch_base_func;
+ callbacks->fetch_baton = scb;
+
+ return callbacks;
+}
Modified: subversion/branches/multi-layer-moves/subversion/libsvn_delta/compat.c
URL: http://svn.apache.org/viewvc/subversion/branches/multi-layer-moves/subversion/libsvn_delta/compat.c?rev=1300532&r1=1300531&r2=1300532&view=diff
==============================================================================
--- subversion/branches/multi-layer-moves/subversion/libsvn_delta/compat.c (original)
+++ subversion/branches/multi-layer-moves/subversion/libsvn_delta/compat.c Wed Mar 14 13:07:02 2012
@@ -129,7 +129,11 @@ struct extra_baton
struct ev2_edit_baton
{
svn_editor_t *editor;
+
apr_hash_t *paths;
+ apr_array_header_t *path_order;
+ int paths_processed;
+
apr_pool_t *edit_pool;
struct extra_baton *exb;
svn_boolean_t closed;
@@ -221,10 +225,12 @@ add_action(struct ev2_edit_baton *eb,
if (action_list == NULL)
{
+ const char *path_dup = apr_pstrdup(eb->edit_pool, path);
+
action_list = apr_array_make(eb->edit_pool, 1,
sizeof(struct path_action *));
- apr_hash_set(eb->paths, apr_pstrdup(eb->edit_pool, path),
- APR_HASH_KEY_STRING, action_list);
+ apr_hash_set(eb->paths, path_dup, APR_HASH_KEY_STRING, action_list);
+ APR_ARRAY_PUSH(eb->path_order, const char *) = path_dup;
}
APR_ARRAY_PUSH(action_list, struct path_action *) = p_action;
@@ -232,6 +238,42 @@ add_action(struct ev2_edit_baton *eb,
return SVN_NO_ERROR;
}
+/* Find all the paths which are immediate children of PATH and return their
+ basenames in a list. */
+static apr_array_header_t *
+get_children(struct ev2_edit_baton *eb,
+ const char *path,
+ apr_pool_t *pool)
+{
+ apr_array_header_t *children = apr_array_make(pool, 1, sizeof(const char *));
+ apr_hash_index_t *hi;
+
+ for (hi = apr_hash_first(pool, eb->paths); hi; hi = apr_hash_next(hi))
+ {
+ const char *p = svn__apr_hash_index_key(hi);
+ const char *child;
+
+ /* Sanitize our paths. */
+ if (*p == '/')
+ p++;
+
+ /* Find potential children. */
+ child = svn_relpath_skip_ancestor(path, p);
+ if (!child || !*child)
+ continue;
+
+ /* If we have a path separator, it's a deep child, so just ignore it.
+ ### Is there an API we should be using for this? */
+ if (strchr(child, '/') != NULL)
+ continue;
+
+ APR_ARRAY_PUSH(children, const char *) = child;
+ }
+
+ return children;
+}
+
+
static svn_error_t *
process_actions(void *edit_baton,
const char *path,
@@ -245,7 +287,7 @@ process_actions(void *edit_baton,
svn_boolean_t need_copy = FALSE;
const char *copyfrom_path;
svn_revnum_t copyfrom_rev;
- apr_array_header_t *children;
+ apr_array_header_t *children = NULL;
svn_stream_t *contents = NULL;
svn_checksum_t *checksum = NULL;
svn_revnum_t delete_revnum = SVN_INVALID_REVNUM;
@@ -319,8 +361,7 @@ process_actions(void *edit_baton,
if (kind == svn_kind_dir)
{
- children = apr_array_make(scratch_pool, 1,
- sizeof(const char *));
+ children = get_children(eb, path, scratch_pool);
}
else
{
@@ -337,7 +378,7 @@ process_actions(void *edit_baton,
struct path_checksum_args *pca = action->args;
/* We can only set text on files. */
- kind = svn_node_file;
+ kind = svn_kind_file;
SVN_ERR(svn_io_file_checksum2(&checksum, pca->path,
svn_checksum_sha1, scratch_pool));
@@ -449,29 +490,21 @@ run_ev2_actions(void *edit_baton,
apr_pool_t *scratch_pool)
{
struct ev2_edit_baton *eb = edit_baton;
- apr_array_header_t *sorted_hash;
apr_pool_t *iterpool;
- int i;
-
- /* Sort the paths touched by this edit.
- * Ev2 doesn't really have any particular need for depth-first-ness, but
- * we want to ensure all parent directories are handled before children in
- * the case of adds (which does introduce an element of depth-first-ness). */
- sorted_hash = svn_sort__hash(eb->paths, svn_sort_compare_items_as_paths,
- scratch_pool);
iterpool = svn_pool_create(scratch_pool);
- for (i = 0; i < sorted_hash->nelts; i++)
- {
- svn_sort__item_t *item = &APR_ARRAY_IDX(sorted_hash, i, svn_sort__item_t);
- apr_array_header_t *actions = item->value;
- const char *path = item->key;
+
+ /* Possibly pick up where we left off. Ocassionally, we do some of these
+ as part of close_edit() and then some more as part of abort_edit() */
+ for (; eb->paths_processed < eb->path_order->nelts; ++eb->paths_processed)
+ {
+ const char *path = APR_ARRAY_IDX(eb->path_order, eb->paths_processed,
+ const char *);
+ apr_array_header_t *actions = apr_hash_get(eb->paths, path,
+ APR_HASH_KEY_STRING);
svn_pool_clear(iterpool);
SVN_ERR(process_actions(edit_baton, path, actions, iterpool));
-
- /* Remove this item from the hash. */
- apr_hash_set(eb->paths, path, APR_HASH_KEY_STRING, NULL);
}
svn_pool_destroy(iterpool);
@@ -637,7 +670,7 @@ ev2_absent_directory(const char *path,
{
struct ev2_dir_baton *pb = parent_baton;
svn_kind_t *kind = apr_palloc(pb->eb->edit_pool, sizeof(*kind));
-
+
*kind = svn_kind_dir;
SVN_ERR(add_action(pb->eb, path, ACTION_ADD_ABSENT, kind));
@@ -788,7 +821,7 @@ ev2_apply_textdelta(void *file_baton,
&hb->apply_handler, &hb->apply_baton);
hb->pool = handler_pool;
-
+
*handler_baton = hb;
*handler = window_handler;
@@ -840,7 +873,7 @@ ev2_absent_file(const char *path,
{
struct ev2_dir_baton *pb = parent_baton;
svn_kind_t *kind = apr_palloc(pb->eb->edit_pool, sizeof(*kind));
-
+
*kind = svn_kind_file;
SVN_ERR(add_action(pb->eb, path, ACTION_ADD_ABSENT, kind));
@@ -890,7 +923,7 @@ ev2_abort_edit(void *edit_baton,
* - EXB: An 'extra baton' which is used to communicate between the shims.
* Its callbacks should be invoked at the appropriate time by this
* shim.
- */
+ */
static svn_error_t *
delta_from_editor(const svn_delta_editor_t **deditor,
void **dedit_baton,
@@ -928,6 +961,7 @@ delta_from_editor(const svn_delta_editor
eb->editor = editor;
eb->paths = apr_hash_make(pool);
+ eb->path_order = apr_array_make(pool, 1, sizeof(const char *));
eb->edit_pool = pool;
eb->found_abs_paths = found_abs_paths;
*eb->found_abs_paths = FALSE;
@@ -1108,7 +1142,7 @@ build(struct editor_baton *eb,
actual structures, not pointers to them. */
svn_prop_t *prop = &APR_ARRAY_IDX(propdiffs, i, svn_prop_t);
if (!prop->value)
- APR_ARRAY_PUSH(operation->prop_dels, const char *) =
+ APR_ARRAY_PUSH(operation->prop_dels, const char *) =
apr_pstrdup(eb->edit_pool, prop->name);
else
apr_hash_set(operation->prop_mods,
@@ -1537,7 +1571,8 @@ drive_tree(struct operation *op,
{
/* Open or create our baton. */
if (op->operation == OP_OPEN || op->operation == OP_PROPSET)
- SVN_ERR(editor->open_directory(path, parent_op->baton, op->base_revision,
+ SVN_ERR(editor->open_directory(path, parent_op->baton,
+ op->base_revision,
scratch_pool, &op->baton));
else if (op->operation == OP_ADD || op->operation == OP_REPLACE)
@@ -1577,7 +1612,7 @@ drive_tree(struct operation *op,
I don't know that that's a valid assumption... */
void *file_baton = NULL;
-
+
/* Open or create our baton. */
if (op->operation == OP_OPEN || op->operation == OP_PROPSET)
SVN_ERR(editor->open_file(path, parent_op->baton, op->base_revision,
@@ -1652,7 +1687,7 @@ drive_root(struct operation *root,
svn_pool_clear(iterpool);
SVN_ERR(drive_tree(child, root, editor, make_abs_paths, iterpool));
}
-
+
/* We need to close the root directory, but leave it to our caller to call
close_ or abort_edit(). */
SVN_ERR(editor->close_directory(root->baton, scratch_pool));
Modified: subversion/branches/multi-layer-moves/subversion/libsvn_delta/editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/multi-layer-moves/subversion/libsvn_delta/editor.c?rev=1300532&r1=1300531&r2=1300532&view=diff
==============================================================================
--- subversion/branches/multi-layer-moves/subversion/libsvn_delta/editor.c (original)
+++ subversion/branches/multi-layer-moves/subversion/libsvn_delta/editor.c Wed Mar 14 13:07:02 2012
@@ -33,7 +33,7 @@
/* This enables runtime checks of the editor API constraints. This may
introduce additional memory and runtime overhead, and should not be used
in production builds.
-
+
### Remove before release? */
#define ENABLE_ORDERING_CHECK
#endif
@@ -420,7 +420,8 @@ svn_editor_add_file(svn_editor_t *editor
{
svn_error_t *err = SVN_NO_ERROR;
- SVN_ERR_ASSERT(checksum != NULL);
+ SVN_ERR_ASSERT(checksum != NULL
+ && checksum->kind == SVN_EDITOR_CHECKSUM_KIND);
SVN_ERR_ASSERT(contents != NULL);
SVN_ERR_ASSERT(props != NULL);
SHOULD_NOT_BE_FINISHED(editor);
@@ -539,6 +540,8 @@ svn_editor_alter_file(svn_editor_t *edit
SVN_ERR_ASSERT((checksum != NULL && contents != NULL)
|| (checksum == NULL && contents == NULL));
SVN_ERR_ASSERT(props != NULL || checksum != NULL);
+ if (checksum)
+ SVN_ERR_ASSERT(checksum->kind == SVN_EDITOR_CHECKSUM_KIND);
SHOULD_NOT_BE_FINISHED(editor);
SHOULD_ALLOW_ALTER(editor, relpath);
@@ -632,6 +635,7 @@ svn_editor_copy(svn_editor_t *editor,
editor->scratch_pool);
MARK_ALLOW_ALTER(editor, dst_relpath);
+ CLEAR_INCOMPLETE(editor, dst_relpath);
svn_pool_clear(editor->scratch_pool);
return err;
@@ -661,6 +665,7 @@ svn_editor_move(svn_editor_t *editor,
MARK_ALLOW_ADD(editor, src_relpath);
MARK_ALLOW_ALTER(editor, dst_relpath);
+ CLEAR_INCOMPLETE(editor, dst_relpath);
svn_pool_clear(editor->scratch_pool);
return err;
Modified: subversion/branches/multi-layer-moves/subversion/libsvn_delta/svndiff.c
URL: http://svn.apache.org/viewvc/subversion/branches/multi-layer-moves/subversion/libsvn_delta/svndiff.c?rev=1300532&r1=1300531&r2=1300532&view=diff
==============================================================================
--- subversion/branches/multi-layer-moves/subversion/libsvn_delta/svndiff.c (original)
+++ subversion/branches/multi-layer-moves/subversion/libsvn_delta/svndiff.c Wed Mar 14 13:07:02 2012
@@ -645,7 +645,7 @@ decode_window(svn_txdelta_window_t *wind
svn_stringbuf_t *ndout = svn_stringbuf_create_empty(pool);
/* these may in fact simply return references to insend */
-
+
SVN_ERR(zlib_decode(insend, newlen, ndout,
SVN_DELTA_WINDOW_SIZE));
SVN_ERR(zlib_decode(data, insend - data, instout,
Modified: subversion/branches/multi-layer-moves/subversion/libsvn_delta/text_delta.c
URL: http://svn.apache.org/viewvc/subversion/branches/multi-layer-moves/subversion/libsvn_delta/text_delta.c?rev=1300532&r1=1300531&r2=1300532&view=diff
==============================================================================
--- subversion/branches/multi-layer-moves/subversion/libsvn_delta/text_delta.c (original)
+++ subversion/branches/multi-layer-moves/subversion/libsvn_delta/text_delta.c Wed Mar 14 13:07:02 2012
@@ -291,7 +291,7 @@ svn_txdelta__remove_copy(svn_txdelta__op
/* we can't modify svn_txdelta_target ops -> stop there */
if (op->action_code == svn_txdelta_target)
break;
-
+
/* handle the case that we cannot remove the op entirely */
if (op->length + len > max_len)
{
@@ -303,18 +303,18 @@ svn_txdelta__remove_copy(svn_txdelta__op
op->length -= max_len - len;
len = max_len;
}
-
+
break;
}
-
+
/* drop the op entirely */
if (op->action_code == svn_txdelta_new)
build_baton->new_data->len -= op->length;
-
+
len += op->length;
--build_baton->num_ops;
}
-
+
return len;
}
Modified: subversion/branches/multi-layer-moves/subversion/libsvn_delta/xdelta.c
URL: http://svn.apache.org/viewvc/subversion/branches/multi-layer-moves/subversion/libsvn_delta/xdelta.c?rev=1300532&r1=1300531&r2=1300532&view=diff
==============================================================================
--- subversion/branches/multi-layer-moves/subversion/libsvn_delta/xdelta.c (original)
+++ subversion/branches/multi-layer-moves/subversion/libsvn_delta/xdelta.c Wed Mar 14 13:07:02 2012
@@ -257,14 +257,18 @@ reverse_match_length(const char *a, cons
break;
pos -= sizeof(apr_size_t);
-
+
#endif
+ /* If we find a mismatch at -pos, pos-1 characters matched.
+ */
while (++pos <= max_len)
- if (a[-pos] != b[-pos])
- break;
-
- return pos-1;
+ if (a[0-pos] != b[0-pos])
+ return pos - 1;
+
+ /* No mismatch found -> at least MAX_LEN machting chars.
+ */
+ return max_len;
}
@@ -390,7 +394,7 @@ compute_delta(svn_txdelta__ops_baton_t *
apr_size_t lo = 0, pending_insert_start = 0;
/* Optimization: directly compare window starts. If more than 4
- * bytes match, we can immediately create a matching windows.
+ * bytes match, we can immediately create a matching windows.
* Shorter sequences result in a net data increase. */
lo = match_length(a, b, asize > bsize ? bsize : asize);
if ((lo > 4) || (lo == bsize))
@@ -442,7 +446,7 @@ compute_delta(svn_txdelta__ops_baton_t *
svn_txdelta__insert_op(build_baton, svn_txdelta_new,
0, lo - pending_insert_start,
b + pending_insert_start, pool);
- else
+ else
{
/* the match borders on the previous op. Maybe, we found a
* match that is better than / overlapping the previous one. */
Modified: subversion/branches/multi-layer-moves/subversion/libsvn_fs/fs-loader.c
URL: http://svn.apache.org/viewvc/subversion/branches/multi-layer-moves/subversion/libsvn_fs/fs-loader.c?rev=1300532&r1=1300531&r2=1300532&view=diff
==============================================================================
--- subversion/branches/multi-layer-moves/subversion/libsvn_fs/fs-loader.c (original)
+++ subversion/branches/multi-layer-moves/subversion/libsvn_fs/fs-loader.c Wed Mar 14 13:07:02 2012
@@ -155,7 +155,7 @@ get_library_vtable_direct(fs_library_vta
/* Invoke the FS module's initfunc function with the common
pool protected by a lock. */
- SVN_MUTEX__WITH_LOCK(common_pool_lock,
+ SVN_MUTEX__WITH_LOCK(common_pool_lock,
initfunc(my_version, vtable, common_pool));
}
fs_version = (*vtable)->get_version();
@@ -357,7 +357,7 @@ svn_fs_create(svn_fs_t **fs_p, const cha
/* Perform the actual creation. */
*fs_p = fs_new(fs_config, pool);
-
+
SVN_MUTEX__WITH_LOCK(common_pool_lock,
vtable->create(*fs_p, path, pool, common_pool));
return SVN_NO_ERROR;
@@ -394,7 +394,9 @@ svn_error_t *
svn_fs_verify(const char *path,
svn_cancel_func_t cancel_func,
void *cancel_baton,
- apr_pool_t *pool)
+ svn_revnum_t start,
+ svn_revnum_t end,
+ apr_pool_t *pool)
{
fs_library_vtable_t *vtable;
svn_fs_t *fs;
@@ -404,7 +406,7 @@ svn_fs_verify(const char *path,
SVN_MUTEX__WITH_LOCK(common_pool_lock,
vtable->verify_fs(fs, path, cancel_func, cancel_baton,
- pool, common_pool));
+ start, end, pool, common_pool));
return SVN_NO_ERROR;
}
Modified: subversion/branches/multi-layer-moves/subversion/libsvn_fs/fs-loader.h
URL: http://svn.apache.org/viewvc/subversion/branches/multi-layer-moves/subversion/libsvn_fs/fs-loader.h?rev=1300532&r1=1300531&r2=1300532&view=diff
==============================================================================
--- subversion/branches/multi-layer-moves/subversion/libsvn_fs/fs-loader.h (original)
+++ subversion/branches/multi-layer-moves/subversion/libsvn_fs/fs-loader.h Wed Mar 14 13:07:02 2012
@@ -90,6 +90,8 @@ typedef struct fs_library_vtable_t
svn_error_t *(*verify_fs)(svn_fs_t *fs, const char *path,
/* ### notification? */
svn_cancel_func_t cancel_func, void *cancel_baton,
+ svn_revnum_t start,
+ svn_revnum_t end,
apr_pool_t *pool,
apr_pool_t *common_pool);
svn_error_t *(*delete_fs)(const char *path, apr_pool_t *pool);
Modified: subversion/branches/multi-layer-moves/subversion/libsvn_fs_base/bdb/env.c
URL: http://svn.apache.org/viewvc/subversion/branches/multi-layer-moves/subversion/libsvn_fs_base/bdb/env.c?rev=1300532&r1=1300531&r2=1300532&view=diff
==============================================================================
--- subversion/branches/multi-layer-moves/subversion/libsvn_fs_base/bdb/env.c (original)
+++ subversion/branches/multi-layer-moves/subversion/libsvn_fs_base/bdb/env.c Wed Mar 14 13:07:02 2012
@@ -378,7 +378,7 @@ bdb_init_cb(void *baton, apr_pool_t *poo
{
bdb_cache_pool = svn_pool_create(pool);
bdb_cache = apr_hash_make(bdb_cache_pool);
-
+
SVN_ERR(svn_mutex__init(&bdb_cache_lock, TRUE, bdb_cache_pool));
apr_pool_cleanup_register(bdb_cache_pool, NULL, clear_cache,
apr_pool_cleanup_null);
@@ -493,7 +493,7 @@ static svn_error_t *
svn_fs_bdb__close_internal(bdb_env_t *bdb)
{
svn_error_t *err = SVN_NO_ERROR;
-
+
if (--bdb->refcount != 0)
{
/* If the environment is panicked and automatic recovery is not
@@ -543,7 +543,7 @@ svn_fs_bdb__close(bdb_env_baton_t *bdb_b
/* This may run during final pool cleanup when the lock is NULL. */
SVN_MUTEX__WITH_LOCK(bdb_cache_lock, svn_fs_bdb__close_internal(bdb));
-
+
return SVN_NO_ERROR;
}
@@ -587,7 +587,7 @@ cleanup_env_baton(void *data)
static svn_error_t *
-svn_fs_bdb__open_internal(bdb_env_baton_t **bdb_batonp,
+svn_fs_bdb__open_internal(bdb_env_baton_t **bdb_batonp,
const char *path,
u_int32_t flags, int mode,
apr_pool_t *pool)
@@ -643,7 +643,7 @@ svn_fs_bdb__open_internal(bdb_env_baton_
svn_error_clear(bdb_close(bdb));
return svn_error_trace(err);
}
-
+
apr_hash_set(bdb_cache, &bdb->key, sizeof bdb->key, bdb);
bdb->flags = flags;
bdb->refcount = 1;
@@ -669,11 +669,11 @@ svn_fs_bdb__open(bdb_env_baton_t **bdb_b
u_int32_t flags, int mode,
apr_pool_t *pool)
{
- SVN_MUTEX__WITH_LOCK(bdb_cache_lock,
- svn_fs_bdb__open_internal(bdb_batonp,
- path,
- flags,
- mode,
+ SVN_MUTEX__WITH_LOCK(bdb_cache_lock,
+ svn_fs_bdb__open_internal(bdb_batonp,
+ path,
+ flags,
+ mode,
pool));
return SVN_NO_ERROR;
Modified: subversion/branches/multi-layer-moves/subversion/libsvn_fs_base/fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/multi-layer-moves/subversion/libsvn_fs_base/fs.c?rev=1300532&r1=1300531&r2=1300532&view=diff
==============================================================================
--- subversion/branches/multi-layer-moves/subversion/libsvn_fs_base/fs.c (original)
+++ subversion/branches/multi-layer-moves/subversion/libsvn_fs_base/fs.c Wed Mar 14 13:07:02 2012
@@ -333,9 +333,10 @@ bdb_write_config(svn_fs_t *fs)
"#\n"
"# Make sure you read the documentation at:\n"
"#\n"
- "# http://www.oracle.com/technology/documentation/berkeley-db/db/ref/lock/max.html\n"
+ "# http://docs.oracle.com/cd/E17076_02/html/programmer_reference/lock_max.html\n"
"#\n"
"# before tweaking these values.\n"
+ "#\n"
"set_lk_max_locks 2000\n"
"set_lk_max_lockers 2000\n"
"set_lk_max_objects 2000\n"
@@ -344,9 +345,9 @@ bdb_write_config(svn_fs_t *fs)
"#\n"
"# Make sure you read the documentation at:\n"
"#\n"
- "# http://www.oracle.com/technology/documentation/berkeley-db/db/api_c/env_set_lg_bsize.html\n"
- "# http://www.oracle.com/technology/documentation/berkeley-db/db/api_c/env_set_lg_max.html\n"
- "# http://www.oracle.com/technology/documentation/berkeley-db/db/ref/log/limits.html\n"
+ "# http://docs.oracle.com/cd/E17076_02/html/api_reference/C/envset_lg_bsize.html\n"
+ "# http://docs.oracle.com/cd/E17076_02/html/api_reference/C/envset_lg_max.html\n"
+ "# http://docs.oracle.com/cd/E17076_02/html/programmer_reference/log_limits.html\n"
"#\n"
"# Increase the size of the in-memory log buffer from the default\n"
"# of 32 Kbytes to 256 Kbytes. Decrease the log file size from\n"
@@ -354,24 +355,28 @@ bdb_write_config(svn_fs_t *fs)
"# space required for hot backups. The size of the log file must be\n"
"# at least four times the size of the in-memory log buffer.\n"
"#\n"
- "# Note: Decreasing the in-memory buffer size below 256 Kbytes\n"
- "# will hurt commit performance. For details, see this post from\n"
- "# Daniel Berlin <da...@dberlin.org>:\n"
+ "# Note: Decreasing the in-memory buffer size below 256 Kbytes will hurt\n"
+ "# hurt commit performance. For details, see:\n"
+ "#\n"
+ "# http://svn.haxx.se/dev/archive-2002-02/0141.shtml\n"
"#\n"
- "# http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgId=161960\n"
"set_lg_bsize 262144\n"
"set_lg_max 1048576\n"
"#\n"
"# If you see \"log region out of memory\" errors, bump lg_regionmax.\n"
- "# See http://www.oracle.com/technology/documentation/berkeley-db/db/ref/log/config.html\n"
- "# and http://svn.haxx.se/users/archive-2004-10/1001.shtml for more.\n"
+ "# For more information, see:\n"
+ "#\n"
+ "# http://docs.oracle.com/cd/E17076_02/html/programmer_reference/log_config.html\n"
+ "# http://svn.haxx.se/users/archive-2004-10/1000.shtml\n"
+ "#\n"
"set_lg_regionmax 131072\n"
"#\n"
/* ### Configure this with "svnadmin create --bdb-cache-size" */
"# The default cache size in BDB is only 256k. As explained in\n"
- "# http://svn.haxx.se/dev/archive-2004-12/0369.shtml, this is too\n"
+ "# http://svn.haxx.se/dev/archive-2004-12/0368.shtml, this is too\n"
"# small for most applications. Bump this number if \"db_stat -m\"\n"
"# shows too many cache misses.\n"
+ "#\n"
"set_cachesize 0 1048576 1\n";
/* Run-time configurable options.
@@ -397,11 +402,12 @@ bdb_write_config(svn_fs_t *fs)
"# Disable fsync of log files on transaction commit. Read the\n"
"# documentation about DB_TXN_NOSYNC at:\n"
"#\n"
- "# http://www.oracle.com/technology/documentation/berkeley-db/db/ref/log/config.html\n"
+ "# http://docs.oracle.com/cd/E17076_02/html/programmer_reference/log_config.html\n"
"#\n"
- "# [requires Berkeley DB 4.0]\n",
+ "# [requires Berkeley DB 4.0]\n"
+ "#\n",
/* inactive */
- "# set_flags DB_TXN_NOSYNC\n",
+ "#set_flags DB_TXN_NOSYNC\n",
/* active */
"set_flags DB_TXN_NOSYNC\n" },
/* Controlled by "svnadmin create --bdb-log-keep" */
@@ -411,11 +417,12 @@ bdb_write_config(svn_fs_t *fs)
"# Enable automatic removal of unused transaction log files.\n"
"# Read the documentation about DB_LOG_AUTOREMOVE at:\n"
"#\n"
- "# http://www.oracle.com/technology/documentation/berkeley-db/db/ref/log/config.html\n"
+ "# http://docs.oracle.com/cd/E17076_02/html/programmer_reference/log_config.html\n"
"#\n"
- "# [requires Berkeley DB 4.2]\n",
+ "# [requires Berkeley DB 4.2]\n"
+ "#\n",
/* inactive */
- "# set_flags DB_LOG_AUTOREMOVE\n",
+ "#set_flags DB_LOG_AUTOREMOVE\n",
/* active */
"set_flags DB_LOG_AUTOREMOVE\n" },
};
@@ -876,6 +883,8 @@ static svn_error_t *
base_verify(svn_fs_t *fs, const char *path,
svn_cancel_func_t cancel_func,
void *cancel_baton,
+ svn_revnum_t start,
+ svn_revnum_t end,
apr_pool_t *pool,
apr_pool_t *common_pool)
{
Modified: subversion/branches/multi-layer-moves/subversion/libsvn_fs_base/notes/structure
URL: http://svn.apache.org/viewvc/subversion/branches/multi-layer-moves/subversion/libsvn_fs_base/notes/structure?rev=1300532&r1=1300531&r2=1300532&view=diff
==============================================================================
--- subversion/branches/multi-layer-moves/subversion/libsvn_fs_base/notes/structure (original)
+++ subversion/branches/multi-layer-moves/subversion/libsvn_fs_base/notes/structure Wed Mar 14 13:07:02 2012
@@ -104,8 +104,8 @@ structure summary" section of this docum
NODE-REVISION: how we represent a node revision
We represent a given revision of a file or directory node using a list
-skel (see skel.h for an explanation of skels). A node revision skel
-has the form:
+skel (see include/private/svn_skel.h for an explanation of skels).
+A node revision skel has the form:
(HEADER PROP-KEY KIND-SPECIFIC ...)
Modified: subversion/branches/multi-layer-moves/subversion/libsvn_fs_fs/fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/multi-layer-moves/subversion/libsvn_fs_fs/fs.c?rev=1300532&r1=1300531&r2=1300532&view=diff
==============================================================================
--- subversion/branches/multi-layer-moves/subversion/libsvn_fs_fs/fs.c (original)
+++ subversion/branches/multi-layer-moves/subversion/libsvn_fs_fs/fs.c Wed Mar 14 13:07:02 2012
@@ -92,7 +92,7 @@ fs_serialized_init(svn_fs_t *fs, apr_poo
SVN_FS_FS__USE_LOCK_MUTEX, common_pool));
/* ... not to mention locking the txn-current file. */
- SVN_ERR(svn_mutex__init(&ffsd->txn_current_lock,
+ SVN_ERR(svn_mutex__init(&ffsd->txn_current_lock,
SVN_FS_FS__USE_LOCK_MUTEX, common_pool));
SVN_ERR(svn_mutex__init(&ffsd->txn_list_lock,
@@ -243,6 +243,8 @@ static svn_error_t *
fs_verify(svn_fs_t *fs, const char *path,
svn_cancel_func_t cancel_func,
void *cancel_baton,
+ svn_revnum_t start,
+ svn_revnum_t end,
apr_pool_t *pool,
apr_pool_t *common_pool)
{
@@ -251,7 +253,7 @@ fs_verify(svn_fs_t *fs, const char *path
SVN_ERR(svn_fs_fs__open(fs, path, pool));
SVN_ERR(svn_fs_fs__initialize_caches(fs, pool));
SVN_ERR(fs_serialized_init(fs, common_pool, pool));
- return svn_fs_fs__verify(fs, cancel_func, cancel_baton, pool);
+ return svn_fs_fs__verify(fs, cancel_func, cancel_baton, start, end, pool);
}
static svn_error_t *
Modified: subversion/branches/multi-layer-moves/subversion/libsvn_fs_fs/fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/multi-layer-moves/subversion/libsvn_fs_fs/fs.h?rev=1300532&r1=1300531&r2=1300532&view=diff
==============================================================================
--- subversion/branches/multi-layer-moves/subversion/libsvn_fs_fs/fs.h (original)
+++ subversion/branches/multi-layer-moves/subversion/libsvn_fs_fs/fs.h Wed Mar 14 13:07:02 2012
@@ -224,15 +224,17 @@ typedef struct fs_fs_data_t
(svn_fs_id_t *). (Not threadsafe.) */
svn_cache__t *rev_root_id_cache;
- /* DAG node cache for immutable nodes */
+ /* DAG node cache for immutable nodes. Maps (revision, fspath)
+ to (dag_node_t *). */
svn_cache__t *rev_node_cache;
/* A cache of the contents of immutable directories; maps from
- unparsed FS ID to ###x. */
+ unparsed FS ID to a apr_hash_t * mapping (const char *) dirent
+ names to (svn_fs_dirent_t *). */
svn_cache__t *dir_cache;
/* Fulltext cache; currently only used with memcached. Maps from
- rep key to svn_string_t. */
+ rep key (revision/offset) to svn_string_t. */
svn_cache__t *fulltext_cache;
/* Pack manifest cache; a cache mapping (svn_revnum_t) shard number to
@@ -244,7 +246,7 @@ typedef struct fs_fs_data_t
/* Cache for txdelta_window_t objects; the key is (revFilePath, offset) */
svn_cache__t *txdelta_window_cache;
- /* Cache for combined windows as svn_stringbuf_t objects;
+ /* Cache for combined windows as svn_stringbuf_t objects;
the key is (revFilePath, offset) */
svn_cache__t *combined_window_cache;