You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2012/07/11 12:26:26 UTC
svn commit: r1360103 [3/18] - in /subversion/branches/ev2-export: ./ build/
build/ac-macros/ build/generator/ build/generator/templates/ build/win32/
contrib/server-side/ notes/wc-ng/ subversion/bindings/javahl/native/
subversion/bindings/javahl/src/or...
Modified: subversion/branches/ev2-export/subversion/libsvn_client/repos_diff.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_client/repos_diff.c?rev=1360103&r1=1360102&r2=1360103&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_client/repos_diff.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_client/repos_diff.c Wed Jul 11 10:26:19 2012
@@ -143,12 +143,12 @@ struct dir_baton {
/* A cache of any property changes (svn_prop_t) received for this dir. */
apr_array_header_t *propchanges;
- /* The pristine-property list attached to this directory. */
- apr_hash_t *pristine_props;
-
/* The pool passed in by add_dir, open_dir, or open_root.
Also, the pool this dir baton is allocated in. */
apr_pool_t *pool;
+
+ /* Base revision of directory. */
+ svn_revnum_t base_revision;
};
/* File level baton.
@@ -216,6 +216,7 @@ make_dir_baton(const char *path,
struct dir_baton *parent_baton,
struct edit_baton *edit_baton,
svn_boolean_t added,
+ svn_revnum_t base_revision,
apr_pool_t *pool)
{
apr_pool_t *dir_pool = svn_pool_create(pool);
@@ -230,6 +231,7 @@ make_dir_baton(const char *path,
dir_baton->pool = dir_pool;
dir_baton->path = apr_pstrdup(dir_pool, path);
dir_baton->propchanges = apr_array_make(pool, 1, sizeof(svn_prop_t));
+ dir_baton->base_revision = base_revision;
return dir_baton;
}
@@ -360,14 +362,13 @@ get_file_from_ra(struct file_baton *b,
corresponding property in PRISTINE_PROPS.
Issue #3657 'dav update report handler in skelta mode can cause
- spurious conflicts'. When communicating with the repository via ra_serf
- and ra_neon, the change_dir_prop and change_file_prop svn_delta_editor_t
+ spurious conflicts'. When communicating with the repository via ra_serf,
+ the change_dir_prop and change_file_prop svn_delta_editor_t
callbacks are called (obviously) when a directory or file property has
changed between the start and end of the edit. Less obvious however,
is that these callbacks may be made describing *all* of the properties
on FILE_BATON->PATH when using the DAV providers, not just the change(s).
- (Specifically ra_neon does this for diff/merge and ra_serf does it
- for diff/merge/update/switch).
+ (Specifically ra_serf does it for diff/merge/update/switch).
This means that the change_[file|dir]_prop svn_delta_editor_t callbacks
may be made where there are no property changes (i.e. a noop change of
@@ -460,10 +461,8 @@ open_root(void *edit_baton,
void **root_baton)
{
struct edit_baton *eb = edit_baton;
- struct dir_baton *b = make_dir_baton("", NULL, eb, FALSE, pool);
-
- SVN_ERR(svn_ra_get_dir2(eb->ra_session, NULL, NULL, &b->pristine_props,
- b->path, base_revision, 0, pool));
+ struct dir_baton *b = make_dir_baton("", NULL, eb, FALSE, base_revision,
+ pool);
*root_baton = b;
return SVN_NO_ERROR;
@@ -660,8 +659,7 @@ add_directory(const char *path,
/* ### TODO: support copyfrom? */
- b = make_dir_baton(path, pb, eb, TRUE, pool);
- b->pristine_props = eb->empty_hash;
+ b = make_dir_baton(path, pb, eb, TRUE, SVN_INVALID_REVNUM, pool);
*child_baton = b;
/* Skip *everything* within a newly tree-conflicted directory,
@@ -746,7 +744,8 @@ open_directory(const char *path,
struct edit_baton *eb = pb->edit_baton;
struct dir_baton *b;
- b = make_dir_baton(path, pb, pb->edit_baton, FALSE, pool);
+ b = make_dir_baton(path, pb, pb->edit_baton, FALSE, base_revision, pool);
+
*child_baton = b;
/* Skip *everything* within a newly tree-conflicted directory
@@ -757,9 +756,6 @@ open_directory(const char *path,
return SVN_NO_ERROR;
}
- SVN_ERR(svn_ra_get_dir2(eb->ra_session, NULL, NULL, &b->pristine_props,
- b->path, base_revision, 0, pool));
-
SVN_ERR(eb->diff_callbacks->dir_opened(
&b->tree_conflicted, &b->skip,
&b->skip_children, b->path, base_revision,
@@ -1092,6 +1088,7 @@ close_directory(void *dir_baton,
svn_wc_notify_state_t prop_state = svn_wc_notify_state_unknown;
svn_boolean_t skipped = FALSE;
apr_pool_t *scratch_pool;
+ apr_hash_t *pristine_props;
/* Skip *everything* within a newly tree-conflicted directory. */
if (b->skip)
@@ -1102,17 +1099,28 @@ close_directory(void *dir_baton,
scratch_pool = b->pool;
- if (!b->added && b->propchanges->nelts > 0)
- remove_non_prop_changes(b->pristine_props, b->propchanges);
+ if (b->added)
+ {
+ pristine_props = eb->empty_hash;
+ }
+ else
+ {
+ SVN_ERR(svn_ra_get_dir2(eb->ra_session, NULL, NULL, &pristine_props,
+ b->path, b->base_revision, 0, scratch_pool));
+ }
+
+ if (b->propchanges->nelts > 0)
+ {
+ remove_non_prop_changes(pristine_props, b->propchanges);
+ }
- /* Report any prop changes. */
if (b->propchanges->nelts > 0)
{
svn_boolean_t tree_conflicted = FALSE;
SVN_ERR(eb->diff_callbacks->dir_props_changed(
&prop_state, &tree_conflicted,
b->path, b->added,
- b->propchanges, b->pristine_props,
+ b->propchanges, pristine_props,
b->edit_baton->diff_cmd_baton, scratch_pool));
if (tree_conflicted)
b->tree_conflicted = TRUE;
Modified: subversion/branches/ev2-export/subversion/libsvn_client/switch.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_client/switch.c?rev=1360103&r1=1360102&r2=1360103&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_client/switch.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_client/switch.c Wed Jul 11 10:26:19 2012
@@ -199,7 +199,7 @@ switch_internal(svn_revnum_t *result_rev
svn_client__pathrev_t *target_base_loc, *yca;
SVN_ERR(svn_client__wc_node_get_base(&target_base_loc, local_abspath,
- ctx, pool, pool));
+ ctx->wc_ctx, pool, pool));
if (!target_base_loc)
yca = NULL; /* Not versioned */
@@ -218,7 +218,6 @@ switch_internal(svn_revnum_t *result_rev
svn_dirent_dirname(local_abspath, pool));
}
-
SVN_ERR(svn_ra_reparent(ra_session, anchor_url, pool));
/* Fetch the switch (update) editor. If REVISION is invalid, that's
Modified: subversion/branches/ev2-export/subversion/libsvn_client/update.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_client/update.c?rev=1360103&r1=1360102&r2=1360103&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_client/update.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_client/update.c Wed Jul 11 10:26:19 2012
@@ -222,7 +222,7 @@ update_internal(svn_revnum_t *result_rev
/* Check if our anchor exists in BASE. If it doesn't we can't update. */
SVN_ERR(svn_client__wc_node_get_base(&anchor_loc, anchor_abspath,
- ctx, pool, pool));
+ ctx->wc_ctx, pool, pool));
/* It does not make sense to update conflict victims. */
err = svn_wc_conflicted_p3(&text_conflicted, &prop_conflicted,
@@ -562,7 +562,7 @@ svn_client_update4(apr_array_header_t **
apr_pool_t *pool)
{
int i;
- apr_pool_t *subpool = svn_pool_create(pool);
+ apr_pool_t *iterpool = svn_pool_create(pool);
const char *path = NULL;
svn_boolean_t sleep = FALSE;
@@ -585,12 +585,12 @@ svn_client_update4(apr_array_header_t **
const char *local_abspath;
path = APR_ARRAY_IDX(paths, i, const char *);
- svn_pool_clear(subpool);
+ svn_pool_clear(iterpool);
if (ctx->cancel_func)
SVN_ERR(ctx->cancel_func(ctx->cancel_baton));
- SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, subpool));
+ SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, iterpool));
err = svn_client__update_internal(&result_rev, local_abspath,
revision, depth, depth_is_sticky,
ignore_externals,
@@ -598,7 +598,8 @@ svn_client_update4(apr_array_header_t **
adds_as_modification,
make_parents,
FALSE, &sleep,
- ctx, subpool);
+ ctx,
+ iterpool);
if (err)
{
@@ -615,15 +616,15 @@ svn_client_update4(apr_array_header_t **
svn_wc_notify_t *notify;
notify = svn_wc_create_notify(path,
svn_wc_notify_skip,
- subpool);
- (*ctx->notify_func2)(ctx->notify_baton2, notify, subpool);
+ iterpool);
+ (*ctx->notify_func2)(ctx->notify_baton2, notify, iterpool);
}
}
if (result_revs)
APR_ARRAY_PUSH(*result_revs, svn_revnum_t) = result_rev;
}
+ svn_pool_destroy(iterpool);
- svn_pool_destroy(subpool);
if (sleep)
svn_io_sleep_for_timestamps((paths->nelts == 1) ? path : NULL, pool);
Modified: subversion/branches/ev2-export/subversion/libsvn_client/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_client/util.c?rev=1360103&r1=1360102&r2=1360103&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_client/util.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_client/util.c Wed Jul 11 10:26:19 2012
@@ -170,10 +170,10 @@ svn_client_commit_item3_dup(const svn_cl
svn_error_t *
svn_client__wc_node_get_base(svn_client__pathrev_t **base_p,
- const char *wc_abspath,
- svn_client_ctx_t *ctx,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool)
+ const char *wc_abspath,
+ svn_wc_context_t *wc_ctx,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
{
const char *relpath;
@@ -183,7 +183,7 @@ svn_client__wc_node_get_base(svn_client_
&relpath,
&(*base_p)->repos_root_url,
&(*base_p)->repos_uuid,
- ctx->wc_ctx, wc_abspath,
+ wc_ctx, wc_abspath,
result_pool, scratch_pool));
if ((*base_p)->repos_root_url && relpath)
{
Modified: subversion/branches/ev2-export/subversion/libsvn_delta/compat.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_delta/compat.c?rev=1360103&r1=1360102&r2=1360103&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_delta/compat.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_delta/compat.c Wed Jul 11 10:26:19 2012
@@ -1136,7 +1136,6 @@ add_symlink_cb(void *baton,
#endif
SVN__NOT_IMPLEMENTED();
- return SVN_NO_ERROR;
}
/* This implements svn_editor_cb_add_absent_t */
@@ -1248,7 +1247,6 @@ alter_symlink_cb(void *baton,
/* ### do something */
SVN__NOT_IMPLEMENTED();
- return SVN_NO_ERROR;
}
/* This implements svn_editor_cb_delete_t */
@@ -1344,7 +1342,6 @@ rotate_cb(void *baton,
apr_pool_t *scratch_pool)
{
SVN__NOT_IMPLEMENTED();
- return SVN_NO_ERROR;
}
Modified: subversion/branches/ev2-export/subversion/libsvn_delta/svndiff.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_delta/svndiff.c?rev=1360103&r1=1360102&r2=1360103&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_delta/svndiff.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_delta/svndiff.c Wed Jul 11 10:26:19 2012
@@ -32,6 +32,7 @@
#include <zlib.h>
#include "private/svn_error_private.h"
+#include "private/svn_delta_private.h"
/* The zlib compressBound function was not exported until 1.2.0. */
#if ZLIB_VERNUM >= 0x1200
@@ -129,11 +130,12 @@ append_encoded_int(svn_stringbuf_t *head
svn_stringbuf_appendbytes(header, (const char *)buf, p - buf);
}
-/* If IN is a string that is >= MIN_COMPRESS_SIZE, zlib compress it and
- place the result in OUT, with an integer prepended specifying the
- original size. If IN is < MIN_COMPRESS_SIZE, or if the compressed
- version of IN was no smaller than the original IN, OUT will be a copy
- of IN with the size prepended as an integer. */
+/* If IN is a string that is >= MIN_COMPRESS_SIZE and the COMPRESSION_LEVEL
+ is not SVN_DELTA_COMPRESSION_LEVEL_NONE, zlib compress it and places the
+ result in OUT, with an integer prepended specifying the original size.
+ If IN is < MIN_COMPRESS_SIZE, or if the compressed version of IN was no
+ smaller than the original IN, OUT will be a copy of IN with the size
+ prepended as an integer. */
static svn_error_t *
zlib_encode(const char *data,
apr_size_t len,
@@ -143,6 +145,7 @@ zlib_encode(const char *data,
unsigned long endlen;
apr_size_t intlen;
+ svn_stringbuf_setempty(out);
append_encoded_int(out, len);
intlen = out->len;
@@ -238,7 +241,7 @@ window_handler(svn_txdelta_window_t *win
case svn_txdelta_new: *ip = (0x2 << 6); break;
}
if (op->length >> 6 == 0)
- *ip++ |= op->length;
+ *ip++ |= (unsigned char)op->length;
else
ip = encode_int(ip + 1, op->length);
if (op->action_code != svn_txdelta_new)
@@ -441,12 +444,13 @@ decode_size(apr_size_t *val,
the original size, and that if encoded size == original size, that the
remaining data is not compressed.
In that case, we will simply return pointer into IN as data pointer for
- OUT. The caller is expected not to modify the contents of OUT.
+ OUT, COPYLESS_ALLOWED has been set. The, the caller is expected not to
+ modify the contents of OUT.
An error is returned if the decoded length exceeds the given LIMIT.
*/
static svn_error_t *
zlib_decode(const unsigned char *in, apr_size_t inLen, svn_stringbuf_t *out,
- apr_size_t limit)
+ apr_size_t limit, svn_boolean_t copyless_allowed)
{
apr_size_t len;
const unsigned char *oldplace = in;
@@ -465,12 +469,22 @@ zlib_decode(const unsigned char *in, apr
inLen -= (in - oldplace);
if (inLen == len)
{
- /* "in" is no longer used but the memory remains allocated for
- * at least as long as "out" will be used by the caller.
- */
- out->data = (char *)in;
- out->len = len;
- out->blocksize = len; /* sic! */
+ if (copyless_allowed)
+ {
+ /* "in" is no longer used but the memory remains allocated for
+ * at least as long as "out" will be used by the caller.
+ */
+ out->data = (char *)in;
+ out->len = len;
+ out->blocksize = len; /* sic! */
+ }
+ else
+ {
+ svn_stringbuf_ensure(out, len);
+ memcpy(out->data, in, len);
+ out->data[len] = 0;
+ out->len = len;
+ }
return SVN_NO_ERROR;
}
@@ -647,9 +661,9 @@ decode_window(svn_txdelta_window_t *wind
/* these may in fact simply return references to insend */
SVN_ERR(zlib_decode(insend, newlen, ndout,
- SVN_DELTA_WINDOW_SIZE));
+ SVN_DELTA_WINDOW_SIZE, TRUE));
SVN_ERR(zlib_decode(data, insend - data, instout,
- MAX_INSTRUCTION_SECTION_LEN));
+ MAX_INSTRUCTION_SECTION_LEN, TRUE));
newlen = ndout->len;
data = (unsigned char *)instout->data;
@@ -987,3 +1001,22 @@ svn_txdelta_skip_svndiff_window(apr_file
offset = inslen + newlen;
return svn_io_file_seek(file, APR_CUR, &offset, pool);
}
+
+
+svn_error_t *
+svn__compress(svn_string_t *in,
+ svn_stringbuf_t *out,
+ int compression_level)
+{
+ return zlib_encode(in->data, in->len, out,
+ compression_level);
+}
+
+svn_error_t *
+svn__decompress(svn_string_t *in,
+ svn_stringbuf_t *out,
+ apr_size_t limit)
+{
+ return zlib_decode((const unsigned char*)in->data, in->len, out, limit,
+ FALSE);
+}
Modified: subversion/branches/ev2-export/subversion/libsvn_delta/text_delta.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_delta/text_delta.c?rev=1360103&r1=1360102&r2=1360103&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_delta/text_delta.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_delta/text_delta.c Wed Jul 11 10:26:19 2012
@@ -496,7 +496,7 @@ svn_txdelta(svn_txdelta_stream_t **strea
svn_stream_t *target,
apr_pool_t *pool)
{
- return svn_txdelta2(stream, source, target, TRUE, pool);
+ svn_txdelta2(stream, source, target, TRUE, pool);
}
Modified: subversion/branches/ev2-export/subversion/libsvn_diff/diff_file.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_diff/diff_file.c?rev=1360103&r1=1360102&r2=1360103&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_diff/diff_file.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_diff/diff_file.c Wed Jul 11 10:26:19 2012
@@ -1167,10 +1167,13 @@ svn_diff_file_options_parse(svn_diff_fil
apr_pool_t *pool)
{
apr_getopt_t *os;
- struct opt_parsing_error_baton_t opt_parsing_error_baton = { NULL, pool };
+ struct opt_parsing_error_baton_t opt_parsing_error_baton;
/* Make room for each option (starting at index 1) plus trailing NULL. */
const char **argv = apr_palloc(pool, sizeof(char*) * (args->nelts + 2));
+ opt_parsing_error_baton.err = NULL;
+ opt_parsing_error_baton.pool = pool;
+
argv[0] = "";
memcpy((void *) (argv + 1), args->elts, sizeof(char*) * args->nelts);
argv[args->nelts + 1] = NULL;
Modified: subversion/branches/ev2-export/subversion/libsvn_diff/diff_memory.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_diff/diff_memory.c?rev=1360103&r1=1360102&r2=1360103&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_diff/diff_memory.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_diff/diff_memory.c Wed Jul 11 10:26:19 2012
@@ -123,7 +123,7 @@ datasource_get_next_token(apr_uint32_t *
diff_mem_baton_t *mem_baton = baton;
source_tokens_t *src = &(mem_baton->sources[datasource_to_index(datasource)]);
- if (src->tokens->nelts > src->next_token)
+ if ((apr_size_t)src->tokens->nelts > src->next_token)
{
/* There are actually tokens to be returned */
char *buf = mem_baton->normalization_buf[0];
Modified: subversion/branches/ev2-export/subversion/libsvn_diff/parse-diff.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_diff/parse-diff.c?rev=1360103&r1=1360102&r2=1360103&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_diff/parse-diff.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_diff/parse-diff.c Wed Jul 11 10:26:19 2012
@@ -270,101 +270,6 @@ parse_hunk_header(const char *header, sv
return TRUE;
}
-/* A helper for reading a line of text from a range in the patch file.
- *
- * Allocate *STRINGBUF in RESULT_POOL, and read into it one line from FILE.
- * Reading stops either after a line-terminator was found or after MAX_LEN
- * bytes have been read. The line-terminator is not stored in *STRINGBUF.
- *
- * The line-terminator is detected automatically and stored in *EOL
- * if EOL is not NULL. If EOF is reached and FILE does not end
- * with a newline character, and EOL is not NULL, *EOL is set to NULL.
- *
- * SCRATCH_POOL is used for temporary allocations.
- */
-static svn_error_t *
-readline(apr_file_t *file,
- svn_stringbuf_t **stringbuf,
- const char **eol,
- svn_boolean_t *eof,
- apr_size_t max_len,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool)
-{
- svn_stringbuf_t *str;
- const char *eol_str;
- apr_size_t numbytes;
- char c;
- apr_size_t len;
- svn_boolean_t found_eof;
-
- str = svn_stringbuf_create_ensure(80, result_pool);
-
- /* Read bytes into STR up to and including, but not storing,
- * the next EOL sequence. */
- eol_str = NULL;
- numbytes = 1;
- len = 0;
- found_eof = FALSE;
- while (!found_eof)
- {
- if (len < max_len)
- SVN_ERR(svn_io_file_read_full2(file, &c, sizeof(c), &numbytes,
- &found_eof, scratch_pool));
- len++;
- if (numbytes != 1 || len > max_len)
- {
- found_eof = TRUE;
- break;
- }
-
- if (c == '\n')
- {
- eol_str = "\n";
- }
- else if (c == '\r')
- {
- eol_str = "\r";
-
- if (!found_eof && len < max_len)
- {
- apr_off_t pos;
-
- /* Check for "\r\n" by peeking at the next byte. */
- pos = 0;
- SVN_ERR(svn_io_file_seek(file, APR_CUR, &pos, scratch_pool));
- SVN_ERR(svn_io_file_read_full2(file, &c, sizeof(c), &numbytes,
- &found_eof, scratch_pool));
- if (numbytes == 1 && c == '\n')
- {
- eol_str = "\r\n";
- len++;
- }
- else
- {
- /* Pretend we never peeked. */
- SVN_ERR(svn_io_file_seek(file, APR_SET, &pos, scratch_pool));
- found_eof = FALSE;
- numbytes = 1;
- }
- }
- }
- else
- svn_stringbuf_appendbyte(str, c);
-
- if (eol_str)
- break;
- }
-
- if (eol)
- *eol = eol_str;
- if (eof)
- *eof = found_eof;
- *stringbuf = str;
-
- return SVN_NO_ERROR;
-}
-
/* Read a line of original or modified hunk text from the specified
* RANGE within FILE. FILE is expected to contain unidiff text.
* Leading unidiff symbols ('+', '-', and ' ') are removed from the line,
@@ -406,8 +311,8 @@ hunk_readline_original_or_modified(apr_f
do
{
max_len = range->end - range->current;
- SVN_ERR(readline(file, &str, eol, eof, max_len,
- result_pool, scratch_pool));
+ SVN_ERR(svn_io_file_readline(file, &str, eol, eof, max_len,
+ result_pool, scratch_pool));
range->current = 0;
SVN_ERR(svn_io_file_seek(file, APR_CUR, &range->current, scratch_pool));
filtered = (str->data[0] == verboten || str->data[0] == '\\');
@@ -499,7 +404,8 @@ svn_diff_hunk_readline_diff_text(svn_dif
SVN_ERR(svn_io_file_seek(hunk->apr_file, APR_SET,
&hunk->diff_text_range.current, scratch_pool));
max_len = hunk->diff_text_range.end - hunk->diff_text_range.current;
- SVN_ERR(readline(hunk->apr_file, &line, eol, eof, max_len, result_pool,
+ SVN_ERR(svn_io_file_readline(hunk->apr_file, &line, eol, eof, max_len,
+ result_pool,
scratch_pool));
hunk->diff_text_range.current = 0;
SVN_ERR(svn_io_file_seek(hunk->apr_file, APR_CUR,
@@ -642,8 +548,8 @@ parse_next_hunk(svn_diff_hunk_t **hunk,
/* Remember the current line's offset, and read the line. */
last_line = pos;
- SVN_ERR(readline(apr_file, &line, NULL, &eof, APR_SIZE_MAX,
- iterpool, iterpool));
+ SVN_ERR(svn_io_file_readline(apr_file, &line, NULL, &eof, APR_SIZE_MAX,
+ iterpool, iterpool));
/* Update line offset for next iteration. */
pos = 0;
@@ -1364,8 +1270,8 @@ svn_diff_parse_next_patch(svn_patch_t **
/* Remember the current line's offset, and read the line. */
last_line = pos;
- SVN_ERR(readline(patch_file->apr_file, &line, NULL, &eof,
- APR_SIZE_MAX, iterpool, iterpool));
+ SVN_ERR(svn_io_file_readline(patch_file->apr_file, &line, NULL, &eof,
+ APR_SIZE_MAX, iterpool, iterpool));
if (! eof)
{
Modified: subversion/branches/ev2-export/subversion/libsvn_fs_fs/fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_fs_fs/fs.h?rev=1360103&r1=1360102&r2=1360103&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_fs_fs/fs.h (original)
+++ subversion/branches/ev2-export/subversion/libsvn_fs_fs/fs.h Wed Jul 11 10:26:19 2012
@@ -63,6 +63,10 @@ extern "C" {
has not been packed. */
#define PATH_REVPROP_GENERATION "revprop-generation"
/* Current revprop generation*/
+#define PATH_MANIFEST "manifest" /* Manifest file name */
+#define PATH_PACKED "pack" /* Packed revision data file */
+#define PATH_EXT_PACKED_SHARD ".pack" /* Extension for packed
+ shards */
/* If you change this, look at tests/svn_test_fs.c(maybe_install_fsfs_conf) */
#define PATH_CONFIG "fsfs.conf" /* Configuration */
@@ -90,11 +94,14 @@ extern "C" {
#define CONFIG_OPTION_ENABLE_PROPS_DELTIFICATION "enable-props-deltification"
#define CONFIG_OPTION_MAX_DELTIFICATION_WALK "max-deltification-walk"
#define CONFIG_OPTION_MAX_LINEAR_DELTIFICATION "max-linear-deltification"
+#define CONFIG_SECTION_PACKED_REVPROPS "packed-revprops"
+#define CONFIG_OPTION_REVPROP_PACK_SIZE "revprop-pack-size"
+#define CONFIG_OPTION_COMPRESS_PACKED_REVPROPS "compress-packed-revprops"
/* The format number of this filesystem.
This is independent of the repository format number, and
independent of any other FS back ends. */
-#define SVN_FS_FS__FORMAT_NUMBER 4
+#define SVN_FS_FS__FORMAT_NUMBER 6
/* The minimum format number that supports svndiff version 1. */
#define SVN_FS_FS__MIN_SVNDIFF1_FORMAT 2
@@ -134,8 +141,8 @@ extern "C" {
revprops.db . */
#define SVN_FS_FS__PACKED_REVPROP_SQLITE_DEV_FORMAT 5
-/* The minimum format number that supports packed revprop shards. */
-#define SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT SVN_FS_FS__PACKED_REVPROP_SQLITE_DEV_FORMAT
+/* The minimum format number that supports packed revprops. */
+#define SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT 6
/* The minimum format number that supports a configuration file (fsfs.conf) */
#define SVN_FS_FS__MIN_CONFIG_FILE 4
@@ -294,13 +301,21 @@ typedef struct fs_fs_data_t
/* Thread-safe boolean */
svn_atomic_t rep_cache_db_opened;
- /* The oldest revision not in a pack file. */
+ /* The oldest revision not in a pack file. It also applies to revprops
+ * if revprop packing has been enabled by the FSFS format version. */
svn_revnum_t min_unpacked_rev;
/* Whether rep-sharing is supported by the filesystem
* and allowed by the configuration. */
svn_boolean_t rep_sharing_allowed;
+ /* File size limit in bytes up to which multiple revprops shall be packed
+ * into a single file. */
+ apr_int64_t revprop_pack_size;
+
+ /* Whether packed revprop files shall be compressed. */
+ svn_boolean_t compress_packed_revprops;
+
/* Whether directory nodes shall be deltified just like file nodes. */
svn_boolean_t deltify_directories;