You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2013/07/13 16:14:44 UTC
svn commit: r1502791 [2/2] - in /subversion/branches/fsfs-improvements: ./
build/generator/ doc/programmer/ subversion/ subversion/bindings/cxxhl/src/
subversion/bindings/cxxhl/src/aprwrap/ subversion/bindings/cxxhl/tests/
subversion/bindings/swig/pyth...
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_delta/svndiff.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_delta/svndiff.c?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_delta/svndiff.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_delta/svndiff.c Sat Jul 13 14:14:42 2013
@@ -29,21 +29,12 @@
#include "delta.h"
#include "svn_pools.h"
#include "svn_private_config.h"
-#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
-#define svnCompressBound(LEN) compressBound(LEN)
-#else
-#define svnCompressBound(LEN) ((LEN) + ((LEN) >> 12) + ((LEN) >> 14) + 11)
-#endif
-
-/* For svndiff1, address/instruction/new data under this size will not
- be compressed using zlib as a secondary compressor. */
-#define MIN_COMPRESS_SIZE 512
+#include "private/svn_subr_private.h"
+#include "private/svn_string_private.h"
+#include "private/svn_dep_compat.h"
/* ----- Text delta to svndiff ----- */
@@ -58,139 +49,31 @@ struct encoder_baton {
apr_pool_t *pool;
};
-/* This is at least as big as the largest size of an integer that
- encode_int can generate; it is sufficient for creating buffers for
- it to write into. This assumes that integers are at most 64 bits,
- and so 10 bytes (with 7 bits of information each) are sufficient to
- represent them. */
-#define MAX_ENCODED_INT_LEN 10
/* This is at least as big as the largest size for a single instruction. */
-#define MAX_INSTRUCTION_LEN (2*MAX_ENCODED_INT_LEN+1)
+#define MAX_INSTRUCTION_LEN (2*SVN__MAX_ENCODED_UINT_LEN+1)
/* This is at least as big as the largest possible instructions
section: in theory, the instructions could be SVN_DELTA_WINDOW_SIZE
1-byte copy-from-source instructions (though this is very unlikely). */
#define MAX_INSTRUCTION_SECTION_LEN (SVN_DELTA_WINDOW_SIZE*MAX_INSTRUCTION_LEN)
-/* Encode VAL into the buffer P using the variable-length svndiff
- integer format. Return the incremented value of P after the
- encoded bytes have been written. P must point to a buffer of size
- at least MAX_ENCODED_INT_LEN.
-
- This encoding uses the high bit of each byte as a continuation bit
- and the other seven bits as data bits. High-order data bits are
- encoded first, followed by lower-order bits, so the value can be
- reconstructed by concatenating the data bits from left to right and
- interpreting the result as a binary number. Examples (brackets
- denote byte boundaries, spaces are for clarity only):
-
- 1 encodes as [0 0000001]
- 33 encodes as [0 0100001]
- 129 encodes as [1 0000001] [0 0000001]
- 2000 encodes as [1 0001111] [0 1010000]
-*/
-static unsigned char *
-encode_int(unsigned char *p, svn_filesize_t val)
-{
- int n;
- svn_filesize_t v;
- unsigned char cont;
-
- SVN_ERR_ASSERT_NO_RETURN(val >= 0);
-
- /* Figure out how many bytes we'll need. */
- v = val >> 7;
- n = 1;
- while (v > 0)
- {
- v = v >> 7;
- n++;
- }
-
- SVN_ERR_ASSERT_NO_RETURN(n <= MAX_ENCODED_INT_LEN);
-
- /* Encode the remaining bytes; n is always the number of bytes
- coming after the one we're encoding. */
- while (--n >= 0)
- {
- cont = ((n > 0) ? 0x1 : 0x0) << 7;
- *p++ = (unsigned char)(((val >> (n * 7)) & 0x7f) | cont);
- }
-
- return p;
-}
-
/* Append an encoded integer to a string. */
static void
append_encoded_int(svn_stringbuf_t *header, svn_filesize_t val)
{
- unsigned char buf[MAX_ENCODED_INT_LEN], *p;
+ unsigned char buf[SVN__MAX_ENCODED_UINT_LEN], *p;
- p = encode_int(buf, val);
+ SVN_ERR_ASSERT_NO_RETURN(val >= 0);
+ p = svn__encode_uint(buf, (apr_uint64_t)val);
svn_stringbuf_appendbytes(header, (const char *)buf, p - buf);
}
-/* 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,
- svn_stringbuf_t *out,
- int compression_level)
-{
- unsigned long endlen;
- apr_size_t intlen;
-
- svn_stringbuf_setempty(out);
- append_encoded_int(out, len);
- intlen = out->len;
-
- /* Compression initialization overhead is considered to large for
- short buffers. Also, if we don't actually want to compress data,
- ZLIB will produce an output no shorter than the input. Hence,
- the DATA would directly appended to OUT, so we can do that directly
- without calling ZLIB before. */
- if ( (len < MIN_COMPRESS_SIZE)
- || (compression_level == SVN_DELTA_COMPRESSION_LEVEL_NONE))
- {
- svn_stringbuf_appendbytes(out, data, len);
- }
- else
- {
- int zerr;
-
- svn_stringbuf_ensure(out, svnCompressBound(len) + intlen);
- endlen = out->blocksize;
-
- zerr = compress2((unsigned char *)out->data + intlen, &endlen,
- (const unsigned char *)data, len,
- compression_level);
- if (zerr != Z_OK)
- return svn_error_trace(svn_error__wrap_zlib(
- zerr, "compress2",
- _("Compression of svndiff data failed")));
-
- /* Compression didn't help :(, just append the original text */
- if (endlen >= len)
- {
- svn_stringbuf_appendbytes(out, data, len);
- return SVN_NO_ERROR;
- }
- out->len = endlen + intlen;
- out->data[out->len] = 0;
- }
- return SVN_NO_ERROR;
-}
-
static svn_error_t *
send_simple_insertion_window(svn_txdelta_window_t *window,
struct encoder_baton *eb)
{
- unsigned char headers[4 + 5 * MAX_ENCODED_INT_LEN + MAX_INSTRUCTION_LEN];
+ unsigned char headers[4 + 5 * SVN__MAX_ENCODED_UINT_LEN
+ + MAX_INSTRUCTION_LEN];
unsigned char ibuf[MAX_INSTRUCTION_LEN];
unsigned char *header_current;
apr_size_t header_len;
@@ -226,16 +109,17 @@ send_simple_insertion_window(svn_txdelta
else
{
ibuf[0] = (0x2 << 6);
- ip_len = encode_int(ibuf + 1, window->tview_len) - ibuf;
+ ip_len = svn__encode_uint(ibuf + 1, window->tview_len) - ibuf;
}
/* encode the window header. Please note that the source window may
* have content despite not being used for deltification. */
- header_current = encode_int(header_current, window->sview_offset);
- header_current = encode_int(header_current, window->sview_len);
- header_current = encode_int(header_current, window->tview_len);
+ header_current = svn__encode_uint(header_current,
+ (apr_uint64_t)window->sview_offset);
+ header_current = svn__encode_uint(header_current, window->sview_len);
+ header_current = svn__encode_uint(header_current, window->tview_len);
header_current[0] = (unsigned char)ip_len; /* 1 instruction */
- header_current = encode_int(&header_current[1], len);
+ header_current = svn__encode_uint(&header_current[1], len);
/* append instructions (1 to a handful of bytes) */
for (i = 0; i < ip_len; ++i)
@@ -319,9 +203,9 @@ window_handler(svn_txdelta_window_t *win
if (op->length >> 6 == 0)
*ip++ |= (unsigned char)op->length;
else
- ip = encode_int(ip + 1, op->length);
+ ip = svn__encode_uint(ip + 1, op->length);
if (op->action_code != svn_txdelta_new)
- ip = encode_int(ip, op->offset);
+ ip = svn__encode_uint(ip, op->offset);
svn_stringbuf_appendbytes(instructions, (const char *)ibuf, ip - ibuf);
}
@@ -331,20 +215,20 @@ window_handler(svn_txdelta_window_t *win
append_encoded_int(header, window->tview_len);
if (eb->version == 1)
{
- SVN_ERR(zlib_encode(instructions->data, instructions->len,
- i1, eb->compression_level));
+ SVN_ERR(svn__compress(instructions, i1, eb->compression_level));
instructions = i1;
}
append_encoded_int(header, instructions->len);
if (eb->version == 1)
{
- svn_stringbuf_t *temp = svn_stringbuf_create_empty(pool);
- svn_string_t *tempstr = svn_string_create_empty(pool);
- SVN_ERR(zlib_encode(window->new_data->data, window->new_data->len,
- temp, eb->compression_level));
- tempstr->data = temp->data;
- tempstr->len = temp->len;
- newdata = tempstr;
+ svn_stringbuf_t *compressed = svn_stringbuf_create_empty(pool);
+ svn_stringbuf_t *original = svn_stringbuf_create_empty(pool);
+ original->data = (char *)window->new_data->data; /* won't be modified */
+ original->len = window->new_data->len;
+ original->blocksize = window->new_data->len + 1;
+
+ SVN_ERR(svn__compress(original, compressed, eb->compression_level));
+ newdata = svn_stringbuf__morph_into_string(compressed);
}
else
newdata = window->new_data;
@@ -453,128 +337,32 @@ struct decode_baton
};
-/* Decode an svndiff-encoded integer into *VAL and return a pointer to
- the byte after the integer. The bytes to be decoded live in the
- range [P..END-1]. If these bytes do not contain a whole encoded
- integer, return NULL; in this case *VAL is undefined.
-
- See the comment for encode_int() earlier in this file for more detail on
- the encoding format. */
+/* Wrapper aroung svn__deencode_uint taking a file size as *VAL. */
static const unsigned char *
decode_file_offset(svn_filesize_t *val,
const unsigned char *p,
const unsigned char *end)
{
- svn_filesize_t temp = 0;
-
- if (p + MAX_ENCODED_INT_LEN < end)
- end = p + MAX_ENCODED_INT_LEN;
- /* Decode bytes until we're done. */
- while (p < end)
- {
- /* Don't use svn_filesize_t here, because this might be 64 bits
- * on 32 bit targets. Optimizing compilers may or may not be
- * able to reduce that to the effective code below. */
- unsigned int c = *p++;
-
- temp = (temp << 7) | (c & 0x7f);
- if (c < 0x80)
- {
- *val = temp;
- return p;
- }
- }
+ apr_uint64_t temp = 0;
+ const unsigned char *result = svn__decode_uint(&temp, p, end);
+ *val = (svn_filesize_t)temp;
- return NULL;
+ return result;
}
-
/* Same as above, only decode into a size variable. */
static const unsigned char *
decode_size(apr_size_t *val,
const unsigned char *p,
const unsigned char *end)
{
- apr_size_t temp = 0;
-
- if (p + MAX_ENCODED_INT_LEN < end)
- end = p + MAX_ENCODED_INT_LEN;
- /* Decode bytes until we're done. */
- while (p < end)
- {
- apr_size_t c = *p++;
-
- temp = (temp << 7) | (c & 0x7f);
- if (c < 0x80)
- {
- *val = temp;
- return p;
- }
- }
-
- return NULL;
-}
-
-/* Decode the possibly-zlib compressed string of length INLEN that is in
- IN, into OUT. We expect an integer is prepended to IN that specifies
- 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, 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 len;
- const unsigned char *oldplace = in;
-
- /* First thing in the string is the original length. */
- in = decode_size(&len, in, in + inLen);
- if (in == NULL)
- return svn_error_create(SVN_ERR_SVNDIFF_INVALID_COMPRESSED_DATA, NULL,
- _("Decompression of svndiff data failed: no size"));
- if (len > limit)
- return svn_error_create(SVN_ERR_SVNDIFF_INVALID_COMPRESSED_DATA, NULL,
- _("Decompression of svndiff data failed: "
- "size too large"));
- /* We need to subtract the size of the encoded original length off the
- * still remaining input length. */
- inLen -= (in - oldplace);
- if (inLen == len)
- {
- svn_stringbuf_ensure(out, len);
- memcpy(out->data, in, len);
- out->data[len] = 0;
- out->len = len;
-
- return SVN_NO_ERROR;
- }
- else
- {
- unsigned long zlen = len;
- int zerr;
-
- svn_stringbuf_ensure(out, len);
- zerr = uncompress((unsigned char *)out->data, &zlen, in, inLen);
- if (zerr != Z_OK)
- return svn_error_trace(svn_error__wrap_zlib(
- zerr, "uncompress",
- _("Decompression of svndiff data failed")));
-
- /* Zlib should not produce something that has a different size than the
- original length we stored. */
- if (zlen != len)
- return svn_error_create(SVN_ERR_SVNDIFF_INVALID_COMPRESSED_DATA,
- NULL,
- _("Size of uncompressed data "
- "does not match stored original length"));
- out->data[zlen] = 0;
- out->len = zlen;
- }
- return SVN_NO_ERROR;
+ apr_uint64_t temp = 0;
+ const unsigned char *result = svn__decode_uint(&temp, p, end);
+ if (temp > APR_SIZE_MAX)
+ return NULL;
+
+ *val = (apr_size_t)temp;
+ return result;
}
/* Decode an instruction into OP, returning a pointer to the text
@@ -695,6 +483,21 @@ count_and_verify_instructions(int *ninst
return SVN_NO_ERROR;
}
+static svn_error_t *
+zlib_decode(const unsigned char *in, apr_size_t inLen, svn_stringbuf_t *out,
+ apr_size_t limit)
+{
+ /* construct a fake string buffer as parameter to svn__decompress.
+ This is fine as that function never writes to it. */
+ svn_stringbuf_t compressed;
+ compressed.pool = NULL;
+ compressed.data = (char *)in;
+ compressed.len = inLen;
+ compressed.blocksize = inLen + 1;
+
+ return svn__decompress(&compressed, out, limit);
+}
+
/* Given the five integer fields of a window header and a pointer to
the remainder of the window contents, fill in a delta window
structure *WINDOW. New allocations will be performed in POOL;
@@ -847,7 +650,7 @@ write_handler(void *baton,
if (tview_len > SVN_DELTA_WINDOW_SIZE ||
sview_len > SVN_DELTA_WINDOW_SIZE ||
/* for svndiff1, newlen includes the original length */
- newlen > SVN_DELTA_WINDOW_SIZE + MAX_ENCODED_INT_LEN ||
+ newlen > SVN_DELTA_WINDOW_SIZE + SVN__MAX_ENCODED_UINT_LEN ||
inslen > MAX_INSTRUCTION_SECTION_LEN)
return svn_error_create(SVN_ERR_SVNDIFF_CORRUPT_WINDOW, NULL,
_("Svndiff contains a too-large window"));
@@ -1029,7 +832,7 @@ read_window_header(svn_stream_t *stream,
if (*tview_len > SVN_DELTA_WINDOW_SIZE ||
*sview_len > SVN_DELTA_WINDOW_SIZE ||
/* for svndiff1, newlen includes the original length */
- *newlen > SVN_DELTA_WINDOW_SIZE + MAX_ENCODED_INT_LEN ||
+ *newlen > SVN_DELTA_WINDOW_SIZE + SVN__MAX_ENCODED_UINT_LEN ||
*inslen > MAX_INSTRUCTION_SECTION_LEN)
return svn_error_create(SVN_ERR_SVNDIFF_CORRUPT_WINDOW, NULL,
_("Svndiff contains a too-large window"));
@@ -1086,18 +889,3 @@ svn_txdelta_skip_svndiff_window(apr_file
}
-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);
-}
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_fs_base/fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_fs_base/fs.c?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_fs_base/fs.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_fs_base/fs.c Sat Jul 13 14:14:42 2013
@@ -1493,7 +1493,7 @@ svn_fs_base__init(const svn_version_t *l
return svn_error_createf(SVN_ERR_VERSION_MISMATCH, NULL,
_("Unsupported FS loader version (%d) for bdb"),
loader_version->major);
- SVN_ERR(svn_ver_check_list(base_version(), checklist));
+ SVN_ERR(svn_ver_check_list2(base_version(), checklist, svn_ver_equal));
SVN_ERR(check_bdb_version());
SVN_ERR(svn_fs_bdb__init(common_pool));
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/fs.c?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/fs.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/fs.c Sat Jul 13 14:14:42 2013
@@ -485,7 +485,7 @@ svn_fs_fs__init(const svn_version_t *loa
return svn_error_createf(SVN_ERR_VERSION_MISMATCH, NULL,
_("Unsupported FS loader version (%d) for fsfs"),
loader_version->major);
- SVN_ERR(svn_ver_check_list(fs_version(), checklist));
+ SVN_ERR(svn_ver_check_list2(fs_version(), checklist, svn_ver_equal));
*vtable = &library_vtable;
return SVN_NO_ERROR;
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/fs_fs.c?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_fs_fs/fs_fs.c Sat Jul 13 14:14:42 2013
@@ -2949,10 +2949,9 @@ parse_packed_revprops(svn_fs_t *fs,
/* decompress (even if the data is only "stored", there is still a
* length header to remove) */
- svn_string_t *compressed
- = svn_stringbuf__morph_into_string(revprops->packed_revprops);
svn_stringbuf_t *uncompressed = svn_stringbuf_create_empty(pool);
- SVN_ERR(svn__decompress(compressed, uncompressed, APR_SIZE_MAX));
+ SVN_ERR(svn__decompress(revprops->packed_revprops, uncompressed,
+ APR_SIZE_MAX));
/* read first revision number and number of revisions in the pack */
stream = svn_stream_from_stringbuf(uncompressed, scratch_pool);
@@ -3352,7 +3351,7 @@ repack_revprops(svn_fs_t *fs,
SVN_ERR(svn_stream_close(stream));
/* compress / store the data */
- SVN_ERR(svn__compress(svn_stringbuf__morph_into_string(uncompressed),
+ SVN_ERR(svn__compress(uncompressed,
compressed,
ffd->compress_packed_revprops
? SVN_DELTA_COMPRESSION_LEVEL_DEFAULT
@@ -8837,8 +8836,7 @@ copy_revprops(const char *pack_file_dir,
SVN_ERR(svn_stream_close(pack_stream));
/* compress the content (or just store it for COMPRESSION_LEVEL 0) */
- SVN_ERR(svn__compress(svn_stringbuf__morph_into_string(uncompressed),
- compressed, compression_level));
+ SVN_ERR(svn__compress(uncompressed, compressed, compression_level));
/* write the pack file content to disk */
stream = svn_stream_from_aprfile2(pack_file, FALSE, scratch_pool);
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_ra_local/ra_plugin.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_ra_local/ra_plugin.c?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_ra_local/ra_plugin.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_ra_local/ra_plugin.c Sat Jul 13 14:14:42 2013
@@ -1764,7 +1764,7 @@ svn_ra_local__init(const svn_version_t *
"ra_local"),
loader_version->major);
- SVN_ERR(svn_ver_check_list(ra_local_version(), checklist));
+ SVN_ERR(svn_ver_check_list2(ra_local_version(), checklist, svn_ver_equal));
#ifndef SVN_LIBSVN_CLIENT_LINKS_RA_LOCAL
/* This assumes that POOL was the pool used to load the dso. */
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/commit.c?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/commit.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/commit.c Sat Jul 13 14:14:42 2013
@@ -2269,7 +2269,9 @@ abort_edit(void *edit_baton,
&& handler->sline.code != 404
)
{
- SVN_ERR_MALFUNCTION();
+ return svn_error_createf(SVN_ERR_RA_DAV_MALFORMED_DATA, NULL,
+ _("DELETE returned unexpected status: %d"),
+ handler->sline.code);
}
return SVN_NO_ERROR;
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/property.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/property.c?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/property.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/property.c Sat Jul 13 14:14:42 2013
@@ -143,7 +143,7 @@ static const int propfind_expected_statu
/* Return the HTTP status code contained in STATUS_LINE, or 0 if
there's a problem parsing it. */
-static int parse_status_code(const char *status_line)
+static apr_int64_t parse_status_code(const char *status_line)
{
/* STATUS_LINE should be of form: "HTTP/1.1 200 OK" */
if (status_line[0] == 'H' &&
@@ -261,7 +261,7 @@ propfind_closed(svn_ra_serf__xml_estate_
that we wish to ignore. (Typically, if it's not a 200, the
status will be 404 to indicate that a property we
specifically requested from the server doesn't exist.) */
- int status = parse_status_code(cdata->data);
+ apr_int64_t status = parse_status_code(cdata->data);
if (status != 200)
svn_ra_serf__xml_note(xes, PROPSTAT, "ignore-prop", "*");
}
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/serf.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/serf.c?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/serf.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/serf.c Sat Jul 13 14:14:42 2013
@@ -149,6 +149,7 @@ load_config(svn_ra_serf__session_t *sess
const char *timeout_str = NULL;
const char *exceptions;
apr_port_t proxy_port;
+ svn_tristate_t chunked_requests;
if (config_hash)
{
@@ -225,12 +226,11 @@ load_config(svn_ra_serf__session_t *sess
SVN_CONFIG_OPTION_HTTP_MAX_CONNECTIONS,
SVN_CONFIG_DEFAULT_OPTION_HTTP_MAX_CONNECTIONS));
- /* Do we need to detect whether an intervening proxy does not support
- chunked requests? */
- SVN_ERR(svn_config_get_bool(config, &session->detect_chunking,
- SVN_CONFIG_SECTION_GLOBAL,
- SVN_CONFIG_OPTION_HTTP_DETECT_CHUNKING,
- FALSE));
+ /* Should we use chunked transfer encoding. */
+ SVN_ERR(svn_config_get_tristate(config, &chunked_requests,
+ SVN_CONFIG_SECTION_GLOBAL,
+ SVN_CONFIG_OPTION_HTTP_CHUNKED_REQUESTS,
+ "auto", svn_tristate_unknown));
if (config)
server_group = svn_config_find_group(config,
@@ -289,12 +289,11 @@ load_config(svn_ra_serf__session_t *sess
SVN_CONFIG_OPTION_HTTP_MAX_CONNECTIONS,
session->max_connections));
- /* Do we need to take care with this proxy? */
- SVN_ERR(svn_config_get_bool(
- config, &session->detect_chunking,
- server_group,
- SVN_CONFIG_OPTION_HTTP_DETECT_CHUNKING,
- session->detect_chunking));
+ /* Should we use chunked transfer encoding. */
+ SVN_ERR(svn_config_get_tristate(config, &chunked_requests,
+ server_group,
+ SVN_CONFIG_OPTION_HTTP_CHUNKED_REQUESTS,
+ "auto", chunked_requests));
}
/* Don't allow the http-max-connections value to be larger than our
@@ -369,6 +368,24 @@ load_config(svn_ra_serf__session_t *sess
session->using_proxy = FALSE;
}
+ /* Setup detect_chunking and using_chunked_requests based on
+ * the chunked_requests tristate */
+ if (chunked_requests == svn_tristate_unknown)
+ {
+ session->detect_chunking = TRUE;
+ session->using_chunked_requests = TRUE;
+ }
+ else if (chunked_requests == svn_tristate_true)
+ {
+ session->detect_chunking = FALSE;
+ session->using_chunked_requests = TRUE;
+ }
+ else /* chunked_requests == svn_tristate_false */
+ {
+ session->detect_chunking = FALSE;
+ session->using_chunked_requests = FALSE;
+ }
+
/* Setup authentication. */
SVN_ERR(load_http_auth_types(pool, config, server_group,
&session->authn_types));
@@ -1239,7 +1256,7 @@ svn_ra_serf__init(const svn_version_t *l
int serf_minor;
int serf_patch;
- SVN_ERR(svn_ver_check_list(ra_serf_version(), checklist));
+ SVN_ERR(svn_ver_check_list2(ra_serf_version(), checklist, svn_ver_equal));
/* Simplified version check to make sure we can safely use the
VTABLE parameter. The RA loader does a more exhaustive check. */
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/util.c?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/util.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_ra_serf/util.c Sat Jul 13 14:14:42 2013
@@ -476,7 +476,7 @@ connection_closed(svn_ra_serf__connectio
{
if (why)
{
- SVN_ERR_MALFUNCTION();
+ return svn_error_wrap_apr(why, NULL);
}
if (conn->session->using_ssl)
@@ -1502,6 +1502,8 @@ svn_ra_serf__process_pending(svn_ra_serf
if (xml_status != XML_STATUS_OK)
{
+ return svn_error_createf(SVN_ERR_RA_DAV_MALFORMED_DATA, NULL,
+ _("XML parsing failed"));
}
}
@@ -2444,9 +2446,8 @@ svn_ra_serf__error_on_status(serf_status
return svn_error_createf(SVN_ERR_RA_DAV_REQUEST_FAILED, NULL,
_("DAV request failed: 411 Content length required. The "
"server or an intermediate proxy does not accept "
- "chunked encoding. Try setting "
- "'http-detect-chunking=yes' "
- "in your client configuration."));
+ "chunked encoding. Try setting 'http-chunked-requests' "
+ "to 'auto' or 'no' in your client configuration."));
}
if (sline.code >= 300)
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_ra_svn/client.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_ra_svn/client.c?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_ra_svn/client.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_ra_svn/client.c Sat Jul 13 14:14:42 2013
@@ -2730,7 +2730,7 @@ svn_ra_svn__init(const svn_version_t *lo
{ NULL, NULL }
};
- SVN_ERR(svn_ver_check_list(svn_ra_svn_version(), checklist));
+ SVN_ERR(svn_ver_check_list2(svn_ra_svn_version(), checklist, svn_ver_equal));
/* Simplified version check to make sure we can safely use the
VTABLE parameter. The RA loader does a more exhaustive check. */
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_ra_svn/marshal.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_ra_svn/marshal.c?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_ra_svn/marshal.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_ra_svn/marshal.c Sat Jul 13 14:14:42 2013
@@ -1534,6 +1534,58 @@ svn_ra_svn__read_cmd_response(svn_ra_svn
status);
}
+static svn_error_t *
+svn_ra_svn__handle_command(svn_boolean_t *terminate,
+ apr_hash_t *cmd_hash,
+ void *baton,
+ svn_ra_svn_conn_t *conn,
+ svn_boolean_t error_on_disconnect,
+ apr_pool_t *iterpool)
+{
+ const char *cmdname;
+ svn_error_t *err, *write_err;
+ apr_array_header_t *params;
+ const svn_ra_svn_cmd_entry_t *command;
+
+ err = svn_ra_svn__read_tuple(conn, iterpool, "wl", &cmdname, ¶ms);
+ if (err)
+ {
+ if (!error_on_disconnect
+ && err->apr_err == SVN_ERR_RA_SVN_CONNECTION_CLOSED)
+ {
+ svn_error_clear(err);
+ *terminate = TRUE;
+ return SVN_NO_ERROR;
+ }
+ return err;
+ }
+ command = svn_hash_gets(cmd_hash, cmdname);
+
+ if (command)
+ err = (*command->handler)(conn, iterpool, params, baton);
+ else
+ {
+ err = svn_error_createf(SVN_ERR_RA_SVN_UNKNOWN_CMD, NULL,
+ _("Unknown editor command '%s'"), cmdname);
+ err = svn_error_create(SVN_ERR_RA_SVN_CMD_ERR, err, NULL);
+ }
+
+ if (err && err->apr_err == SVN_ERR_RA_SVN_CMD_ERR)
+ {
+ write_err = svn_ra_svn__write_cmd_failure(
+ conn, iterpool,
+ svn_ra_svn__locate_real_error_child(err));
+ svn_error_clear(err);
+ if (write_err)
+ return write_err;
+ }
+ else if (err)
+ return err;
+
+ *terminate = (command && command->terminate);
+ return SVN_NO_ERROR;
+}
+
svn_error_t *
svn_ra_svn__handle_commands2(svn_ra_svn_conn_t *conn,
apr_pool_t *pool,
@@ -1543,10 +1595,7 @@ svn_ra_svn__handle_commands2(svn_ra_svn_
{
apr_pool_t *subpool = svn_pool_create(pool);
apr_pool_t *iterpool = svn_pool_create(subpool);
- const char *cmdname;
const svn_ra_svn_cmd_entry_t *command;
- svn_error_t *err, *write_err;
- apr_array_header_t *params;
apr_hash_t *cmd_hash = apr_hash_make(subpool);
for (command = commands; command->cmdname; command++)
@@ -1554,43 +1603,18 @@ svn_ra_svn__handle_commands2(svn_ra_svn_
while (1)
{
+ svn_boolean_t terminate;
+ svn_error_t *err;
svn_pool_clear(iterpool);
- err = svn_ra_svn__read_tuple(conn, iterpool, "wl", &cmdname, ¶ms);
- if (err)
- {
- if (!error_on_disconnect
- && err->apr_err == SVN_ERR_RA_SVN_CONNECTION_CLOSED)
- {
- svn_error_clear(err);
- svn_pool_destroy(subpool);
- return SVN_NO_ERROR;
- }
- return err;
- }
- command = svn_hash_gets(cmd_hash, cmdname);
- if (command)
- err = (*command->handler)(conn, iterpool, params, baton);
- else
- {
- err = svn_error_createf(SVN_ERR_RA_SVN_UNKNOWN_CMD, NULL,
- _("Unknown editor command '%s'"), cmdname);
- err = svn_error_create(SVN_ERR_RA_SVN_CMD_ERR, err, NULL);
- }
-
- if (err && err->apr_err == SVN_ERR_RA_SVN_CMD_ERR)
+ err = svn_ra_svn__handle_command(&terminate, cmd_hash, baton, conn,
+ error_on_disconnect, iterpool);
+ if (err)
{
- write_err = svn_ra_svn__write_cmd_failure(
- conn, iterpool,
- svn_ra_svn__locate_real_error_child(err));
- svn_error_clear(err);
- if (write_err)
- return write_err;
+ svn_pool_destroy(subpool);
+ return svn_error_trace(err);
}
- else if (err)
- return err;
-
- if (command && command->terminate)
+ if (terminate)
break;
}
svn_pool_destroy(iterpool);
@@ -2404,7 +2428,7 @@ svn_ra_svn__write_data_log_entry(svn_ra_
const svn_string_t *message,
svn_boolean_t has_children,
svn_boolean_t invalid_revnum,
- int revprop_count)
+ unsigned revprop_count)
{
SVN_ERR(write_tuple_revision(conn, pool, revision));
SVN_ERR(write_tuple_start_list(conn, pool));
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_subr/auth.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_subr/auth.c?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_subr/auth.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_subr/auth.c Sat Jul 13 14:14:42 2013
@@ -481,7 +481,8 @@ svn_auth_get_platform_specific_provider(
check_list[0].version_query = version_function;
check_list[1].label = NULL;
check_list[1].version_query = NULL;
- SVN_ERR(svn_ver_check_list(svn_subr_version(), check_list));
+ SVN_ERR(svn_ver_check_list2(svn_subr_version(), check_list,
+ svn_ver_equal));
}
if (apr_dso_sym(&provider_function_symbol,
dso,
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_subr/config_file.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_subr/config_file.c?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_subr/config_file.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_subr/config_file.c Sat Jul 13 14:14:42 2013
@@ -838,14 +838,8 @@ svn_config_ensure(const char *config_dir
"### http-max-connections Maximum number of parallel server" NL
"### connections to use for any given" NL
"### HTTP operation." NL
- "### http-detect-chunking Detect if the connection supports" NL
- "### chunked requests (which some proxies"
- NL
- "### do not support). This defaults to" NL
- "### off since mod_dav_svn supports " NL
- "### chunked requests and the detection"
- NL
- "### may hurt performance." NL
+ "### http-chunked-requests Whether to use chunked transfer" NL
+ "### encoding for HTTP requests body." NL
"### neon-debug-mask Debug mask for Neon HTTP library" NL
"### ssl-authority-files List of files, each of a trusted CA"
NL
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_subr/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_subr/deprecated.c?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_subr/deprecated.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_subr/deprecated.c Sat Jul 13 14:14:42 2013
@@ -1301,4 +1301,10 @@ svn_subst_build_keywords(svn_subst_keywo
return SVN_NO_ERROR;
}
-
+/*** From version.c ***/
+svn_error_t *
+svn_ver_check_list(const svn_version_t *my_version,
+ const svn_version_checklist_t *checklist)
+{
+ return svn_ver_check_list2(my_version, checklist, svn_ver_compatible);
+}
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_subr/error.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_subr/error.c?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_subr/error.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_subr/error.c Sat Jul 13 14:14:42 2013
@@ -110,7 +110,8 @@ make_error_internal(apr_status_t apr_err
pool = child->pool;
else
{
- if (apr_pool_create(&pool, NULL))
+ pool = svn_pool_create(NULL);
+ if (!pool)
abort();
}
@@ -339,7 +340,8 @@ svn_error_dup(svn_error_t *err)
apr_pool_t *pool;
svn_error_t *new_err = NULL, *tmp_err = NULL;
- if (apr_pool_create(&pool, NULL))
+ pool = svn_pool_create(NULL);
+ if (!pool)
abort();
for (; err; err = err->child)
@@ -559,7 +561,7 @@ svn_handle_error2(svn_error_t *err,
preferring apr_pool_*() instead. I can't remember why -- it may
be an artifact of r843793, or it may be for some deeper reason --
but I'm playing it safe and using apr_pool_*() here too. */
- apr_pool_create(&subpool, err->pool);
+ subpool = svn_pool_create(err->pool);
empties = apr_array_make(subpool, 0, sizeof(apr_status_t));
tmp_err = err;
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_subr/io.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_subr/io.c?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_subr/io.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_subr/io.c Sat Jul 13 14:14:42 2013
@@ -3557,6 +3557,101 @@ svn_io_file_seek(apr_file_t *file, apr_s
pool);
}
+svn_error_t *
+svn_io_file_aligned_seek(apr_file_t *file,
+ apr_off_t block_size,
+ apr_off_t *buffer_start,
+ apr_off_t offset,
+ apr_pool_t *pool)
+{
+ const apr_size_t apr_default_buffer_size = 4096;
+ apr_size_t file_buffer_size = apr_default_buffer_size;
+ apr_off_t desired_offset = 0;
+ apr_off_t current = 0;
+ apr_off_t aligned_offset = 0;
+ svn_boolean_t fill_buffer = FALSE;
+
+ /* paranoia check: huge blocks on 32 bit machines may cause overflows */
+ SVN_ERR_ASSERT(block_size == (apr_size_t)block_size);
+
+ /* default for invalid block sizes */
+ if (block_size == 0)
+ block_size = apr_default_buffer_size;
+
+ /* on old APRs, we are simply stuck with 4k blocks */
+#if APR_VERSION_AT_LEAST(1,3,0)
+ file_buffer_size = apr_file_buffer_size_get(file);
+
+ /* don't try to set a buffer size for non-buffered files! */
+ if (file_buffer_size == 0)
+ {
+ aligned_offset = offset;
+ }
+ else if (file_buffer_size != (apr_size_t)block_size)
+ {
+ /* FILE has the wrong buffer size. correct it */
+ char *buffer;
+ file_buffer_size = (apr_size_t)block_size;
+ buffer = apr_palloc(apr_file_pool_get(file), file_buffer_size);
+ apr_file_buffer_set(file, buffer, file_buffer_size);
+
+ /* seek to the start of the block and cause APR to read 1 block */
+ aligned_offset = offset - (offset % block_size);
+ fill_buffer = TRUE;
+ }
+#endif
+ {
+ aligned_offset = offset - (offset % file_buffer_size);
+
+ /* We have no way to determine the block start of an APR file.
+ Furthermore, we don't want to throw away the current buffer
+ contents. Thus, we re-align the buffer only if the CURRENT
+ offset definitely lies outside the desired, aligned buffer.
+ This covers the typical case of linear reads getting very
+ close to OFFSET but reading the previous / following block.
+
+ Note that ALIGNED_OFFSET may still be within the current
+ buffer and no I/O will actually happen in the FILL_BUFFER
+ section below.
+ */
+ SVN_ERR(svn_io_file_seek(file, SEEK_CUR, ¤t, pool));
+ fill_buffer = aligned_offset + file_buffer_size <= current
+ || current <= aligned_offset;
+ }
+
+ if (fill_buffer)
+ {
+ char dummy;
+ apr_status_t status;
+
+ /* seek to the start of the block and cause APR to read 1 block */
+ SVN_ERR(svn_io_file_seek(file, SEEK_SET, &aligned_offset, pool));
+ status = apr_file_getc(&dummy, file);
+
+ /* read may fail if we seek to or behind EOF. That's ok then. */
+ if (status != APR_SUCCESS && !APR_STATUS_IS_EOF(status))
+ return do_io_file_wrapper_cleanup(file, status,
+ N_("Can't read file '%s'"),
+ N_("Can't read stream"),
+ pool);
+ }
+
+ /* finally, seek to the OFFSET the caller wants */
+ desired_offset = offset;
+ SVN_ERR(svn_io_file_seek(file, SEEK_SET, &offset, pool));
+ if (desired_offset != offset)
+ return do_io_file_wrapper_cleanup(file, APR_EOF,
+ N_("Can't seek in file '%s'"),
+ N_("Can't seek in stream"),
+ pool);
+
+ /* return the buffer start that we (probably) enforced */
+ if (buffer_start)
+ *buffer_start = aligned_offset;
+
+ return SVN_NO_ERROR;
+}
+
svn_error_t *
svn_io_file_write(apr_file_t *file, const void *buf,
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_subr/nls.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_subr/nls.c?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_subr/nls.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_subr/nls.c Sat Jul 13 14:14:42 2013
@@ -58,7 +58,7 @@ svn_nls_init(void)
apr_pool_t* pool;
apr_size_t inwords, outbytes, outlength;
- apr_pool_create(&pool, 0);
+ pool = svn_pool_create(0);
/* get exe name - our locale info will be in '../share/locale' */
inwords = GetModuleFileNameW(0, ucs2_path,
sizeof(ucs2_path) / sizeof(ucs2_path[0]));
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_subr/version.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_subr/version.c?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_subr/version.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_subr/version.c Sat Jul 13 14:14:42 2013
@@ -75,8 +75,10 @@ svn_boolean_t svn_ver_equal(const svn_ve
svn_error_t *
-svn_ver_check_list(const svn_version_t *my_version,
- const svn_version_checklist_t *checklist)
+svn_ver_check_list2(const svn_version_t *my_version,
+ const svn_version_checklist_t *checklist,
+ svn_boolean_t (*comparator)(const svn_version_t *,
+ const svn_version_t *))
{
svn_error_t *err = SVN_NO_ERROR;
int i;
@@ -84,12 +86,17 @@ svn_ver_check_list(const svn_version_t *
for (i = 0; checklist[i].label != NULL; ++i)
{
const svn_version_t *lib_version = checklist[i].version_query();
- if (!svn_ver_compatible(my_version, lib_version))
+ if (!comparator(my_version, lib_version))
err = svn_error_createf(SVN_ERR_VERSION_MISMATCH, err,
- _("Version mismatch in '%s':"
+ _("Version mismatch in '%s'%s:"
" found %d.%d.%d%s,"
" expected %d.%d.%d%s"),
checklist[i].label,
+ comparator == svn_ver_equal
+ ? _(" (expecting equality)")
+ : comparator == svn_ver_compatible
+ ? _(" (expecting compatibility)")
+ : "",
lib_version->major, lib_version->minor,
lib_version->patch, lib_version->tag,
my_version->major, my_version->minor,
Modified: subversion/branches/fsfs-improvements/subversion/mod_dav_svn/mod_dav_svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/mod_dav_svn/mod_dav_svn.c?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/mod_dav_svn/mod_dav_svn.c (original)
+++ subversion/branches/fsfs-improvements/subversion/mod_dav_svn/mod_dav_svn.c Sat Jul 13 14:14:42 2013
@@ -979,7 +979,6 @@ merge_xml_filter_insert(request_rec *r)
typedef struct merge_ctx_t {
apr_bucket_brigade *bb;
apr_xml_parser *parser;
- apr_pool_t *pool;
} merge_ctx_t;
@@ -1009,7 +1008,6 @@ merge_xml_in_filter(ap_filter_t *f,
f->ctx = ctx = apr_palloc(r->pool, sizeof(*ctx));
ctx->parser = apr_xml_parser_create(r->pool);
ctx->bb = apr_brigade_create(r->pool, r->connection->bucket_alloc);
- apr_pool_create(&ctx->pool, r->pool);
}
rv = ap_get_brigade(f->next, ctx->bb, mode, block, readbytes);
Modified: subversion/branches/fsfs-improvements/subversion/po/de.po
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/po/de.po?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/po/de.po [UTF-8] (original)
+++ subversion/branches/fsfs-improvements/subversion/po/de.po [UTF-8] Sat Jul 13 14:14:42 2013
@@ -97,14 +97,16 @@ msgstr ""
"Project-Id-Version: subversion 1.8\n"
"Report-Msgid-Bugs-To: dev@subversion.apache.org\n"
"POT-Creation-Date: 2013-07-09 19:05+0100\n"
-"PO-Revision-Date: 2013-07-09 19:04+0100\n"
-"Last-Translator: Subversion Developers <de...@subversion.apache.org>\n"
+"PO-Revision-Date: 2013-07-12 21:01+0000\n"
+"Last-Translator: Andreas <an...@gmx.de>\n"
"Language-Team: German <de...@subversion.apache.org>\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Generator: Pootle 2.5.0-rc1\n"
+"X-POOTLE-MTIME: 1373662891.0\n"
#. Constructing nice error messages for roots.
#. Build an SVN_ERR_FS_NOT_FOUND error, with a detailed error text,
@@ -1465,7 +1467,9 @@ msgstr "Alle nicht-relativen Ziele müss
#: ../libsvn_client/cmdline.c:312
msgid "Resolving '^/': no repository root found in the target arguments or in the current directory"
-msgstr "Auflösen von »%s«: Keine Wurzel einer Arbeitskopie in den Zielparametern oder im Arbeitsverzeichnis gefunden"
+msgstr ""
+"Auflösen von »^/«: Keine Wurzel eines Projektarchivs in den Zielparametern "
+"oder im Arbeitsverzeichnis gefunden"
#: ../libsvn_client/commit.c:155 ../libsvn_client/copy.c:1510
msgid "Commit failed (details follow):"
Modified: subversion/branches/fsfs-improvements/subversion/svn/svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/svn/svn.c?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/svn/svn.c (original)
+++ subversion/branches/fsfs-improvements/subversion/svn/svn.c Sat Jul 13 14:14:42 2013
@@ -1658,7 +1658,7 @@ check_lib_versions(void)
};
SVN_VERSION_DEFINE(my_version);
- return svn_ver_check_list(&my_version, checklist);
+ return svn_ver_check_list2(&my_version, checklist, svn_ver_equal);
}
Modified: subversion/branches/fsfs-improvements/subversion/svn_private_config.hw
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/svn_private_config.hw?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/svn_private_config.hw (original)
+++ subversion/branches/fsfs-improvements/subversion/svn_private_config.hw Sat Jul 13 14:14:42 2013
@@ -101,6 +101,21 @@
#define dgettext(domain, x) (x)
#endif
+/* compiler hints as supported by MS VC */
+#if defined(SVN_DEBUG)
+# define SVN__FORCE_INLINE
+# define SVN__PREVENT_INLINE
+#elif define(_MSC_VER)
+# define SVN__FORCE_INLINE __forceinline
+# define SVN__PREVENT_INLINE __declspec(noinline)
+#else
+# define SVN__FORCE_INLINE
+# define SVN__PREVENT_INLINE
+#endif
+
+#define SVN__PREDICT_TRUE
+#define SVN__PREDICT_FALSE
+
#endif /* SVN_PRIVATE_CONFIG_HW */
/* Inclusion of Berkeley DB header */
Modified: subversion/branches/fsfs-improvements/subversion/svnadmin/svnadmin.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/svnadmin/svnadmin.c?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/svnadmin/svnadmin.c (original)
+++ subversion/branches/fsfs-improvements/subversion/svnadmin/svnadmin.c Sat Jul 13 14:14:42 2013
@@ -141,7 +141,7 @@ check_lib_versions(void)
};
SVN_VERSION_DEFINE(my_version);
- return svn_ver_check_list(&my_version, checklist);
+ return svn_ver_check_list2(&my_version, checklist, svn_ver_equal);
}
@@ -1810,9 +1810,9 @@ subcommand_info(apr_getopt_t *os, void *
if (fsfs_info->shard_size)
{
const int shard_size = fsfs_info->shard_size;
- const int shards_packed = fsfs_info->min_unpacked_rev / shard_size;
- const int shards_full = (youngest + 1) / shard_size;
- SVN_ERR(svn_cmdline_printf(pool, _("FSFS Shards Packed: %d/%d\n"),
+ const long shards_packed = fsfs_info->min_unpacked_rev / shard_size;
+ const long shards_full = (youngest + 1) / shard_size;
+ SVN_ERR(svn_cmdline_printf(pool, _("FSFS Shards Packed: %ld/%ld\n"),
shards_packed, shards_full));
}
}
Modified: subversion/branches/fsfs-improvements/subversion/svnauth/svnauth.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/svnauth/svnauth.c?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/svnauth/svnauth.c (original)
+++ subversion/branches/fsfs-improvements/subversion/svnauth/svnauth.c Sat Jul 13 14:14:42 2013
@@ -179,7 +179,7 @@ typedef enum svnauth__cert_info_keys {
svnauth__cert_key_not_after,
} svnauth__cert_info_keys;
-svn_token_map_t cert_info_key_map[] = {
+static svn_token_map_t cert_info_key_map[] = {
{ "CN", svnauth__cert_key_cn },
{ "E", svnauth__cert_key_e },
{ "OU", svnauth__cert_key_ou },
@@ -220,6 +220,11 @@ show_cert_info(apr_hash_t *cert_info,
SVN_ERR(svn_cmdline_printf(scratch_pool,
_(" Email Address: %s\n"), value));
break;
+ case svnauth__cert_key_o:
+ SVN_ERR(svn_cmdline_printf(scratch_pool,
+ _(" Organization Name: %s\n"),
+ value));
+ break;
case svnauth__cert_key_ou:
SVN_ERR(svn_cmdline_printf(scratch_pool,
_(" Organizational Unit: %s\n"),
@@ -253,6 +258,9 @@ show_cert_info(apr_hash_t *cert_info,
break;
case SVN_TOKEN_UNKNOWN:
default:
+#ifdef SVN_DEBUG
+ SVN_ERR_MALFUNCTION();
+#endif
break;
}
}
Modified: subversion/branches/fsfs-improvements/subversion/svndumpfilter/svndumpfilter.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/svndumpfilter/svndumpfilter.c?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/svndumpfilter/svndumpfilter.c (original)
+++ subversion/branches/fsfs-improvements/subversion/svndumpfilter/svndumpfilter.c Sat Jul 13 14:14:42 2013
@@ -1176,7 +1176,7 @@ check_lib_versions(void)
};
SVN_VERSION_DEFINE(my_version);
- return svn_ver_check_list(&my_version, checklist);
+ return svn_ver_check_list2(&my_version, checklist, svn_ver_equal);
}
Modified: subversion/branches/fsfs-improvements/subversion/svnlook/svnlook.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/svnlook/svnlook.c?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/svnlook/svnlook.c (original)
+++ subversion/branches/fsfs-improvements/subversion/svnlook/svnlook.c Sat Jul 13 14:14:42 2013
@@ -397,7 +397,7 @@ check_lib_versions(void)
};
SVN_VERSION_DEFINE(my_version);
- return svn_ver_check_list(&my_version, checklist);
+ return svn_ver_check_list2(&my_version, checklist, svn_ver_equal);
}
Modified: subversion/branches/fsfs-improvements/subversion/svnmucc/svnmucc.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/svnmucc/svnmucc.c?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/svnmucc/svnmucc.c (original)
+++ subversion/branches/fsfs-improvements/subversion/svnmucc/svnmucc.c Sat Jul 13 14:14:42 2013
@@ -85,7 +85,7 @@ init(const char *application)
if (svn_cmdline_init(application, stderr))
exit(EXIT_FAILURE);
- err = svn_ver_check_list(&my_version, checklist);
+ err = svn_ver_check_list2(&my_version, checklist, svn_ver_equal);
if (err)
handle_error(err, NULL);
@@ -1145,13 +1145,18 @@ main(int argc, const char **argv)
break;
case 'r':
{
+ const char *saved_arg = arg;
char *digits_end = NULL;
+ while (*arg == 'r')
+ arg++;
base_revision = strtol(arg, &digits_end, 10);
if ((! SVN_IS_VALID_REVNUM(base_revision))
|| (! digits_end)
|| *digits_end)
- handle_error(svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR,
- NULL, "Invalid revision number"),
+ handle_error(svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR,
+ NULL,
+ _("Invalid revision number '%s'"),
+ saved_arg),
pool);
}
break;
Modified: subversion/branches/fsfs-improvements/subversion/svnserve/serve.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/svnserve/serve.c?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/svnserve/serve.c (original)
+++ subversion/branches/fsfs-improvements/subversion/svnserve/serve.c Sat Jul 13 14:14:42 2013
@@ -2092,7 +2092,7 @@ static svn_error_t *log_receiver(void *b
apr_hash_index_t *h;
svn_boolean_t invalid_revnum = FALSE;
const svn_string_t *author, *date, *message;
- apr_uint64_t revprop_count;
+ unsigned revprop_count;
if (log_entry->revision == SVN_INVALID_REVNUM)
{
Modified: subversion/branches/fsfs-improvements/subversion/svnserve/svnserve.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/svnserve/svnserve.c?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/svnserve/svnserve.c (original)
+++ subversion/branches/fsfs-improvements/subversion/svnserve/svnserve.c Sat Jul 13 14:14:42 2013
@@ -465,7 +465,7 @@ check_lib_versions(void)
};
SVN_VERSION_DEFINE(my_version);
- return svn_ver_check_list(&my_version, checklist);
+ return svn_ver_check_list2(&my_version, checklist, svn_ver_equal);
}
Modified: subversion/branches/fsfs-improvements/subversion/svnsync/svnsync.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/svnsync/svnsync.c?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/svnsync/svnsync.c (original)
+++ subversion/branches/fsfs-improvements/subversion/svnsync/svnsync.c Sat Jul 13 14:14:42 2013
@@ -312,7 +312,7 @@ check_lib_versions(void)
};
SVN_VERSION_DEFINE(my_version);
- return svn_ver_check_list(&my_version, checklist);
+ return svn_ver_check_list2(&my_version, checklist, svn_ver_equal);
}
Modified: subversion/branches/fsfs-improvements/subversion/svnversion/svnversion.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/svnversion/svnversion.c?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/svnversion/svnversion.c (original)
+++ subversion/branches/fsfs-improvements/subversion/svnversion/svnversion.c Sat Jul 13 14:14:42 2013
@@ -110,7 +110,7 @@ check_lib_versions(void)
};
SVN_VERSION_DEFINE(my_version);
- return svn_ver_check_list(&my_version, checklist);
+ return svn_ver_check_list2(&my_version, checklist, svn_ver_equal);
}
/*
Modified: subversion/branches/fsfs-improvements/subversion/tests/cmdline/davautocheck.sh
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/tests/cmdline/davautocheck.sh?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/tests/cmdline/davautocheck.sh (original)
+++ subversion/branches/fsfs-improvements/subversion/tests/cmdline/davautocheck.sh Sat Jul 13 14:14:42 2013
@@ -528,7 +528,7 @@ rm "$HTTPD_CFG-copy"
say "HTTPD is good"
if [ $# -eq 1 ] && [ "x$1" = 'x--no-tests' ]; then
- echo "http://localhost:$HTTPD_PORT"
+ echo "http://localhost:$HTTPD_PORT/svn-test-work/repositories"
exit
fi
Modified: subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/io-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/io-test.c?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/io-test.c (original)
+++ subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/io-test.c Sat Jul 13 14:14:42 2013
@@ -26,10 +26,12 @@
#include <stdio.h>
#include <apr.h>
+#include <apr_version.h>
#include "svn_pools.h"
#include "svn_string.h"
#include "private/svn_skel.h"
+#include "private/svn_dep_compat.h"
#include "../svn_test.h"
#include "../svn_test_fs.h"
@@ -507,6 +509,136 @@ read_length_line_shouldnt_loop(apr_pool_
return SVN_NO_ERROR;
}
+/* Move the read pointer in FILE to absolute position OFFSET and align
+ * the read buffer to multiples of BLOCK_SIZE. Use POOL for allocations.
+ */
+static svn_error_t *
+aligned_seek(apr_file_t *file,
+ apr_size_t block_size,
+ apr_size_t offset,
+ apr_pool_t *pool)
+{
+ apr_off_t block_start;
+ apr_off_t current;
+
+ SVN_ERR(svn_io_file_aligned_seek(file, (apr_off_t)block_size,
+ &block_start, (apr_off_t)offset, pool));
+
+ /* block start shall be aligned to multiples of block_size.
+ If it isn't, it must be aligned to APR's default block size(pre-1.3 APR)
+ */
+#if APR_VERSION_AT_LEAST(1,3,0)
+ SVN_TEST_ASSERT(block_start % block_size == 0);
+ SVN_TEST_ASSERT(offset - block_start < block_size);
+#else
+ SVN_TEST_ASSERT(block_start % 0x1000 == 0);
+ SVN_TEST_ASSERT(offset - block_start < 0x1000);
+#endif
+
+ /* we must be at the desired offset */
+ current = 0;
+ SVN_ERR(svn_io_file_seek(file, SEEK_CUR, ¤t, pool));
+ SVN_TEST_ASSERT(current == (apr_off_t)offset);
+
+ return SVN_NO_ERROR;
+}
+
+/* Move the read pointer in FILE to absolute position OFFSET, align the
+ * read buffer to multiples of BLOCK_SIZE and read one byte from that
+ * position. Verify that it matches the CONTENTS for that offset.
+ * Use POOL for allocations.
+ */
+static svn_error_t *
+aligned_read_at(apr_file_t *file,
+ svn_stringbuf_t *contents,
+ apr_size_t block_size,
+ apr_size_t offset,
+ apr_pool_t *pool)
+{
+ char c;
+ SVN_ERR(aligned_seek(file, block_size, offset,pool));
+
+ /* the data we read must match whatever we wrote there */
+ SVN_ERR(svn_io_file_getc(&c, file, pool));
+ SVN_TEST_ASSERT(c == contents->data[offset]);
+
+ return SVN_NO_ERROR;
+}
+
+/* Verify that aligned seek with the given BLOCK_SIZE works for FILE.
+ * CONTENTS is the data expected from FILE. Use POOL for allocations.
+ */
+static svn_error_t *
+aligned_read(apr_file_t *file,
+ svn_stringbuf_t *contents,
+ apr_size_t block_size,
+ apr_pool_t *pool)
+{
+ apr_size_t i;
+ apr_size_t offset = 0;
+ const apr_size_t prime = 78427;
+
+ /* "random" access to different offsets */
+ for (i = 0, offset = prime; i < 10; ++i, offset += prime)
+ SVN_ERR(aligned_read_at(file, contents, block_size,
+ offset % contents->len, pool));
+
+ /* we can seek to EOF */
+ SVN_ERR(aligned_seek(file, contents->len, block_size, pool));
+
+ /* reversed order access to all bytes */
+ for (i = contents->len; i > 0; --i)
+ SVN_ERR(aligned_read_at(file, contents, block_size, i - 1, pool));
+
+ /* forward order access to all bytes */
+ for (i = 0; i < contents->len; ++i)
+ SVN_ERR(aligned_read_at(file, contents, block_size, i, pool));
+
+ return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+aligned_seek_test(apr_pool_t *pool)
+{
+ apr_size_t i;
+ const char *tmp_dir;
+ const char *tmp_file;
+ apr_file_t *f;
+ svn_stringbuf_t *contents;
+ const apr_size_t file_size = 100000;
+
+ /* create a temp folder & schedule it for automatic cleanup */
+
+ SVN_ERR(svn_dirent_get_absolute(&tmp_dir, "aligned_seek_tmp", pool));
+ SVN_ERR(svn_io_remove_dir2(tmp_dir, TRUE, NULL, NULL, pool));
+ SVN_ERR(svn_io_make_dir_recursively(tmp_dir, pool));
+ svn_test_add_dir_cleanup(tmp_dir);
+
+ /* create a temp file with know contents */
+
+ contents = svn_stringbuf_create_ensure(file_size, pool);
+ for (i = 0; i < file_size; ++i)
+ svn_stringbuf_appendbyte(contents, (char)rand());
+
+ SVN_ERR(svn_io_write_unique(&tmp_file, tmp_dir, contents->data,
+ contents->len,
+ svn_io_file_del_on_pool_cleanup, pool));
+
+ /* now, access read data with varying alignment sizes */
+ SVN_ERR(svn_io_file_open(&f, tmp_file, APR_READ | APR_BUFFERED,
+ APR_OS_DEFAULT, pool));
+ SVN_ERR(aligned_read(f, contents, 0x1000, pool)); /* APR default */
+ SVN_ERR(aligned_read(f, contents, 0x8000, pool)); /* "unusual" 32K */
+ SVN_ERR(aligned_read(f, contents, 0x10000, pool)); /* FSX default */
+ SVN_ERR(aligned_read(f, contents, 0x100000, pool)); /* larger than file */
+ SVN_ERR(aligned_read(f, contents, 10001, pool)); /* odd, larger than
+ APR default */
+ SVN_ERR(aligned_read(f, contents, 1003, pool)); /* odd, smaller than
+ APR default */
+
+ return SVN_NO_ERROR;
+}
+
/* The test table. */
@@ -523,5 +655,7 @@ struct svn_test_descriptor_t test_funcs[
"three file content comparison"),
SVN_TEST_PASS2(read_length_line_shouldnt_loop,
"svn_io_read_length_line() shouldn't loop"),
+ SVN_TEST_PASS2(aligned_seek_test,
+ "test aligned seek"),
SVN_TEST_NULL
};
Modified: subversion/branches/fsfs-improvements/subversion/tests/svn_test_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/tests/svn_test_fs.c?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/tests/svn_test_fs.c (original)
+++ subversion/branches/fsfs-improvements/subversion/tests/svn_test_fs.c Sat Jul 13 14:14:42 2013
@@ -542,13 +542,13 @@ svn_test__validate_changes(svn_fs_root_t
if (NULL == svn_hash_gets(actual, svn__apr_hash_index_key(hi)))
return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
"Path '%s' missing from actual changed-paths",
- svn__apr_hash_index_key(hi));
+ (const char *)svn__apr_hash_index_key(hi));
for (hi = apr_hash_first(pool, actual); hi; hi = apr_hash_next(hi))
if (NULL == svn_hash_gets(expected, svn__apr_hash_index_key(hi)))
return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
"Path '%s' missing from expected changed-paths",
- svn__apr_hash_index_key(hi));
+ (const char *)svn__apr_hash_index_key(hi));
return SVN_NO_ERROR;
}
Modified: subversion/branches/fsfs-improvements/tools/dist/backport.pl
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/tools/dist/backport.pl?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/tools/dist/backport.pl (original)
+++ subversion/branches/fsfs-improvements/tools/dist/backport.pl Sat Jul 13 14:14:42 2013
@@ -549,7 +549,9 @@ sub handle_entry {
say STDERR "";
say STDERR $output;
} elsif (!@conflicts and $entry{depends}) {
- warn "No conflicts merging the $entry{header}, but conflicts were "
+ # Not a warning since svn-role may commit the dependency without
+ # also committing the dependent in hte same pass.
+ print "No conflicts merging $entry{id}, but conflicts were "
."expected ('Depends:' header set)\n";
} elsif (@conflicts) {
say "Conflicts found merging $entry{id}, as expected.";
Propchange: subversion/branches/fsfs-improvements/tools/dist/make-deps-tarball.sh
------------------------------------------------------------------------------
Merged /subversion/branches/gtest_addition/tools/dist/make-deps-tarball.sh:r1452117-1502138
Merged /subversion/trunk/tools/dist/make-deps-tarball.sh:r1502253-1502790
Modified: subversion/branches/fsfs-improvements/win-tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/win-tests.py?rev=1502791&r1=1502790&r2=1502791&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/win-tests.py (original)
+++ subversion/branches/fsfs-improvements/win-tests.py Sat Jul 13 14:14:42 2013
@@ -108,12 +108,12 @@ CMDLINE_TEST_SCRIPT_NATIVE_PATH = CMDLIN
sys.path.insert(0, os.path.join('build', 'generator'))
sys.path.insert(1, 'build')
-import gen_win
+import gen_win_dependencies
version_header = os.path.join('subversion', 'include', 'svn_version.h')
cp = configparser.ConfigParser()
cp.read('gen-make.opts')
-gen_obj = gen_win.GeneratorBase('build.conf', version_header,
- cp.items('options'))
+gen_obj = gen_win_dependencies.GenDependenciesBase('build.conf', version_header,
+ cp.items('options'))
all_tests = gen_obj.test_progs + gen_obj.bdb_test_progs \
+ gen_obj.scripts + gen_obj.bdb_scripts
client_tests = [x for x in all_tests if x.startswith(CMDLINE_TEST_SCRIPT_PATH)]
@@ -324,29 +324,21 @@ def locate_libs():
dlls = []
- # look for APR 1.x dll's and use those if found
- apr_test_path = os.path.join(gen_obj.apr_path, objdir, 'libapr-1.dll')
- if os.path.exists(apr_test_path):
- suffix = "-1"
- else:
- suffix = ""
-
- if not cp.has_option('options', '--with-static-apr'):
- dlls.append(os.path.join(gen_obj.apr_path, objdir,
- 'libapr%s.dll' % (suffix)))
- dlls.append(os.path.join(gen_obj.apr_util_path, objdir,
- 'libaprutil%s.dll' % (suffix)))
+ debug = (objdir == 'Debug')
+
+ for lib in gen_obj._libraries.values():
+
+ if debug:
+ name, dir = lib.debug_dll_name, lib.debug_dll_dir
+ else:
+ name, dir = lib.dll_name, lib.dll_dir
+
+ if name and dir:
+ dlls.append(os.path.join(dir, name))
if gen_obj.libintl_path:
dlls.append(os.path.join(gen_obj.libintl_path, 'bin', 'intl3_svn.dll'))
- if gen_obj.bdb_path:
- partial_path = os.path.join(gen_obj.bdb_path, 'bin', gen_obj.bdb_lib)
- if objdir == 'Debug':
- dlls.append(partial_path + 'd.dll')
- else:
- dlls.append(partial_path + '.dll')
-
if gen_obj.sasl_path is not None:
dlls.append(os.path.join(gen_obj.sasl_path, 'lib', 'libsasl.dll'))