Hi Stefan. Just a typo I noticed as I was looking through this code...
> Sent: Monday, 2 December 2013, 14:55
> Subject: svn commit: r1547045 [2/4] ...
[...]
> Modified: subversion/trunk/subversion/libsvn_fs_fs/pack.c
> ==============================================================================
[...]
> +typedef struct pack_context_t
> +{
> + /* file system that we operate on */
> + svn_fs_t *fs;
> +
> + /* cancel function to invoke at regular intervals. May be NULL */
> + svn_cancel_func_t cancel_func;
> +
> + /* baton to pass to CANCEL_FUNC */
> + void *cancel_baton;
> +
> + /* first revision in the shard (and future pack file) */
> + svn_revnum_t shard_rev;
> +
> + /* first revision in the range to process (>= SHARD_REV) */
> + svn_revnum_t start_rev;
> +
> + /* first revision after the range to process (<= SHARD_END_REV) */
> + svn_revnum_t end_rev;
> +
> + /* first revision after the current shard */
> + svn_revnum_t shard_end_rev;
> +
> + /* log-to-phys proto index for the whole pack file */
> + apr_file_t *proto_l2p_index;
> +
> + /* phys-to-log proto index for the whole pack file */
> + apr_file_t *proto_p2l_index;
> +
> + /* full shard directory path (containing the unpacked revisions) */
> + const char *shard_dir;
> +
> + /* full packed shard directory path (containing the pack file + indexes) */
> + const char *pack_file_dir;
> +
> + /* full pack file path (including PACK_FILE_DIR) */
> + const char *pack_file_path;
> +
> + /* current write position (i.e. file length) in the pack file */
> + apr_off_t pack_offset;
> +
> + /* the pack file to ultimately write all data to */
> + apr_file_t *pack_file;
> +
> + /* array of svn_fs_fs__p2l_entry_t *, all referring to change lists.
> + * Will be filled in phase 2 and be cleared after each revision range. */
> + apr_array_header_t *changes;
> +
> + /* temp file receiving all change list items (referenced by CHANGES).
> + * Will be filled in phase 2 and be cleared after each revision range. */
> + apr_file_t *changes_file;
> +
> + /* array of svn_fs_fs__p2l_entry_t *, all referring to file properties.
> + * Will be filled in phase 2 and be cleared after each revision range. */
> + apr_array_header_t *file_props;
> +
> + /* temp file receiving all file prop items (referenced by FILE_PROPS).
> + * Will be filled in phase 2 and be cleared after each revision range.*/
> + apr_file_t *file_props_file;
> +
> + /* array of svn_fs_fs__p2l_entry_t *, all referring to directory properties.
> + * Will be filled in phase 2 and be cleared after each revision range. */
> + apr_array_header_t *dir_props;
> +
> + /* temp file receiving all directory prop items (referenced by DIR_PROPS).
> + * Will be filled in phase 2 and be cleared after each revision range.*/
> + apr_file_t *dir_props_file;
> +
> + /* container for all PATH members in PATH_ORDER. */
> + svn_prefix_tree__t *paths;
> +
> + /* array of path_order_t *. Will be filled in phase 2 and be cleared
> + * after each revision range. Sorted by PATH, NODE_ID. */
> + apr_array_header_t *path_order;
> +
> + /* array of reference_t *. Will be filled in phase 2 and be cleared
> + * after each revision range. It will be sorted by the TO members. */
> + apr_array_header_t *references;
> +
> + /* array of svn_fs_fs__p2l_entry_t*. Will be filled in phase 2 and be
> + * cleared after each revision range. During phase 3, we will set items
> + * to NULL that we already processed. */
> + apr_array_header_t *reps;
> +
> + /* array of int, marking for each revision, the which offset their items
> + * begin in REPS. Will be filled in phase 2 and be cleared after
> + * each revision range. */
> + apr_array_header_t *rev_offsets;
> +
> + /* temp file receiving all items referenced by REPS_INFOS.
Here: REPS_INFOS is not mentioned anywhere else, except one further reference below...
> + * Will be filled in phase 2 and be cleared after each revision range.*/
> + apr_file_t *reps_file;
> +
> + /* pool used for temporary data structures that will be cleaned up when
> + * the next range of revisions is being processed */
> + apr_pool_t *info_pool;
> +} pack_context_t;
>
[...]
> +/* Return the offset within CONTEXT->REPS_INFOS that corresponds to item
... here.
> + * ITEM_INDEX in REVISION.
> + */
> +static int
> +get_item_array_index(pack_context_t *context,
> + svn_revnum_t revision,
> + apr_int64_t item_index)
> +{
> + assert(revision >= context->start_rev);
> + return (int)item_index + APR_ARRAY_IDX(context->rev_offsets,
> + revision - context->start_rev,
> + int);
> +}
- Julian
Received on 2014-02-20 14:21:19 CET