Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/lock.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/lock.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/lock.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/lock.c Mon Feb 16 17:40:07 2015 @@ -355,7 +355,7 @@ set_lock(const char *fs_path, always come back empty. */ SVN_ERR(read_digest_file(&children, NULL, fs_path, digest_path, pool)); - SVN_ERR(write_digest_file(children, lock, fs_path, digest_path, + SVN_ERR(write_digest_file(children, lock, fs_path, digest_path, perms_reference, pool)); return SVN_NO_ERROR; @@ -405,7 +405,7 @@ add_to_digest(const char *fs_path, } if (apr_hash_count(children) != original_count) - SVN_ERR(write_digest_file(children, lock, fs_path, index_digest_path, + SVN_ERR(write_digest_file(children, lock, fs_path, index_digest_path, perms_reference, pool)); return SVN_NO_ERROR; @@ -438,7 +438,7 @@ delete_from_digest(const char *fs_path, } if (apr_hash_count(children) || lock) - SVN_ERR(write_digest_file(children, lock, fs_path, index_digest_path, + SVN_ERR(write_digest_file(children, lock, fs_path, index_digest_path, perms_reference, pool)); else SVN_ERR(svn_io_remove_file2(index_digest_path, TRUE, pool)); @@ -451,6 +451,12 @@ unlock_single(svn_fs_t *fs, svn_lock_t *lock, apr_pool_t *pool); +/* Check if LOCK has been already expired. */ +static svn_boolean_t lock_expired(const svn_lock_t *lock) +{ + return lock->expiration_date && (apr_time_now() > lock->expiration_date); +} + /* Set *LOCK_P to the lock for PATH in FS. HAVE_WRITE_LOCK should be TRUE if the caller (or one of its callers) has taken out the repository-wide write lock, FALSE otherwise. If MUST_EXIST is @@ -480,7 +486,7 @@ get_lock(svn_lock_t **lock_p, return must_exist ? SVN_FS__ERR_NO_SUCH_LOCK(fs, path) : SVN_NO_ERROR; /* Don't return an expired lock. */ - if (lock->expiration_date && (apr_time_now() > lock->expiration_date)) + if (lock_expired(lock)) { /* Only remove the lock if we have the write lock. Read operations shouldn't change the filesystem. */ @@ -527,67 +533,17 @@ get_lock_helper(svn_fs_t *fs, } -/* Baton for locks_walker(). */ -struct walk_locks_baton { - svn_fs_get_locks_callback_t get_locks_func; - void *get_locks_baton; - svn_fs_t *fs; -}; - -/* Implements walk_digests_callback_t. */ -static svn_error_t * -locks_walker(void *baton, - const char *fs_path, - const char *digest_path, - svn_lock_t *lock, - svn_boolean_t have_write_lock, - apr_pool_t *pool) -{ - struct walk_locks_baton *wlb = baton; - - if (lock) - { - /* Don't report an expired lock. */ - if (lock->expiration_date == 0 - || (apr_time_now() <= lock->expiration_date)) - { - if (wlb->get_locks_func) - SVN_ERR(wlb->get_locks_func(wlb->get_locks_baton, lock, pool)); - } - else - { - /* Only remove the lock if we have the write lock. - Read operations shouldn't change the filesystem. */ - if (have_write_lock) - SVN_ERR(unlock_single(wlb->fs, lock, pool)); - } - } - - return SVN_NO_ERROR; -} - -/* Callback type for walk_digest_files(). - * - * LOCK come from a read_digest_file(digest_path) call. - */ -typedef svn_error_t *(*walk_digests_callback_t)(void *baton, - const char *fs_path, - const char *digest_path, - svn_lock_t *lock, - svn_boolean_t have_write_lock, - apr_pool_t *pool); - -/* A function that calls WALK_DIGESTS_FUNC/WALK_DIGESTS_BATON for - all lock digest files in and under PATH in FS. +/* A function that calls GET_LOCKS_FUNC/GET_LOCKS_BATON for + all locks in and under PATH in FS. HAVE_WRITE_LOCK should be true if the caller (directly or indirectly) has the FS write lock. */ static svn_error_t * -walk_digest_files(const char *fs_path, - const char *digest_path, - walk_digests_callback_t walk_digests_func, - void *walk_digests_baton, - svn_boolean_t have_write_lock, - apr_pool_t *pool) +walk_locks(svn_fs_t *fs, + const char *digest_path, + svn_fs_get_locks_callback_t get_locks_func, + void *get_locks_baton, + svn_boolean_t have_write_lock, + apr_pool_t *pool) { apr_hash_index_t *hi; apr_hash_t *children; @@ -595,10 +551,19 @@ walk_digest_files(const char *fs_path, svn_lock_t *lock; /* First, send up any locks in the current digest file. */ - SVN_ERR(read_digest_file(&children, &lock, fs_path, digest_path, pool)); + SVN_ERR(read_digest_file(&children, &lock, fs->path, digest_path, pool)); - SVN_ERR(walk_digests_func(walk_digests_baton, fs_path, digest_path, lock, - have_write_lock, pool)); + if (lock && lock_expired(lock)) + { + /* Only remove the lock if we have the write lock. + Read operations shouldn't change the filesystem. */ + if (have_write_lock) + SVN_ERR(unlock_single(fs, lock, pool)); + } + else if (lock) + { + SVN_ERR(get_locks_func(get_locks_baton, lock, pool)); + } /* Now, report all the child entries (if any; bail otherwise). */ if (! apr_hash_count(children)) @@ -610,38 +575,25 @@ walk_digest_files(const char *fs_path, svn_pool_clear(subpool); SVN_ERR(read_digest_file - (NULL, &lock, fs_path, - digest_path_from_digest(fs_path, digest, subpool), subpool)); + (NULL, &lock, fs->path, + digest_path_from_digest(fs->path, digest, subpool), subpool)); - SVN_ERR(walk_digests_func(walk_digests_baton, fs_path, digest_path, lock, - have_write_lock, subpool)); + if (lock && lock_expired(lock)) + { + /* Only remove the lock if we have the write lock. + Read operations shouldn't change the filesystem. */ + if (have_write_lock) + SVN_ERR(unlock_single(fs, lock, pool)); + } + else if (lock) + { + SVN_ERR(get_locks_func(get_locks_baton, lock, pool)); + } } svn_pool_destroy(subpool); return SVN_NO_ERROR; } -/* A function that calls GET_LOCKS_FUNC/GET_LOCKS_BATON for - all locks in and under PATH in FS. - HAVE_WRITE_LOCK should be true if the caller (directly or indirectly) - has the FS write lock. */ -static svn_error_t * -walk_locks(svn_fs_t *fs, - const char *digest_path, - svn_fs_get_locks_callback_t get_locks_func, - void *get_locks_baton, - svn_boolean_t have_write_lock, - apr_pool_t *pool) -{ - struct walk_locks_baton wlb; - - wlb.get_locks_func = get_locks_func; - wlb.get_locks_baton = get_locks_baton; - wlb.fs = fs; - SVN_ERR(walk_digest_files(fs->path, digest_path, locks_walker, &wlb, - have_write_lock, pool)); - return SVN_NO_ERROR; -} - /* Utility function: verify that a lock can be used. Interesting errors returned from this function: @@ -716,6 +668,35 @@ svn_fs_fs__allow_locked_operation(const return SVN_NO_ERROR; } +/* Helper function called from the lock and unlock code. + UPDATES is a map from "const char *" parent paths to "apr_array_header_t *" + arrays of child paths. For all of the parent paths of PATH this function + adds PATH to the corresponding array of child paths. */ +static void +schedule_index_update(apr_hash_t *updates, + const char *path, + apr_pool_t *scratch_pool) +{ + apr_pool_t *hashpool = apr_hash_pool_get(updates); + const char *parent_path = path; + + while (! svn_fspath__is_root(parent_path, strlen(parent_path))) + { + apr_array_header_t *children; + + parent_path = svn_fspath__dirname(parent_path, scratch_pool); + children = svn_hash_gets(updates, parent_path); + + if (! children) + { + children = apr_array_make(hashpool, 8, sizeof(const char *)); + svn_hash_sets(updates, apr_pstrdup(hashpool, parent_path), children); + } + + APR_ARRAY_PUSH(children, const char *) = path; + } +} + /* The effective arguments for lock_body() below. */ struct lock_baton { svn_fs_t *fs; @@ -828,7 +809,6 @@ check_lock(svn_error_t **fs_err, struct lock_info_t { const char *path; - const char *component; svn_lock_t *lock; svn_error_t *fs_err; }; @@ -851,7 +831,9 @@ lock_body(void *baton, apr_pool_t *pool) svn_fs_root_t *root; svn_revnum_t youngest; const char *rev_0_path; - int i, outstanding = 0; + int i; + apr_hash_t *index_updates = apr_hash_make(pool); + apr_hash_index_t *hi; apr_pool_t *iterpool = svn_pool_create(pool); /* Until we implement directory locks someday, we only allow locks @@ -865,34 +847,28 @@ lock_body(void *baton, apr_pool_t *pool) { const svn_sort__item_t *item = &APR_ARRAY_IDX(lb->targets, i, svn_sort__item_t); - const svn_fs_lock_target_t *target = item->value; struct lock_info_t info; svn_pool_clear(iterpool); info.path = item->key; - SVN_ERR(check_lock(&info.fs_err, info.path, target, lb, root, iterpool)); info.lock = NULL; - info.component = NULL; - APR_ARRAY_PUSH(lb->infos, struct lock_info_t) = info; + info.fs_err = SVN_NO_ERROR; + + SVN_ERR(check_lock(&info.fs_err, info.path, item->value, lb, root, + iterpool)); + + /* If no error occurred while pre-checking, schedule the index updates for + this path. */ if (!info.fs_err) - ++outstanding; + schedule_index_update(index_updates, info.path, iterpool); + + APR_ARRAY_PUSH(lb->infos, struct lock_info_t) = info; } rev_0_path = svn_fs_fs__path_rev_absolute(lb->fs, 0, pool); - /* Given the paths: - - /foo/bar/f - /foo/bar/g - /zig/x - - we loop through repeatedly. The first pass sees '/' on all paths - and writes the '/' index. The second pass sees '/foo' twice and - writes that index followed by '/zig' and that index. The third - pass sees '/foo/bar' twice and writes that index, and then writes - the lock for '/zig/x'. The fourth pass writes the locks for - '/foo/bar/f' and '/foo/bar/g'. + /* We apply the scheduled index updates before writing the actual locks. Writing indices before locks is correct: if interrupted it leaves indices without locks rather than locks without indices. An @@ -901,92 +877,50 @@ lock_body(void *baton, apr_pool_t *pool) index is inconsistent, svn_fs_fs__allow_locked_operation will show locked on the file but unlocked on the parent. */ - - while (outstanding) + for (hi = apr_hash_first(pool, index_updates); hi; hi = apr_hash_next(hi)) + { + const char *path = apr_hash_this_key(hi); + apr_array_header_t *children = apr_hash_this_val(hi); + + svn_pool_clear(iterpool); + SVN_ERR(add_to_digest(lb->fs->path, children, path, rev_0_path, + iterpool)); + } + + for (i = 0; i < lb->infos->nelts; ++i) { - const char *last_path = NULL; - apr_array_header_t *paths; + struct lock_info_t *info = &APR_ARRAY_IDX(lb->infos, i, + struct lock_info_t); + svn_sort__item_t *item = &APR_ARRAY_IDX(lb->targets, i, svn_sort__item_t); + svn_fs_lock_target_t *target = item->value; svn_pool_clear(iterpool); - paths = apr_array_make(iterpool, 1, sizeof(const char *)); - for (i = 0; i < lb->infos->nelts; ++i) + if (! info->fs_err) { - struct lock_info_t *info = &APR_ARRAY_IDX(lb->infos, i, - struct lock_info_t); - const svn_sort__item_t *item = &APR_ARRAY_IDX(lb->targets, i, - svn_sort__item_t); - const svn_fs_lock_target_t *target = item->value; - - if (!info->fs_err && !info->lock) - { - if (!info->component) - { - info->component = info->path; - APR_ARRAY_PUSH(paths, const char *) = info->path; - last_path = "/"; - } - else - { - info->component = strchr(info->component + 1, '/'); - if (!info->component) - { - /* The component is a path to lock, this cannot - match a previous path that need to be indexed. */ - if (paths->nelts) - { - SVN_ERR(add_to_digest(lb->fs->path, paths, last_path, - rev_0_path, iterpool)); - apr_array_clear(paths); - last_path = NULL; - } - - info->lock = svn_lock_create(lb->result_pool); - if (target->token) - info->lock->token = target->token; - else - SVN_ERR(svn_fs_fs__generate_lock_token( - &(info->lock->token), lb->fs, - lb->result_pool)); - info->lock->path = info->path; - info->lock->owner = lb->fs->access_ctx->username; - info->lock->comment = lb->comment; - info->lock->is_dav_comment = lb->is_dav_comment; - info->lock->creation_date = apr_time_now(); - info->lock->expiration_date = lb->expiration_date; - - info->fs_err = set_lock(lb->fs->path, info->lock, - rev_0_path, iterpool); - --outstanding; - } - else - { - /* The component is a path to an index. */ - apr_size_t len = info->component - info->path; - - if (last_path - && (strncmp(last_path, info->path, len) - || strlen(last_path) != len)) - { - /* No match to the previous paths to index. */ - SVN_ERR(add_to_digest(lb->fs->path, paths, last_path, - rev_0_path, iterpool)); - apr_array_clear(paths); - last_path = NULL; - } - APR_ARRAY_PUSH(paths, const char *) = info->path; - if (!last_path) - last_path = apr_pstrndup(iterpool, info->path, len); - } - } - } - - if (last_path && i == lb->infos->nelts - 1) - SVN_ERR(add_to_digest(lb->fs->path, paths, last_path, - rev_0_path, iterpool)); + info->lock = svn_lock_create(lb->result_pool); + if (target->token) + info->lock->token = apr_pstrdup(lb->result_pool, target->token); + else + SVN_ERR(svn_fs_fs__generate_lock_token(&(info->lock->token), lb->fs, + lb->result_pool)); + + /* The INFO->PATH is already allocated in LB->RESULT_POOL as a result + of svn_fspath__canonicalize() (see svn_fs_fs__lock()). */ + info->lock->path = info->path; + info->lock->owner = apr_pstrdup(lb->result_pool, + lb->fs->access_ctx->username); + info->lock->comment = apr_pstrdup(lb->result_pool, lb->comment); + info->lock->is_dav_comment = lb->is_dav_comment; + info->lock->creation_date = apr_time_now(); + info->lock->expiration_date = lb->expiration_date; + + info->fs_err = set_lock(lb->fs->path, info->lock, rev_0_path, + iterpool); } } - + + svn_pool_destroy(iterpool); return SVN_NO_ERROR; } @@ -1027,10 +961,8 @@ check_unlock(svn_error_t **fs_err, struct unlock_info_t { const char *path; - const char *component; svn_error_t *fs_err; svn_boolean_t done; - int components; }; /* The body of svn_fs_fs__unlock(), which see. @@ -1051,7 +983,9 @@ unlock_body(void *baton, apr_pool_t *poo svn_fs_root_t *root; svn_revnum_t youngest; const char *rev_0_path; - int i, max_components = 0, outstanding = 0; + int i; + apr_hash_t *indices_updates = apr_hash_make(pool); + apr_hash_index_t *hi; apr_pool_t *iterpool = svn_pool_create(pool); SVN_ERR(ub->fs->vtable->youngest_rev(&youngest, ub->fs, pool)); @@ -1062,96 +996,56 @@ unlock_body(void *baton, apr_pool_t *poo const svn_sort__item_t *item = &APR_ARRAY_IDX(ub->targets, i, svn_sort__item_t); const char *token = item->value; - struct unlock_info_t info = { 0 }; + struct unlock_info_t info; svn_pool_clear(iterpool); info.path = item->key; + info.fs_err = SVN_NO_ERROR; + info.done = FALSE; + if (!ub->skip_check) SVN_ERR(check_unlock(&info.fs_err, info.path, token, ub, root, iterpool)); - if (!info.fs_err) - { - const char *s; - info.components = 1; - info.component = info.path; - while((s = strchr(info.component + 1, '/'))) - { - info.component = s; - ++info.components; - } - - if (info.components > max_components) - max_components = info.components; + /* If no error occurred while pre-checking, schedule the index updates for + this path. */ + if (!info.fs_err) + schedule_index_update(indices_updates, info.path, iterpool); - ++outstanding; - } APR_ARRAY_PUSH(ub->infos, struct unlock_info_t) = info; } rev_0_path = svn_fs_fs__path_rev_absolute(ub->fs, 0, pool); - for (i = max_components; i >= 0; --i) + /* Unlike the lock_body(), we need to delete locks *before* we start to + update indices. */ + + for (i = 0; i < ub->infos->nelts; ++i) { - const char *last_path = NULL; - apr_array_header_t *paths; - int j; + struct unlock_info_t *info = &APR_ARRAY_IDX(ub->infos, i, + struct unlock_info_t); svn_pool_clear(iterpool); - paths = apr_array_make(pool, 1, sizeof(const char *)); - for (j = 0; j < ub->infos->nelts; ++j) + if (! info->fs_err) { - struct unlock_info_t *info = &APR_ARRAY_IDX(ub->infos, j, - struct unlock_info_t); + SVN_ERR(delete_lock(ub->fs->path, info->path, iterpool)); + info->done = TRUE; + } + } - if (!info->fs_err && info->path) - { + for (hi = apr_hash_first(pool, indices_updates); hi; hi = apr_hash_next(hi)) + { + const char *path = apr_hash_this_key(hi); + apr_array_header_t *children = apr_hash_this_val(hi); - if (info->components == i) - { - SVN_ERR(delete_lock(ub->fs->path, info->path, iterpool)); - info->done = TRUE; - } - else if (info->components > i) - { - apr_size_t len = info->component - info->path; - - if (last_path - && strcmp(last_path, "/") - && (strncmp(last_path, info->path, len) - || strlen(last_path) != len)) - { - SVN_ERR(delete_from_digest(ub->fs->path, paths, last_path, - rev_0_path, iterpool)); - apr_array_clear(paths); - last_path = NULL; - } - APR_ARRAY_PUSH(paths, const char *) = info->path; - if (!last_path) - { - if (info->component > info->path) - last_path = apr_pstrndup(pool, info->path, len); - else - last_path = "/"; - } - - if (info->component > info->path) - { - --info->component; - while(info->component[0] != '/') - --info->component; - } - } - } - - if (last_path && j == ub->infos->nelts - 1) - SVN_ERR(delete_from_digest(ub->fs->path, paths, last_path, - rev_0_path, iterpool)); - } + svn_pool_clear(iterpool); + SVN_ERR(delete_from_digest(ub->fs->path, children, path, rev_0_path, + iterpool)); } + svn_pool_destroy(iterpool); return SVN_NO_ERROR; } @@ -1256,7 +1150,7 @@ svn_fs_fs__lock(svn_fs_t *fs, info->fs_err = svn_error_createf(SVN_ERR_FS_LOCK_OPERATION_FAILED, 0, _("Failed to lock '%s'"), info->path); - + cb_err = lock_callback(lock_baton, info->path, info->lock, info->fs_err, scratch_pool); }
Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/low_level.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/low_level.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/low_level.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/low_level.c Mon Feb 16 17:40:07 2015 @@ -499,7 +499,7 @@ svn_fs_fs__read_changes_incrementally(sv } while (change); svn_pool_destroy(iterpool); - + return SVN_NO_ERROR; } @@ -725,7 +725,7 @@ svn_fs_fs__parse_representation(represen /* initialize transaction info (never stored) */ svn_fs_fs__id_txn_reset(&rep->txn_id); - + /* while in transactions, it is legal to simply write "-1" */ str = svn_cstring_tokenize(" ", &string); if (str == NULL) @@ -998,7 +998,7 @@ format_digest(const unsigned char *diges svn_checksum_t checksum; checksum.digest = digest; checksum.kind = kind; - + if (is_null) return "(null)"; @@ -1174,7 +1174,7 @@ svn_fs_fs__write_rep_header(svn_fs_fs__r apr_pool_t *scratch_pool) { const char *text; - + switch (header->type) { case svn_fs_fs__rep_plain: Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/low_level.h URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/low_level.h?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/low_level.h (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/low_level.h Mon Feb 16 17:40:07 2015 @@ -44,7 +44,7 @@ * in *ROOT_OFFSET and the offset of the changed paths list in * *CHANGES_OFFSET. Offsets are relative to the revision's start offset. * ROOT_OFFSET and / or CHANGES_OFFSET may be NULL. - * + * * Note that REV is only used to construct nicer error objects. */ svn_error_t * @@ -66,7 +66,7 @@ svn_fs_fs__unparse_revision_trailer(apr_ * and return the start offsets of the index data in *L2P_OFFSET and * *P2L_OFFSET, respectively. Also, return the expected checksums in * in *L2P_CHECKSUM and *P2L_CHECKSUM. - * + * * Note that REV is only used to construct nicer error objects that * mention this revision. Allocate the checksums in RESULT_POOL. */ Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/pack.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/pack.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/pack.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/pack.c Mon Feb 16 17:40:07 2015 @@ -69,7 +69,7 @@ * each of the 4 buckets separately. The first three will simply order * their items by revision, starting with the newest once. Placing rep * and noderev items is a more elaborate process documented in the code. - * + * * In short, we store items in the following order: * - changed paths lists * - node property @@ -256,7 +256,7 @@ initialize_pack_context(pack_context_t * fs_fs_data_t *ffd = fs->fsap_data; const char *temp_dir; int max_revs = MIN(ffd->max_files_per_dir, max_items); - + SVN_ERR_ASSERT(ffd->format >= SVN_FS_FS__MIN_LOG_ADDRESSING_FORMAT); SVN_ERR_ASSERT(shard_rev % ffd->max_files_per_dir == 0); @@ -272,7 +272,7 @@ initialize_pack_context(pack_context_t * context->start_rev = shard_rev; context->end_rev = shard_rev; context->shard_end_rev = shard_rev + ffd->max_files_per_dir; - + /* Create the new directory and pack file. */ context->shard_dir = shard_dir; context->pack_file_dir = pack_file_dir; @@ -349,7 +349,7 @@ reset_pack_context(pack_context_t *conte SVN_ERR(svn_io_file_trunc(context->reps_file, 0, pool)); svn_pool_clear(context->info_pool); - + return SVN_NO_ERROR; } @@ -377,7 +377,7 @@ close_pack_context(pack_context_t *conte SVN_ERR(svn_fs_fs__add_index_data(context->fs, context->pack_file, proto_l2p_index_path, proto_p2l_index_path, - context->shard_rev, + context->shard_rev, pool)); /* remove proto index files */ @@ -402,7 +402,7 @@ copy_file_data(pack_context_t *context, /* most non-representation items will be small. Minimize the buffer * and infrastructure overhead in that case. */ enum { STACK_BUFFER_SIZE = 1024 }; - + if (size < STACK_BUFFER_SIZE) { /* copy small data using a fixed-size buffer on stack */ @@ -481,9 +481,9 @@ copy_item_to_temp(pack_context_t *contex SVN_ERR(svn_fs_fs__get_file_offset(&new_entry->offset, temp_file, pool)); APR_ARRAY_PUSH(entries, svn_fs_fs__p2l_entry_t *) = new_entry; - + SVN_ERR(copy_file_data(context, temp_file, rev_file, entry->size, pool)); - + return SVN_NO_ERROR; } @@ -1001,7 +1001,7 @@ sort_reps(pack_context_t *context) /* We now know the final ordering. */ for (i = 0; i < count; ++i) path_order[i] = temp[i]; - + svn_pool_destroy(temp_pool); } @@ -1290,7 +1290,7 @@ pack_range(pack_context_t *context, /* store the indirect array index */ APR_ARRAY_PUSH(context->rev_offsets, int) = context->reps->nelts; - + /* read the phys-to-log index file until we covered the whole rev file. * That index contains enough info to build both target indexes from it. */ while (offset < rev_file->l2p_offset) @@ -1391,7 +1391,7 @@ pack_range(pack_context_t *context, SVN_ERR(write_l2p_index(context, revpool)); svn_pool_destroy(revpool); - + return SVN_NO_ERROR; } @@ -1639,7 +1639,7 @@ svn_fs_fs__get_packed_offset(apr_off_t * /* Packing logic for physical addresssing mode: * Simply concatenate all revision contents. - * + * * Pack the revision shard starting at SHARD_REV containing exactly * MAX_FILES_PER_DIR revisions from SHARD_PATH into the PACK_FILE_DIR, * using POOL for allocations. CANCEL_FUNC and CANCEL_BATON are what you @@ -1756,7 +1756,7 @@ pack_rev_shard(svn_fs_t *fs, SVN_ERR(pack_phys_addressed(pack_file_dir, shard_path, shard_rev, max_files_per_dir, cancel_func, cancel_baton, pool)); - + SVN_ERR(svn_io_copy_perms(shard_path, pack_file_dir, pool)); SVN_ERR(svn_io_set_file_read_only(pack_file_path, FALSE, pool)); Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/recovery.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/recovery.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/recovery.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/recovery.c Mon Feb 16 17:40:07 2015 @@ -193,7 +193,7 @@ recover_find_max_ids(svn_fs_t *fs, "representation")); /* Now create a stream that's allowed to read only as much data as is - stored in the representation. Note that this is a directory, i.e. + stored in the representation. Note that this is a directory, i.e. represented using the hash format on disk and can never have 0 length. */ baton.pool = pool; baton.remaining = noderev->data_rep->expanded_size Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/rev_file.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/rev_file.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/rev_file.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/rev_file.c Mon Feb 16 17:40:07 2015 @@ -146,7 +146,7 @@ open_pack_or_rev_file(svn_fs_fs__revisio /* We may have to *temporarily* enable write access. */ err = writable ? auto_make_writable(path, result_pool, scratch_pool) - : SVN_NO_ERROR; + : SVN_NO_ERROR; /* open the revision file in buffered r/o or r/w mode */ if (!err) Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/revprops.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/revprops.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/revprops.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/revprops.c Mon Feb 16 17:40:07 2015 @@ -111,7 +111,7 @@ svn_fs_fs__upgrade_cleanup_pack_revprops apr_pool_t *iterpool = svn_pool_create(scratch_pool); const char *revsprops_dir = svn_dirent_join(fs->path, PATH_REVPROPS_DIR, scratch_pool); - + /* delete the non-packed revprops shards afterwards */ for (shard = 0; shard < first_unpacked_shard; ++shard) { Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/revprops.h URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/revprops.h?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/revprops.h (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/revprops.h Mon Feb 16 17:40:07 2015 @@ -23,12 +23,12 @@ #include "svn_fs.h" /* In the filesystem FS, pack all revprop shards up to min_unpacked_rev. - * + * * NOTE: Keep the old non-packed shards around until after the format bump. * Otherwise, re-running upgrade will drop the packed revprop shard but * have no unpacked data anymore. Call upgrade_cleanup_pack_revprops after * the bump. - * + * * NOTIFY_FUNC and NOTIFY_BATON as well as CANCEL_FUNC and CANCEL_BATON are * used in the usual way. Temporary allocations are done in SCRATCH_POOL. */ @@ -42,7 +42,7 @@ svn_fs_fs__upgrade_pack_revprops(svn_fs_ /* In the filesystem FS, remove all non-packed revprop shards up to * min_unpacked_rev. Temporary allocations are done in SCRATCH_POOL. - * + * * NOTIFY_FUNC and NOTIFY_BATON as well as CANCEL_FUNC and CANCEL_BATON are * used in the usual way. Cancellation is supported in the sense that we * will cleanly abort the operation. However, there will be remnant shards @@ -79,7 +79,7 @@ svn_fs_fs__set_revision_proplist(svn_fs_ /* Return TRUE, if for REVISION in FS, we can find the revprop pack file. * Use POOL for temporary allocations. - * Set *MISSING, if the reason is a missing manifest or pack file. + * Set *MISSING, if the reason is a missing manifest or pack file. */ svn_boolean_t svn_fs_fs__packed_revprop_available(svn_boolean_t *missing, Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/stats.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/stats.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/stats.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/stats.c Mon Feb 16 17:40:07 2015 @@ -300,7 +300,7 @@ add_change(svn_fs_fs__stats_t *stats, add_to_histogram(&stats->dir_prop_rep_histogram, rep_size); add_to_histogram(&stats->dir_prop_histogram, expanded_size); break; - case file_property_rep: + case file_property_rep: add_to_histogram(&stats->file_prop_rep_histogram, rep_size); add_to_histogram(&stats->file_prop_histogram, expanded_size); break; @@ -695,7 +695,7 @@ read_phys_revision(query_t *query, trailer = svn_stringbuf_ncreate(buf, len, scratch_pool); /* Parse that trailer. */ - SVN_ERR(svn_fs_fs__parse_revision_trailer(&root_node_offset, + SVN_ERR(svn_fs_fs__parse_revision_trailer(&root_node_offset, &changes_offset, trailer, info->revision)); SVN_ERR(get_phys_change_count(query, info, scratch_pool)); Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/transaction.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/transaction.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/transaction.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/transaction.c Mon Feb 16 17:40:07 2015 @@ -63,7 +63,7 @@ path_txn_sha1(svn_fs_t *fs, svn_checksum_t checksum; checksum.digest = sha1; checksum.kind = svn_checksum_sha1; - + return svn_dirent_join(svn_fs_fs__path_txn_dir(fs, txn_id, pool), svn_checksum_to_cstring(&checksum, pool), pool); @@ -465,7 +465,7 @@ get_writable_proto_rev(apr_file_t **file /* We don't want unused sections (such as leftovers from failed delta stream) in our file. If we use log addressing, we would need an - index entry for the unused section and that section would need to + index entry for the unused section and that section would need to be all NUL by convention. So, detect and fix those cases by truncating the protorev file. */ if (!err) @@ -973,7 +973,7 @@ get_and_increment_txn_key_body(void *bat /* remove trailing newlines */ line_length = svn__ui64tobase36(new_id_str, cb->txn_number+1); new_id_str[line_length] = '\n'; - + /* Increment the key and add a trailing \n to the string so the txn-current file has a newline in it. */ SVN_ERR(svn_io_write_atomic(txn_current_filename, new_id_str, @@ -1164,7 +1164,7 @@ set_txn_proplist(svn_fs_t *fs, SVN_ERR(svn_stream_close(stream)); /* Open the transaction properties file and write new contents to it. */ - SVN_ERR(svn_io_write_atomic((final + SVN_ERR(svn_io_write_atomic((final ? path_txn_props_final(fs, txn_id, pool) : path_txn_props(fs, txn_id, pool)), buf->data, buf->len, @@ -1270,7 +1270,7 @@ write_next_ids(svn_fs_t *fs, apr_file_t *file; char buffer[2 * SVN_INT64_BUFFER_SIZE + 2]; char *p = buffer; - + p += svn__ui64tobase36(p, node_id); *(p++) = ' '; p += svn__ui64tobase36(p, copy_id); @@ -3354,7 +3354,7 @@ svn_fs_fs__add_index_data(svn_fs_t *fs, pool, pool)); /* Append footer. */ - footer = svn_fs_fs__unparse_footer(l2p_offset, l2p_checksum, + footer = svn_fs_fs__unparse_footer(l2p_offset, l2p_checksum, p2l_offset, p2l_checksum, pool, pool); SVN_ERR(svn_io_file_write_full(file, footer->data, footer->len, NULL, pool)); Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/tree.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/tree.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/tree.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/tree.c Mon Feb 16 17:40:07 2015 @@ -90,7 +90,7 @@ typedef struct fs_txn_root_data_t { /* TXN_ID value from the main struct but as a struct instead of a string */ svn_fs_fs__id_part_t txn_id; - + /* Cache of txn DAG nodes (without their nested noderevs, because * it's mutable). Same keys/values as ffd->rev_node_cache. */ svn_cache__t *txn_node_cache; @@ -574,7 +574,7 @@ root_txn_id(svn_fs_root_t *root) { fs_txn_root_data_t *frd = root->fsap_data; assert(root->is_txn_root); - + return &frd->txn_id; } @@ -2095,7 +2095,7 @@ merge_changes(dag_node_t *ancestor_node, dag_node_t *txn_root_node; svn_fs_t *fs = txn->fs; const svn_fs_fs__id_part_t *txn_id = svn_fs_fs__txn_get_id(txn); - + SVN_ERR(svn_fs_fs__dag_txn_root(&txn_root_node, fs, txn_id, pool)); if (ancestor_node == NULL) @@ -2905,7 +2905,7 @@ window_consumer(svn_txdelta_window_t *wi cb->target_string. */ SVN_ERR(tb->interpreter(window, tb->interpreter_baton)); - /* Is the window NULL? If so, we're done. The stream has already been + /* Is the window NULL? If so, we're done. The stream has already been closed by the interpreter. */ if (! window) SVN_ERR(svn_fs_fs__dag_finalize_edits(tb->node, tb->result_checksum, Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/verify.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/verify.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/verify.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/verify.c Mon Feb 16 17:40:07 2015 @@ -204,7 +204,7 @@ verify_index_checksum(apr_file_t *file, const char *file_name; SVN_ERR(svn_io_file_name_get(&file_name, file, scratch_pool)); - SVN_ERR(svn_checksum_mismatch_err(expected, actual, scratch_pool, + SVN_ERR(svn_checksum_mismatch_err(expected, actual, scratch_pool, _("%s checksum mismatch in file %s"), name, file_name)); } @@ -476,7 +476,7 @@ expect_buffer_nul(apr_file_t *file, { const char *file_name; apr_off_t offset; - + SVN_ERR(svn_io_file_name_get(&file_name, file, pool)); SVN_ERR(svn_fs_fs__get_file_offset(&offset, file, pool)); offset -= size - i; @@ -793,7 +793,7 @@ verify_f7_metadata_consistency(svn_fs_t /* Check for external corruption to the indexes. */ err = verify_index_checksums(fs, pack_start, cancel_func, cancel_baton, iterpool); - + /* two-way index check */ if (!err) err = compare_l2p_to_p2l_index(fs, pack_start, pack_end - pack_start, Propchange: subversion/branches/move-tracking-2/subversion/libsvn_fs_x/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Mon Feb 16 17:40:07 2015 @@ -60,6 +60,7 @@ /subversion/branches/nfc-nfd-aware-client/subversion/libsvn_fs_x:870276,870376 /subversion/branches/node_pool/subversion/libsvn_fs_x:1304828-1305388 /subversion/branches/performance/subversion/libsvn_fs_x:979193,980118,981087,981090,981189,981194,981287,981684,981827,982043,982355,983398,983406,983430,983474,983488,983490,983760,983764,983766,983770,984927,984973,984984,985014,985037,985046,985472,985477,985482,985487-985488,985493,985497,985500,985514,985601,985603,985606,985669,985673,985695,985697,986453,986465,986485,986491-986492,986517,986521,986605,986608,986817,986832,987865,987868-987869,987872,987886-987888,987893,988319,988898,990330,990533,990535-990537,990541,990568,990572,990574-990575,990600,990759,992899,992904,992911,993127,993141,994956,995478,995507,995603,998012,998858,999098,1001413,1001417,1004291,1022668,1022670,1022676,1022715,1022719,1025660,1025672,1027193,1027203,1027206,1027214,1027227,1028077,1028092,1028094,1028104,1028107,1028111,1028354,1029038,1029042-1029043,1029054-1029055,1029062-1029063,1029078,1029080,1029090,1029092-1029093,1029111,1029151,1029158,1029229-1029230,1029232,1029335-1029336,102 9339-1029340,1029342,1029344,1030763,1030827,1031203,1031235,1032285,1032333,1033040,1033057,1033294,1035869,1035882,1039511,1043705,1053735,1056015,1066452,1067683,1067697-1078365 +/subversion/branches/pin-externals/subversion/libsvn_fs_x:1643757-1659392 /subversion/branches/py-tests-as-modules/subversion/libsvn_fs_x:956579-1033052 /subversion/branches/ra_serf-digest-authn/subversion/libsvn_fs_x:875693-876404 /subversion/branches/reintegrate-improvements/subversion/libsvn_fs_x:873853-874164 @@ -89,4 +90,4 @@ /subversion/branches/verify-keep-going/subversion/libsvn_fs_x:1439280-1492639,1546002-1546110 /subversion/branches/wc-collate-path/subversion/libsvn_fs_x:1402685-1480384 /subversion/trunk/subversion/libsvn_fs_fs:1415133-1596500,1596567,1597414,1597989,1598273,1599140,1600872,1601633,1603485-1603487,1603499,1603605,1604128,1604188,1604413-1604414,1604416-1604417,1604421,1604442,1604700,1604717,1604720,1604726,1604755,1604794,1604802,1604824,1604836,1604844,1604902-1604903,1604911,1604925,1604933,1604947,1605059-1605060,1605064-1605065,1605068,1605071-1605073,1605075,1605123,1605188-1605189,1605191,1605197,1605444,1605633,1606132,1606142,1606144,1606514,1606526,1606528,1606551,1606554,1606564,1606598-1606599,1606656,1606658,1606662,1606744,1606840,1607085,1607572,1612407,1612810,1613339,1613872,1614611,1615348,1615351-1615352,1615356,1616338-1616339,1616613,1617586,1617688,1618138,1618151,1618153,1618226,1618641,1618653,1618662,1619068,1619358,1619413,1619769,1619774,1620602,1620909,1620912,1620928,1620930,1621275,1621635,1622931,1622937,1622942,1622946,1622959-1622960,1622963,1622987,1623007,1623368,1623373,1623377,1623379,1623381,1623398,1623402,162 4011,1624265,1624512,1626246,1626871,1626873,1626886,1627497-1627498,1627502,1627947-1627949,1627966,1628083,1628093,1628158-1628159,1628161,1628392-1628393,1628415,1628427,1628676,1628738,1628762,1628764,1629854-1629855,1629857,1629865,1629873,1629875,1629879,1630067,1630070,1631049-1631051,1631075,1631115,1631171,1631180,1631185-1631186,1631196-1631197,1631239-1631240,1631548,1631550,1631563,1631567,1631588,1631598,1632646,1632776,1632849,1632851-1632853,1632856-1632857,1632868,1632908,1632926,1633232,1633617-1633618,1634872,1634875,1634879-1634880,1634920,1636478,1636483,1636629,1636644,1637184,1637186,1637330,1637358,1637363,1637393,1639319,1639322,1639335,1639348,1639352,1639355,1639358,1639414,1639419,1639426,1639430,1639436,1639440,1639549,1640061-1640062,1640197,1640915,1640966,1641013,1643139,1643233,1645567,1646021,1646712,1646716,1647537,1647540-1647541,1647820,1647905,1648230,1648238,1648241-1648243,1648253,1648272,1648532,1648537-1648539,1648542,1648591,1648612,1653608, 1658482 -/subversion/trunk/subversion/libsvn_fs_x:1414756-1509914,1606692-1658954 +/subversion/trunk/subversion/libsvn_fs_x:1414756-1509914,1606692-1660163 Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_x/cached_data.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_x/cached_data.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_fs_x/cached_data.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_fs_x/cached_data.c Mon Feb 16 17:40:07 2015 @@ -343,7 +343,7 @@ get_node_revision_body(svn_fs_x__noderev key.second = offset; SVN_ERR(svn_cache__get_partial((void **)noderev_p, &is_cached, - ffd->noderevs_container_cache, &key, + ffd->noderevs_container_cache, &key, svn_fs_x__noderevs_get_func, &sub_item, result_pool)); if (is_cached) @@ -500,7 +500,7 @@ typedef struct rep_state_t apr_uint32_t sub_item; apr_off_t current;/* The current offset relative to START. */ apr_off_t size; /* The on-disk size of the representation. */ - int ver; /* If a delta, what svndiff version? + int ver; /* If a delta, what svndiff version? -1 for unknown delta version. */ int chunk_index; /* number of the window to read */ } rep_state_t; @@ -982,7 +982,7 @@ typedef struct rep_read_baton_t /* The text we've been reading, if we're going to cache it. */ svn_stringbuf_t *current_fulltext; - /* If not NULL, attempt to read the data from this cache. + /* If not NULL, attempt to read the data from this cache. Once that lookup fails, reset it to NULL. */ svn_cache__t *fulltext_cache; @@ -1054,7 +1054,7 @@ get_cached_window_sizes_func(void **out, window_sizes_t *result = apr_palloc(pool, sizeof(*result)); result->packed_len = window->end_offset - window->start_offset; result->target_len = txdelta_window->tview_len; - + *out = result; return SVN_NO_ERROR; @@ -1741,7 +1741,7 @@ read_rep_header(svn_fs_x__rep_header_t * { svn_fs_x__data_t *ffd = fs->fsap_data; svn_boolean_t is_cached = FALSE; - + if (ffd->rep_header_cache) { SVN_ERR(svn_cache__get((void**)rep_header, &is_cached, @@ -1769,13 +1769,13 @@ svn_fs_x__get_representation_length(svn_ svn_fs_x__representation_cache_key_t key = { 0 }; rep_state_t rs = { 0 }; svn_fs_x__rep_header_t *rep_header; - + /* this function does not apply to representation containers */ SVN_ERR_ASSERT(entry->type >= SVN_FS_X__ITEM_TYPE_FILE_REP && entry->type <= SVN_FS_X__ITEM_TYPE_DIR_PROPS); SVN_ERR_ASSERT(entry->item_count == 1); - /* get / read the representation header */ + /* get / read the representation header */ key.revision = svn_fs_x__get_revnum(entry->items[0].change_set); key.is_packed = svn_fs_x__is_packed_rev(fs, key.revision); key.item_index = entry->items[0].number; @@ -1805,7 +1805,7 @@ get_contents_from_windows(rep_read_baton char *cur = buf; rep_state_t *rs; - /* Special case for when there are no delta reps, only a + /* Special case for when there are no delta reps, only a containered text. */ if (rb->rs_list->nelts == 0 && rb->buf == NULL) { @@ -2106,7 +2106,7 @@ rep_read_contents(void *baton, &rb->src_state, rb->fs, &rb->rep, rb->filehandle_pool, rb->scratch_pool)); - /* In case we did read from the fulltext cache before, make the + /* In case we did read from the fulltext cache before, make the * window stream catch up. Also, initialize the fulltext buffer * if we want to cache the fulltext at the end. */ SVN_ERR(skip_contents(rb, rb->fulltext_delivered)); Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_x/changes.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_x/changes.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_fs_x/changes.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_fs_x/changes.c Mon Feb 16 17:40:07 2015 @@ -187,7 +187,7 @@ svn_fs_x__changes_append_list(apr_size_t apr_array_header_t *list) { int i; - + /* CHANGES must be in 'builder' mode */ SVN_ERR_ASSERT(changes->builder); SVN_ERR_ASSERT(changes->paths == NULL); @@ -272,7 +272,7 @@ svn_fs_x__changes_get_list(apr_array_hea change->copyfrom_rev = binary_change->copyfrom_rev; change->copyfrom_known = TRUE; if (SVN_IS_VALID_REVNUM(binary_change->copyfrom_rev)) - change->copyfrom_path + change->copyfrom_path = svn_fs_x__string_table_get(changes->paths, binary_change->copyfrom_path, NULL, @@ -338,7 +338,7 @@ svn_fs_x__write_changes_container(svn_st /* write to disk */ SVN_ERR(svn_fs_x__write_string_table(stream, paths, scratch_pool)); SVN_ERR(svn_packed__data_write(stream, root, scratch_pool)); - + return SVN_NO_ERROR; } @@ -394,7 +394,7 @@ svn_fs_x__read_changes_container(svn_fs_ } *changes_p = changes; - + return SVN_NO_ERROR; } @@ -520,7 +520,7 @@ svn_fs_x__changes_get_list_func(void **o change->copyfrom_rev = binary_change->copyfrom_rev; change->copyfrom_known = TRUE; if (SVN_IS_VALID_REVNUM(binary_change->copyfrom_rev)) - change->copyfrom_path + change->copyfrom_path = svn_fs_x__string_table_get_func(paths, binary_change->copyfrom_path, NULL, Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_x/dag.h URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_x/dag.h?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_fs_x/dag.h (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_fs_x/dag.h Mon Feb 16 17:40:07 2015 @@ -209,7 +209,7 @@ svn_fs_x__dag_node_kind(dag_node_t *node If properties do not exist on NODE, *PROPLIST_P will be set to NULL. - Allocate the result in RESULT_POOL and use SCRATCH_POOL for temporaries. + Allocate the result in RESULT_POOL and use SCRATCH_POOL for temporaries. */ svn_error_t * svn_fs_x__dag_get_proplist(apr_hash_t **proplist_p, Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_x/fs.h URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_x/fs.h?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_fs_x/fs.h (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_fs_x/fs.h Mon Feb 16 17:40:07 2015 @@ -267,7 +267,7 @@ typedef struct svn_fs_x__data_t /* Rev / pack file granularity covered by phys-to-log index pages */ apr_int64_t p2l_page_size; - + /* The revision that was youngest, last time we checked. */ svn_revnum_t youngest_rev_cache; Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_x/fs_id.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_x/fs_id.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_fs_x/fs_id.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_fs_x/fs_id.c Mon Feb 16 17:40:07 2015 @@ -48,7 +48,7 @@ typedef struct fs_x__id_t /* The state machine behind this is as follows: - + (A) FS passed in during context construction still open and uses a different pool as the context (Usually the initial state). In that case, FS_PATH is NULL and we watch for either pool's cleanup. Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_x/fs_x.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_x/fs_x.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_fs_x/fs_x.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_fs_x/fs_x.c Mon Feb 16 17:40:07 2015 @@ -591,7 +591,7 @@ svn_fs_x__open(svn_fs_t *fs, fs, scratch_pool)); } -/* Baton type bridging svn_fs_x__upgrade and upgrade_body carrying +/* Baton type bridging svn_fs_x__upgrade and upgrade_body carrying * parameters over between them. */ typedef struct upgrade_baton_t { @@ -645,7 +645,7 @@ svn_fs_x__upgrade(svn_fs_t *fs, baton.notify_baton = notify_baton; baton.cancel_func = cancel_func; baton.cancel_baton = cancel_baton; - + return svn_fs_x__with_all_locks(fs, upgrade_body, (void *)&baton, scratch_pool); } @@ -799,7 +799,7 @@ svn_fs_x__file_checksum(svn_checksum_t * { svn_checksum_t temp; temp.kind = kind; - + switch(kind) { case svn_checksum_md5: Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_x/hotcopy.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_x/hotcopy.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_fs_x/hotcopy.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_fs_x/hotcopy.c Mon Feb 16 17:40:07 2015 @@ -366,7 +366,7 @@ hotcopy_copy_packed_shard(svn_boolean_t return SVN_NO_ERROR; } -/* Remove file PATH, if it exists - even if it is read-only. +/* Remove file PATH, if it exists - even if it is read-only. * Use SCRATCH_POOL for temporary allocations. */ static svn_error_t * hotcopy_remove_file(const char *path, @@ -683,7 +683,7 @@ hotcopy_revisions(svn_fs_t *src_fs, /* Copy the revprop file. */ SVN_ERR(hotcopy_copy_shard_file(&skipped, src_revprops_dir, dst_revprops_dir, - rev, max_files_per_dir, + rev, max_files_per_dir, iterpool)); /* Whenever this revision did not previously exist in the destination, Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_x/hotcopy.h URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_x/hotcopy.h?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_fs_x/hotcopy.h (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_fs_x/hotcopy.h Mon Feb 16 17:40:07 2015 @@ -40,7 +40,7 @@ svn_fs_x__hotcopy_prepare_target(svn_fs_ * not re-copy data which already exists in DST_FS. Indicate progress via * the optional NOTIFY_FUNC callback using NOTIFY_BATON. * Use SCRATCH_POOL for temporary allocations. */ -svn_error_t * +svn_error_t * svn_fs_x__hotcopy(svn_fs_t *src_fs, svn_fs_t *dst_fs, svn_boolean_t incremental, Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_x/index.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_x/index.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_fs_x/index.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_fs_x/index.c Mon Feb 16 17:40:07 2015 @@ -88,7 +88,7 @@ typedef struct l2p_page_table_entry_t /* Master run-time data structure of an log-to-phys index. It contains * the page tables of every revision covered by that index - but not the - * pages themselves. + * pages themselves. */ typedef struct l2p_header_t { @@ -732,7 +732,7 @@ stream_write_encoded(svn_stream_t *strea apr_uint64_t value) { unsigned char encoded[ENCODED_INT_LENGTH]; - + apr_size_t len = encode_uint(encoded, value); return svn_error_trace(svn_stream_write(stream, (char *)encoded, &len)); } @@ -813,7 +813,7 @@ encode_l2p_page(apr_array_header_t *entr int container_count = 0; apr_uint64_t last_offset = 0; int i; - + apr_size_t data_size = count * sizeof(l2p_page_entry_t); svn_stringbuf_t *container_offsets = svn_stringbuf_create_ensure(count * 2, scratch_pool); @@ -939,7 +939,7 @@ svn_fs_x__l2p_index_append(svn_checksum_ * The current implementation is limited to 2G entries per page. */ if (ffd->l2p_page_size > APR_INT32_MAX) return svn_error_createf(SVN_ERR_FS_INDEX_OVERFLOW , NULL, - _("L2P index page size %s" + _("L2P index page size %s" " exceeds current limit of 2G entries"), apr_psprintf(local_pool, "%" APR_UINT64_T_FMT, ffd->l2p_page_size)); @@ -1496,7 +1496,7 @@ get_l2p_page(l2p_page_t **page, container_offsets[i] = (apr_off_t)last_value - 1; /* '-1' is represented as '0' in the index file */ } - + /* read all page entries (offsets in rev file and container sub-items) */ for (i = 0; i < result->entry_count; ++i) { @@ -1544,14 +1544,14 @@ typedef struct l2p_page_baton_t /* offset within the cached page */ apr_uint32_t page_offset; - + /* out data */ /* absolute item or container offset in rev / pack file */ apr_off_t offset; /* 0 -> container / item itself; sub-item in container otherwise */ apr_uint32_t sub_item; - + } l2p_page_baton_t; /* Return the rev / pack file offset of the item at BATON->PAGE_OFFSET in @@ -1650,7 +1650,7 @@ l2p_page_table_access_func(void **out, /* set output as a courtesy to the caller */ *out = table_baton->pages; - + return SVN_NO_ERROR; } @@ -1931,7 +1931,7 @@ l2p_proto_index_lookup(apr_off_t *offset } SVN_ERR(svn_io_file_close(file, scratch_pool)); - + return SVN_NO_ERROR; } @@ -2451,7 +2451,7 @@ p2l_page_info_copy(p2l_page_info_baton_t const p2l_header_t *header, const apr_off_t *offsets) { - /* if the requested offset is out of bounds, return info for + /* if the requested offset is out of bounds, return info for * a zero-sized empty page right behind the last page. */ if (baton->offset / header->page_size < header->page_count) @@ -2533,7 +2533,7 @@ get_p2l_header(p2l_header_t **header, /* allocate result data structure */ result = apr_pcalloc(result_pool, sizeof(*result)); - + /* Read table sizes, check them for plausibility and allocate page array. */ SVN_ERR(packed_stream_get(&value, rev_file->p2l_stream)); result->first_revision = (svn_revnum_t)value; @@ -2870,7 +2870,7 @@ get_p2l_keys(p2l_page_info_baton_t *page apr_pool_t *scratch_pool) { p2l_page_info_baton_t page_info; - + /* request info for the index pages that describes the pack / rev file * contents at pack / rev file position OFFSET. */ page_info.offset = offset; @@ -2896,7 +2896,7 @@ get_p2l_keys(p2l_page_info_baton_t *page key.is_packed = svn_fs_x__is_packed_rev(fs, revision); key.page = page_info.page_no; - *key_p = key; + *key_p = key; } return SVN_NO_ERROR; @@ -3607,7 +3607,7 @@ compare_p2l_info_rev(const sub_item_orde { svn_fs_x__id_t *lhs_part; svn_fs_x__id_t *rhs_part; - + assert(lhs != rhs); if (lhs->entry->item_count == 0) return rhs->entry->item_count == 0 ? 0 : -1; @@ -3936,7 +3936,7 @@ svn_fs_x__serialize_p2l_page(void **data table_size); for (i = 0; i < page->nelts; ++i) - svn_temp_serializer__add_leaf(context, + svn_temp_serializer__add_leaf(context, (const void * const *)&entries[i].items, entries[i].item_count * sizeof(*entries[i].items)); Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_x/index.h URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_x/index.h?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_fs_x/index.h (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_fs_x/index.h Mon Feb 16 17:40:07 2015 @@ -61,7 +61,7 @@ typedef struct svn_fs_x__p2l_entry_t { /* offset of the first byte that belongs to the item */ apr_off_t offset; - + /* length of the item in bytes */ apr_off_t size; @@ -110,7 +110,7 @@ svn_fs_x__l2p_proto_index_add_revision(a * (OFFSET, SUB_ITEM) may be (-1, 0) to mark 'invalid' item indexes but * that is already implied for all item indexes not explicitly given a * mapping. - * + * * Use SCRATCH_POOL for temporary allocations. */ svn_error_t * @@ -123,7 +123,7 @@ svn_fs_x__l2p_proto_index_add_entry(apr_ /* Use the proto index file stored at PROTO_FILE_NAME, construct the final * log-to-phys index and append it to INDEX_FILE. The first revision will * be REVISION, entries to the next revision will be assigned to REVISION+1 - * and so forth. + * and so forth. * * Return the MD5 checksum of the on-disk index data in *CHECKSUM, allocated * in RESULT_POOL. Use SCRATCH_POOL for temporary allocations. Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_x/lock.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_x/lock.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_fs_x/lock.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_fs_x/lock.c Mon Feb 16 17:40:07 2015 @@ -370,7 +370,7 @@ set_lock(const char *fs_path, SVN_ERR(read_digest_file(&children, NULL, fs_path, digest_path, scratch_pool)); - SVN_ERR(write_digest_file(children, lock, fs_path, digest_path, + SVN_ERR(write_digest_file(children, lock, fs_path, digest_path, perms_reference, scratch_pool)); return SVN_NO_ERROR; @@ -422,7 +422,7 @@ add_to_digest(const char *fs_path, } if (apr_hash_count(children) != original_count) - SVN_ERR(write_digest_file(children, lock, fs_path, index_digest_path, + SVN_ERR(write_digest_file(children, lock, fs_path, index_digest_path, perms_reference, scratch_pool)); return SVN_NO_ERROR; @@ -457,7 +457,7 @@ delete_from_digest(const char *fs_path, } if (apr_hash_count(children) || lock) - SVN_ERR(write_digest_file(children, lock, fs_path, index_digest_path, + SVN_ERR(write_digest_file(children, lock, fs_path, index_digest_path, perms_reference, scratch_pool)); else SVN_ERR(svn_io_remove_file2(index_digest_path, TRUE, scratch_pool)); @@ -925,7 +925,7 @@ lock_body(void *baton, apr_pool_t *pool) index is inconsistent, svn_fs_x__allow_locked_operation will show locked on the file but unlocked on the parent. */ - + while (outstanding) { const char *last_path = NULL; @@ -1009,7 +1009,7 @@ lock_body(void *baton, apr_pool_t *pool) rev_0_path, iterpool)); } } - + return SVN_NO_ERROR; } @@ -1277,7 +1277,7 @@ svn_fs_x__lock(svn_fs_t *fs, info->fs_err = svn_error_createf(SVN_ERR_FS_LOCK_OPERATION_FAILED, 0, _("Failed to lock '%s'"), info->path); - + cb_err = lock_callback(lock_baton, info->path, info->lock, info->fs_err, scratch_pool); } Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_x/lock.h URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_x/lock.h?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_fs_x/lock.h (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_fs_x/lock.h Mon Feb 16 17:40:07 2015 @@ -60,7 +60,7 @@ svn_fs_x__unlock(svn_fs_t *fs, void *lock_baton, apr_pool_t *result_pool, apr_pool_t *scratch_pool); - + /* See svn_fs_get_lock(). */ svn_error_t * svn_fs_x__get_lock(svn_lock_t **lock, Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_x/low_level.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_x/low_level.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_fs_x/low_level.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_fs_x/low_level.c Mon Feb 16 17:40:07 2015 @@ -588,7 +588,7 @@ format_digest(const unsigned char *diges svn_checksum_t checksum; checksum.digest = digest; checksum.kind = kind; - + if (is_null) return "(null)"; @@ -754,7 +754,7 @@ svn_fs_x__write_rep_header(svn_fs_x__rep apr_pool_t *scratch_pool) { const char *text; - + switch (header->type) { case svn_fs_x__rep_self_delta: @@ -1004,7 +1004,7 @@ svn_fs_x__read_changes_incrementally(svn } while (change); svn_pool_destroy(iterpool); - + return SVN_NO_ERROR; } Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_x/low_level.h URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_x/low_level.h?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_fs_x/low_level.h (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_fs_x/low_level.h Mon Feb 16 17:40:07 2015 @@ -49,7 +49,7 @@ extern "C" { * and return the start offsets of the index data in *L2P_OFFSET and * *P2L_OFFSET, respectively. Also, return the expected checksums in * in *L2P_CHECKSUM and *P2L_CHECKSUM. - * + * * Note that REV is only used to construct nicer error objects that * mention this revision. Allocate the checksums in RESULT_POOL. */ @@ -160,7 +160,7 @@ svn_fs_x__read_rep_header(svn_fs_x__rep_ apr_pool_t *result_pool, apr_pool_t *scratch_pool); -/* Write the representation HEADER to STREAM. +/* Write the representation HEADER to STREAM. * Use SCRATCH_POOL for allocations. */ svn_error_t * svn_fs_x__write_rep_header(svn_fs_x__rep_header_t *header, Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_x/noderevs.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_x/noderevs.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_fs_x/noderevs.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_fs_x/noderevs.c Mon Feb 16 17:40:07 2015 @@ -50,7 +50,7 @@ #define NODEREV_HAS_CPATH 0x00040 /* Our internal representation of a svn_fs_x__noderev_t. - * + * * We will store path strings in a string container and reference them * from here. Similarly, IDs and representations are being stored in * separate containers and then also referenced here. This eliminates @@ -274,7 +274,7 @@ svn_fs_x__noderevs_add(svn_fs_x__noderev 0); binary_noderev.mergeinfo_count = noderev->mergeinfo_count; - + APR_ARRAY_PUSH(container->noderevs, binary_noderev_t) = binary_noderev; return container->noderevs->nelts - 1; @@ -574,7 +574,7 @@ svn_fs_x__write_noderevs_container(svn_s /* write to disk */ SVN_ERR(svn_fs_x__write_string_table(stream, paths, scratch_pool)); SVN_ERR(svn_packed__data_write(stream, root, scratch_pool)); - + return SVN_NO_ERROR; } @@ -724,7 +724,7 @@ svn_fs_x__read_noderevs_container(svn_fs } *container = noderevs; - + return SVN_NO_ERROR; } @@ -905,7 +905,7 @@ svn_fs_x__mergeinfo_count_get_func(void /* Resolve all container pointers */ resolve_apr_array_header(&noderevs, container, &container->noderevs); binary_noderev = &APR_ARRAY_IDX(&noderevs, idx, binary_noderev_t); - + *(apr_int64_t *)out = binary_noderev->mergeinfo_count; return SVN_NO_ERROR; Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_x/pack.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_x/pack.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_fs_x/pack.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_fs_x/pack.c Mon Feb 16 17:40:07 2015 @@ -70,7 +70,7 @@ * each of the 4 buckets separately. The first three will simply order * their items by revision, starting with the newest once. Placing rep * and noderev items is a more elaborate process documented in the code. - * + * * In short, we store items in the following order: * - changed paths lists * - node property @@ -269,7 +269,7 @@ initialize_pack_context(pack_context_t * context->start_rev = shard_rev; context->end_rev = shard_rev; context->shard_end_rev = shard_rev + ffd->max_files_per_dir; - + /* Create the new directory and pack file. */ context->shard_dir = shard_dir; context->pack_file_dir = pack_file_dir; @@ -346,7 +346,7 @@ reset_pack_context(pack_context_t *conte SVN_ERR(svn_io_file_trunc(context->reps_file, 0, scratch_pool)); svn_pool_clear(context->info_pool); - + return SVN_NO_ERROR; } @@ -375,7 +375,7 @@ close_pack_context(pack_context_t *conte SVN_ERR(svn_fs_x__add_index_data(context->fs, context->pack_file, proto_l2p_index_path, proto_p2l_index_path, - context->shard_rev, + context->shard_rev, scratch_pool)); /* remove proto index files */ @@ -401,7 +401,7 @@ copy_file_data(pack_context_t *context, /* most non-representation items will be small. Minimize the buffer * and infrastructure overhead in that case. */ enum { STACK_BUFFER_SIZE = 1024 }; - + if (size < STACK_BUFFER_SIZE) { /* copy small data using a fixed-size buffer on stack */ @@ -484,10 +484,10 @@ copy_item_to_temp(pack_context_t *contex SVN_ERR(svn_fs_x__get_file_offset(&new_entry->offset, temp_file, scratch_pool)); APR_ARRAY_PUSH(entries, svn_fs_x__p2l_entry_t *) = new_entry; - + SVN_ERR(copy_file_data(context, temp_file, rev_file->file, entry->size, scratch_pool)); - + return SVN_NO_ERROR; } @@ -749,7 +749,7 @@ compare_p2l_info(const svn_fs_x__p2l_ent return (*lhs)->item_count == 0 ? 0 : -1; if ((*lhs)->item_count == 0) return 1; - + if ((*lhs)->items[0].change_set == (*rhs)->items[0].change_set) return (*lhs)->items[0].number > (*rhs)->items[0].number ? -1 : 1; @@ -842,7 +842,7 @@ auto_pad_block(pack_context_t *context, apr_pool_t *scratch_pool) { svn_fs_x__data_t *ffd = context->fs->fsap_data; - + /* This is the maximum number of bytes "wasted" that way per block. * Larger items will cross the block boundaries. */ const apr_off_t max_padding = MAX(ffd->block_size / 50, 512); @@ -873,7 +873,7 @@ auto_pad_block(pack_context_t *context, return SVN_NO_ERROR; } -/* Return the index of the first entry in CONTEXT->REFERENCES that +/* Return the index of the first entry in CONTEXT->REFERENCES that * references ITEM->ITEMS[0] if such entries exist. All matching items * will be consecutive. */ @@ -886,7 +886,7 @@ find_first_reference(pack_context_t *con while (lower <= upper) { - int current = lower + (upper - lower) / 2; + int current = lower + (upper - lower) / 2; reference_t *reference = APR_ARRAY_IDX(context->references, current, reference_t *); @@ -1005,7 +1005,7 @@ reps_fit_into_containers(apr_array_heade return TRUE; } -/* Write the *CONTAINER containing the noderevs described by the +/* Write the *CONTAINER containing the noderevs described by the * svn_fs_x__p2l_entry_t * in ITEMS to the pack file on CONTEXT. * Append a P2L entry for the container to CONTAINER->REPS. * Afterwards, clear ITEMS and re-allocate *CONTAINER in CONTAINER_POOL @@ -1072,8 +1072,8 @@ write_nodes_container(pack_context_t *co * from TEMP_FILE and add them to *CONTAINER and NODES_IN_CONTAINER. * Whenever the container grows bigger than the current block in CONTEXT, * write the data to disk and continue in the next block. - * - * Use CONTAINER_POOL to re-allocate the *CONTAINER as necessary and + * + * Use CONTAINER_POOL to re-allocate the *CONTAINER as necessary and * SCRATCH_POOL to temporary allocations. */ static svn_error_t * @@ -1430,7 +1430,7 @@ copy_reps_from_temp(pack_context_t *cont nodes_in_container, container_pool, iterpool)); /* actually flush the noderevs to disk if the reps container is likely - * to fill the block, i.e. no further noderevs will be added to the + * to fill the block, i.e. no further noderevs will be added to the * nodes container. */ if (should_flush_nodes_container(context, nodes_container, node_parts)) SVN_ERR(write_nodes_container(context, &nodes_container, @@ -1730,7 +1730,7 @@ pack_range(pack_context_t *context, /* store the indirect array index */ APR_ARRAY_PUSH(context->rev_offsets, int) = context->reps->nelts; - + /* read the phys-to-log index file until we covered the whole rev file. * That index contains enough info to build both target indexes from it. */ while (offset < rev_file->l2p_offset) @@ -1826,7 +1826,7 @@ pack_range(pack_context_t *context, SVN_ERR(write_l2p_index(context, revpool)); svn_pool_destroy(revpool); - + return SVN_NO_ERROR; } Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_x/reps.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_x/reps.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_fs_x/reps.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_fs_x/reps.c Mon Feb 16 17:40:07 2015 @@ -34,7 +34,7 @@ /* Length of the text chunks we hash and match. The algorithm will find * most matches with a length of 2 * MATCH_BLOCKSIZE and only specific * ones that are shorter than MATCH_BLOCKSIZE. - * + * * This should be a power of two and must be a multiple of 8. * Good choices are 32, 64 and 128. */ @@ -55,7 +55,7 @@ /* Byte strings are described by a series of copy instructions that each * do one of the following - * + * * - copy a given number of bytes from the text corpus starting at a * given offset * - reference other instruction and specify how many of instructions of @@ -244,7 +244,7 @@ struct svn_fs_x__rep_extractor_t /* bases (base_t) yet to process (not used ATM) */ apr_array_header_t *bases; - + /* missing sections (missing_t) in result->data that need to be filled, * yet */ apr_array_header_t *missing; @@ -627,7 +627,7 @@ get_text(svn_fs_x__rep_extractor_t *extr missing.count = instruction->count; missing.offset = instruction->offset; svn_stringbuf_appendfill(extractor->result, 0, instruction->count); - + if (extractor->missing == NULL) extractor->missing = apr_array_make(extractor->pool, 1, sizeof(missing)); @@ -723,7 +723,7 @@ svn_fs_x__write_reps_container(svn_strea svn_packed__create_int_substream(instructions_stream, TRUE, TRUE); svn_packed__create_int_substream(instructions_stream, FALSE, FALSE); - + /* text */ svn_packed__add_bytes(text_stream, builder->text->data, builder->text->len); @@ -760,7 +760,7 @@ svn_fs_x__write_reps_container(svn_strea /* write to stream */ SVN_ERR(svn_packed__data_write(stream, root, scratch_pool)); - + return SVN_NO_ERROR; } @@ -787,7 +787,7 @@ svn_fs_x__read_reps_container(svn_fs_x__ /* read from disk */ SVN_ERR(svn_packed__data_read(&root, stream, result_pool, scratch_pool)); - + bases_stream = svn_packed__first_int_stream(root); reps_stream = svn_packed__next_int_stream(bases_stream); instructions_stream = svn_packed__next_int_stream(reps_stream); @@ -848,7 +848,7 @@ svn_fs_x__read_reps_container(svn_fs_x__ /* return result */ *container = reps; - + return SVN_NO_ERROR; } @@ -924,7 +924,7 @@ svn_fs_x__reps_get_func(void **out, apr_pool_t *pool) { svn_fs_x__reps_baton_t *reps_baton = baton; - + /* get a usable reps structure */ const svn_fs_x__reps_t *cached = data; svn_fs_x__reps_t *reps = apr_pmemdup(pool, cached, sizeof(*reps)); Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_x/rev_file.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_x/rev_file.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_fs_x/rev_file.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_fs_x/rev_file.c Mon Feb 16 17:40:07 2015 @@ -162,7 +162,7 @@ open_pack_or_rev_file(svn_fs_x__revision /* We may have to *temporarily* enable write access. */ err = writable ? auto_make_writable(path, result_pool, scratch_pool) - : SVN_NO_ERROR; + : SVN_NO_ERROR; /* open the revision file in buffered r/o or r/w mode */ if (!err) Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_x/revprops.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_x/revprops.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_fs_x/revprops.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_fs_x/revprops.c Mon Feb 16 17:40:07 2015 @@ -122,7 +122,7 @@ svn_fs_x__upgrade_cleanup_pack_revprops( apr_pool_t *iterpool = svn_pool_create(scratch_pool); const char *revsprops_dir = svn_dirent_join(fs->path, PATH_REVPROPS_DIR, scratch_pool); - + /* delete the non-packed revprops shards afterwards */ for (shard = 0; shard < first_unpacked_shard; ++shard) { @@ -660,7 +660,7 @@ typedef struct packed_revprops_t * our file system, the revprops belong to REVISION and the global revprop * GENERATION is used as well. * - * The returned hash will be allocated in RESULT_POOL, SCRATCH_POOL is + * The returned hash will be allocated in RESULT_POOL, SCRATCH_POOL is * being used for temporary allocations. */ static svn_error_t * @@ -942,7 +942,7 @@ parse_packed_revprops(svn_fs_t *fs, if (read_all) { /* Init / construct REVPROPS members. */ - revprops->sizes = apr_array_make(result_pool, (int)count, + revprops->sizes = apr_array_make(result_pool, (int)count, sizeof(offset)); revprops->offsets = apr_array_make(result_pool, (int)count, sizeof(offset)); Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_x/revprops.h URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_x/revprops.h?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_fs_x/revprops.h (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_fs_x/revprops.h Mon Feb 16 17:40:07 2015 @@ -40,12 +40,12 @@ svn_fs_x__reset_revprop_generation_file( apr_pool_t *scratch_pool); /* In the filesystem FS, pack all revprop shards up to min_unpacked_rev. - * + * * NOTE: Keep the old non-packed shards around until after the format bump. * Otherwise, re-running upgrade will drop the packed revprop shard but * have no unpacked data anymore. Call upgrade_cleanup_pack_revprops after * the bump. - * + * * NOTIFY_FUNC and NOTIFY_BATON as well as CANCEL_FUNC and CANCEL_BATON are * used in the usual way. Temporary allocations are done in SCRATCH_POOL. */ @@ -59,7 +59,7 @@ svn_fs_x__upgrade_pack_revprops(svn_fs_t /* In the filesystem FS, remove all non-packed revprop shards up to * min_unpacked_rev. Temporary allocations are done in SCRATCH_POOL. - * + * * NOTIFY_FUNC and NOTIFY_BATON as well as CANCEL_FUNC and CANCEL_BATON are * used in the usual way. Cancellation is supported in the sense that we * will cleanly abort the operation. However, there will be remnant shards @@ -100,7 +100,7 @@ svn_fs_x__set_revision_proplist(svn_fs_t /* Return TRUE, if for REVISION in FS, we can find the revprop pack file. * Use SCRATCH_POOL for temporary allocations. - * Set *MISSING, if the reason is a missing manifest or pack file. + * Set *MISSING, if the reason is a missing manifest or pack file. */ svn_boolean_t svn_fs_x__packed_revprop_available(svn_boolean_t *missing, Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_x/string_table.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_x/string_table.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_fs_x/string_table.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_fs_x/string_table.c Mon Feb 16 17:40:07 2015 @@ -128,7 +128,7 @@ svn_fs_x__string_table_builder_create(ap result->tables = apr_array_make(result_pool, 1, sizeof(builder_table_t *)); add_table(result); - + return result; } @@ -146,7 +146,7 @@ balance(builder_table_t *table, node->left->right = node; *parent = node->left; node->left = temp; - + --left_height; } else if (left_height + 1 < right_height) @@ -370,7 +370,7 @@ svn_fs_x__string_table_builder_estimate_ /* ZIP compression should give us a 50% reduction. * add some static overhead */ return 200 + total / 2; - + } static void @@ -456,7 +456,7 @@ svn_fs_x__string_table_create(const stri apr_pool_t *pool) { apr_size_t i; - + string_table_t *result = apr_pcalloc(pool, sizeof(*result)); result->size = (apr_size_t)builder->tables->nelts; result->sub_tables @@ -610,7 +610,7 @@ svn_fs_x__write_string_table(svn_stream_ svn_packed__add_uint(table_sizes, table->size); /* all short-string char data sizes */ - + for (i = 0; i < table->size; ++i) svn_packed__add_uint(table_sizes, table->sub_tables[i].short_string_count); @@ -660,7 +660,7 @@ svn_fs_x__read_string_table(string_table apr_size_t i, k; string_table_t *table = apr_palloc(result_pool, sizeof(*table)); - + svn_packed__data_root_t *root; svn_packed__int_stream_t *table_sizes; svn_packed__byte_stream_t *large_strings; @@ -787,7 +787,7 @@ svn_fs_x__serialize_string_table(svn_tem (const void * const *)&string->data, string->len + 1); } - + svn_temp_serializer__pop(context); } @@ -802,7 +802,7 @@ svn_fs_x__deserialize_string_table(void { apr_size_t i, k; string_sub_table_t *sub_tables; - + svn_temp_deserializer__resolve(buffer, (void **)table); if (*table == NULL) return; Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_x/string_table.h URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_x/string_table.h?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_fs_x/string_table.h (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_fs_x/string_table.h Mon Feb 16 17:40:07 2015 @@ -32,7 +32,7 @@ extern "C" { /* A string table is a very space efficient, read-only representation for * a set of strings with high degreed of prefix and postfix overhead. - * + * * Creating a string table is a two-stage process: Use a builder class, * stuff all the strings in there and let it then do the heavy lifting of * classification and compression to create the actual string table object. @@ -101,7 +101,7 @@ svn_error_t * svn_fs_x__read_string_table(string_table_t **table_p, svn_stream_t *stream, apr_pool_t *result_pool, - apr_pool_t *scratch_pool); + apr_pool_t *scratch_pool); /* Serialize string table *ST within the serialization CONTEXT. */
