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/22 13:22:20 UTC
svn commit: r1505660 [5/5] - in /subversion/branches/fsfs-improvements: ./
build/generator/ build/generator/swig/ build/generator/templates/
notes/http-and-webdav/ subversion/ subversion/bindings/swig/
subversion/bindings/swig/ruby/libsvn_swig_ruby/ su...
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=1505660&r1=1505659&r2=1505660&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/svn_private_config.hw (original)
+++ subversion/branches/fsfs-improvements/subversion/svn_private_config.hw Mon Jul 22 11:22:18 2013
@@ -105,7 +105,7 @@
#if defined(SVN_DEBUG)
# define SVN__FORCE_INLINE
# define SVN__PREVENT_INLINE
-#elif define(_MSC_VER)
+#elif defined(_MSC_VER)
# define SVN__FORCE_INLINE __forceinline
# define SVN__PREVENT_INLINE __declspec(noinline)
#else
@@ -113,8 +113,8 @@
# define SVN__PREVENT_INLINE
#endif
-#define SVN__PREDICT_TRUE
-#define SVN__PREDICT_FALSE
+#define SVN__PREDICT_TRUE(x) (x)
+#define SVN__PREDICT_FALSE(x) (x)
#endif /* SVN_PRIVATE_CONFIG_HW */
Modified: subversion/branches/fsfs-improvements/subversion/tests/cmdline/diff_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/tests/cmdline/diff_tests.py?rev=1505660&r1=1505659&r2=1505660&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/tests/cmdline/diff_tests.py (original)
+++ subversion/branches/fsfs-improvements/subversion/tests/cmdline/diff_tests.py Mon Jul 22 11:22:18 2013
@@ -4580,6 +4580,60 @@ def diff_missing_tree_conflict_victim(sb
expected_output = [ ]
svntest.actions.run_and_verify_svn(None, expected_output, [], 'diff', wc_dir)
+@Issue(4396)
+def diff_local_missing_obstruction(sbox):
+ "diff local missing and obstructed files"
+
+ sbox.build(read_only=True)
+ wc_dir = sbox.wc_dir
+
+ os.unlink(sbox.ospath('iota'))
+ os.unlink(sbox.ospath('A/mu'))
+ os.mkdir(sbox.ospath('A/mu'))
+
+ # Expect no output for missing and obstructed files
+ expected_output = [
+ ]
+ svntest.actions.run_and_verify_svn(None, expected_output, [], 'diff', wc_dir)
+
+ sbox.simple_propset('K', 'V', 'iota', 'A/mu')
+ sbox.simple_append('IotA', 'Content')
+
+ # But do expect a proper property diff
+ expected_output = [
+ 'Index: %s\n' % (sbox.path('A/mu'),),
+ '===================================================================\n',
+ '--- %s\t(revision 1)\n' % (sbox.path('A/mu'),),
+ '+++ %s\t(working copy)\n' % (sbox.path('A/mu'),),
+ '\n',
+ 'Property changes on: %s\n' % (sbox.path('A/mu'),),
+ '___________________________________________________________________\n',
+ 'Added: K\n',
+ '## -0,0 +1 ##\n',
+ '+V\n',
+ '\ No newline at end of property\n',
+ 'Index: %s\n' % (sbox.path('iota'),),
+ '===================================================================\n',
+ '--- %s\t(revision 1)\n' % (sbox.path('iota'),),
+ '+++ %s\t(working copy)\n' % (sbox.path('iota'),),
+ '\n',
+ 'Property changes on: %s\n' % (sbox.path('iota'),),
+ '___________________________________________________________________\n',
+ 'Added: K\n',
+ '## -0,0 +1 ##\n',
+ '+V\n',
+ '\ No newline at end of property\n',
+ ]
+ svntest.actions.run_and_verify_svn(None, expected_output, [], 'diff', wc_dir)
+
+ # Create an external. This produces an error in 1.8.0.
+ sbox.simple_propset('svn:externals', 'AA/BB ' + sbox.repo_url + '/A', '.')
+ sbox.simple_update()
+
+ svntest.actions.run_and_verify_svn(None, svntest.verify.AnyOutput, [],
+ 'diff', wc_dir)
+
+
########################################################################
#Run the tests
@@ -4660,6 +4714,7 @@ test_list = [ None,
diff_dir_replaced_by_dir,
diff_repos_empty_file_addition,
diff_missing_tree_conflict_victim,
+ diff_local_missing_obstruction,
]
if __name__ == '__main__':
Modified: subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/cache-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/cache-test.c?rev=1505660&r1=1505659&r2=1505660&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/cache-test.c (original)
+++ subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/cache-test.c Mon Jul 22 11:22:18 2013
@@ -193,6 +193,7 @@ test_membuffer_cache_basic(apr_pool_t *p
deserialize_revnum,
APR_HASH_KEY_STRING,
"cache:",
+ SVN_CACHE__MEMBUFFER_DEFAULT_PRIORITY,
FALSE,
pool));
Modified: subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/string-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/string-test.c?rev=1505660&r1=1505659&r2=1505660&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/string-test.c (original)
+++ subversion/branches/fsfs-improvements/subversion/tests/libsvn_subr/string-test.c Mon Jul 22 11:22:18 2013
@@ -38,6 +38,7 @@
#include "svn_io.h"
#include "svn_error.h"
+#include "svn_sorts.h" /* MIN / MAX */
#include "svn_string.h" /* This includes <apr_*.h> */
#include "private/svn_string_private.h"
@@ -537,7 +538,42 @@ test24(apr_pool_t *pool)
SVN_TEST_ASSERT(length == 20);
SVN_TEST_STRING_ASSERT(buffer, "18446744073709551615");
- return test_stringbuf_unequal("abc", "abb", pool);
+ return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+sub_test_base36(apr_uint64_t value, const char *base36)
+{
+ char buffer[SVN_INT64_BUFFER_SIZE];
+ apr_size_t length;
+ apr_size_t expected_length = strlen(base36);
+ const char *end = buffer;
+ apr_uint64_t result;
+
+ length = svn__ui64tobase36(buffer, value);
+ SVN_TEST_ASSERT(length == expected_length);
+ SVN_TEST_STRING_ASSERT(buffer, base36);
+
+ result = svn__base36toui64(&end, buffer);
+ SVN_TEST_ASSERT(end - buffer == length);
+ SVN_TEST_ASSERT(result == value);
+
+ result = svn__base36toui64(NULL, buffer);
+ SVN_TEST_ASSERT(result == value);
+
+ return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+test_base36(apr_pool_t *pool)
+{
+ SVN_ERR(sub_test_base36(0, "0"));
+ SVN_ERR(sub_test_base36(1234567890ull, "kf12oi"));
+ SVN_ERR(sub_test_base36(0x7fffffffffffffffull, "1y2p0ij32e8e7"));
+ SVN_ERR(sub_test_base36(0x8000000000000000ull, "1y2p0ij32e8e8"));
+ SVN_ERR(sub_test_base36(0xffffffffffffffffull, "3w5e11264sgsf"));
+
+ return SVN_NO_ERROR;
}
static svn_error_t *
@@ -711,6 +747,85 @@ test_string_similarity(apr_pool_t *pool)
return SVN_NO_ERROR;
}
+static svn_error_t *
+test_string_matching(apr_pool_t *pool)
+{
+ const struct test_data_t
+ {
+ const char *a;
+ const char *b;
+ apr_size_t match_len;
+ apr_size_t rmatch_len;
+ }
+ tests[] =
+ {
+ /* edge cases */
+ {"", "", 0, 0},
+ {"", "x", 0, 0},
+ {"x", "", 0, 0},
+ {"x", "x", 1, 1},
+ {"", "1234567890abcdef", 0, 0},
+ {"1234567890abcdef", "", 0, 0},
+ {"1234567890abcdef", "1234567890abcdef", 16, 16},
+
+ /* left-side matches */
+ {"x", "y", 0, 0},
+ {"ax", "ay", 1, 0},
+ {"ax", "a", 1, 0},
+ {"a", "ay", 1, 0},
+ {"1234567890abcdef", "1234567890abcdeg", 15, 0},
+ {"1234567890abcdef_", "1234567890abcdefg", 16, 0},
+ {"12345678_0abcdef", "1234567890abcdeg", 8, 0},
+ {"1234567890abcdef", "12345678", 8, 0},
+ {"12345678", "1234567890abcdef", 8, 0},
+ {"12345678_0ab", "1234567890abcdef", 8, 0},
+
+ /* right-side matches */
+ {"xa", "ya", 0, 1},
+ {"xa", "a", 0, 1},
+ {"a", "ya", 0, 1},
+ {"_234567890abcdef", "1234567890abcdef", 0, 15},
+ {"_1234567890abcdef", "x1234567890abcdef", 0, 16},
+ {"1234567_90abcdef", "_1234567890abcdef", 0, 8},
+ {"1234567890abcdef", "90abcdef", 0, 8},
+ {"90abcdef", "1234567890abcdef", 0, 8},
+ {"8_0abcdef", "7890abcdef", 0, 7},
+
+ /* two-side matches */
+ {"bxa", "bya", 1, 1},
+ {"bxa", "ba", 1, 1},
+ {"ba", "bya", 1, 1},
+ {"1234567_90abcdef", "1234567890abcdef", 7, 8},
+ {"12345678_90abcdef", "1234567890abcdef", 8, 8},
+ {"12345678_0abcdef", "1234567890abcdef", 8, 7},
+ {"123456_abcdef", "1234sdffdssdf567890abcdef", 4, 6},
+ {"1234567890abcdef", "12345678ef", 8, 2},
+ {"x_234567890abcdef", "x1234567890abcdef", 1, 15},
+ {"1234567890abcdefx", "1234567890abcdex", 15, 1},
+
+ /* list terminator */
+ {NULL}
+ };
+
+ const struct test_data_t *test;
+ for (test = tests; test->a != NULL; ++test)
+ {
+ apr_size_t a_len = strlen(test->a);
+ apr_size_t b_len = strlen(test->b);
+ apr_size_t max_match = MAX(a_len, b_len);
+ apr_size_t match_len
+ = svn_cstring__match_length(test->a, test->b, max_match);
+ apr_size_t rmatch_len
+ = svn_cstring__reverse_match_length(test->a + a_len, test->b + b_len,
+ max_match);
+
+ SVN_TEST_ASSERT(match_len == test->match_len);
+ SVN_TEST_ASSERT(rmatch_len == test->rmatch_len);
+ }
+
+ return SVN_NO_ERROR;
+}
+
/*
====================================================================
If you add a new test to this file, update this array.
@@ -770,6 +885,8 @@ struct svn_test_descriptor_t test_funcs[
"compare stringbufs; same length, different content"),
SVN_TEST_PASS2(test24,
"verify i64toa"),
+ SVN_TEST_PASS2(test_base36,
+ "verify base36 conversion"),
SVN_TEST_PASS2(test_stringbuf_insert,
"check inserting into svn_stringbuf_t"),
SVN_TEST_PASS2(test_stringbuf_remove,
@@ -778,5 +895,7 @@ struct svn_test_descriptor_t test_funcs[
"check replacement in svn_stringbuf_t"),
SVN_TEST_PASS2(test_string_similarity,
"test string similarity scores"),
+ SVN_TEST_PASS2(test_string_matching,
+ "test string matching"),
SVN_TEST_NULL
};
Modified: subversion/branches/fsfs-improvements/tools/buildbot/slaves/win32-SharpSvn/svn-config.cmd.template
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/tools/buildbot/slaves/win32-SharpSvn/svn-config.cmd.template?rev=1505660&r1=1505659&r2=1505660&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/tools/buildbot/slaves/win32-SharpSvn/svn-config.cmd.template (original)
+++ subversion/branches/fsfs-improvements/tools/buildbot/slaves/win32-SharpSvn/svn-config.cmd.template Mon Jul 22 11:22:18 2013
@@ -29,3 +29,22 @@ SET TMP=%TEMP%
IF NOT EXIST "%TESTDIR%\" MKDIR "%TESTDIR%"
IF NOT EXIST "%TEMP%\" MKDIR "%TEMP%"
+
+
+
+
+
+SET SVN_URL=
+SET SVN_RELURL=
+for /F "usebackq tokens=1,* delims=:" %%i IN (`svn info build`) do (
+
+ IF "%%i" == "URL" (
+ SET SVN_URL=%%j
+ ) ELSE IF "%%i" == "Relative URL" (
+ SET SVN_RELURL=%%j
+ )
+)
+SET SVN_URL=%SVN_URL:~1%
+SET SVN_RELURL=%SVN_RELURL:~3%
+SET SVN_SUBBRANCH=%SVN_RELURL:~11%
+SET SVN_BRANCH=%SVN_SUBBRANCH:branches/=%
Modified: subversion/branches/fsfs-improvements/tools/buildbot/slaves/win32-SharpSvn/svntest-bindings.cmd
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/tools/buildbot/slaves/win32-SharpSvn/svntest-bindings.cmd?rev=1505660&r1=1505659&r2=1505660&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/tools/buildbot/slaves/win32-SharpSvn/svntest-bindings.cmd (original)
+++ subversion/branches/fsfs-improvements/tools/buildbot/slaves/win32-SharpSvn/svntest-bindings.cmd Mon Jul 22 11:22:18 2013
@@ -23,9 +23,8 @@ SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDE
CALL ..\svn-config.cmd
IF ERRORLEVEL 1 EXIT /B 1
-svnversion . /1.6.x | find "S" > nul:
-IF ERRORLEVEL 1 (
- ECHO --- Building 1.6.x: Skipping bindings ---
+IF "%SVN_BRANCH% LEQ "1.6.x" (
+ ECHO --- Building 1.6.x or older: Skipping bindings ---
EXIT /B 0
)
@@ -67,9 +66,8 @@ for %%i in (*.dll) do (
)
popd
-svnversion . /1.7.x | find "S" > nul:
-IF ERRORLEVEL 1 (
- ECHO --- Building 1.7.x: Skipping perl tests ---
+IF "%SVN_BRANCH% LSS "1.8." (
+ ECHO --- Building 1.7.x: Skipping perl and ruby tests ---
EXIT /B %result%
)
@@ -82,4 +80,12 @@ IF ERRORLEVEL 1 (
)
popd
+IF "%SVN_BRANCH% LSS "1.9." (
+ ECHO --- Building 1.8.x: Skipping ruby tests ---
+ EXIT /B %result%
+)
+
+echo Not running ruby tests yet
+
+
exit /b %result%
Modified: subversion/branches/fsfs-improvements/tools/buildbot/slaves/win32-SharpSvn/svntest-build-bindings.cmd
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/tools/buildbot/slaves/win32-SharpSvn/svntest-build-bindings.cmd?rev=1505660&r1=1505659&r2=1505660&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/tools/buildbot/slaves/win32-SharpSvn/svntest-build-bindings.cmd (original)
+++ subversion/branches/fsfs-improvements/tools/buildbot/slaves/win32-SharpSvn/svntest-build-bindings.cmd Mon Jul 22 11:22:18 2013
@@ -23,8 +23,7 @@ SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDE
CALL ..\svn-config.cmd
IF ERRORLEVEL 1 EXIT /B 1
-svnversion . /1.6.x | find "S" > nul:
-IF ERRORLEVEL 1 (
+IF "%SVN_BRANCH% LEQ "1.6.x" (
ECHO --- Building 1.6.x: Skipping bindings ---
EXIT /B 0
)
@@ -32,5 +31,9 @@ IF ERRORLEVEL 1 (
msbuild subversion_vcnet.sln /p:Configuration=Debug /p:Platform=win32 /t:__JAVAHL__ /t:__JAVAHL_TESTS__
IF ERRORLEVEL 1 EXIT /B 1
-msbuild subversion_vcnet.sln /p:Configuration=Release /p:Platform=win32 /t:__SWIG_PYTHON__ /t:__SWIG_PERL__
+IF "%SVN_BRANCH%" GTR "1.9." (
+ msbuild subversion_vcnet.sln /p:Configuration=Release /p:Platform=win32 /t:__SWIG_PYTHON__ /t:__SWIG_PERL__ /t:__SWIG_RUBY__
+) ELSE (
+ msbuild subversion_vcnet.sln /p:Configuration=Release /p:Platform=win32 /t:__SWIG_PYTHON__ /t:__SWIG_PERL__
+)
IF ERRORLEVEL 1 EXIT /B 1
Modified: subversion/branches/fsfs-improvements/tools/dev/fsfs-access-map.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/tools/dev/fsfs-access-map.c?rev=1505660&r1=1505659&r2=1505660&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/tools/dev/fsfs-access-map.c (original)
+++ subversion/branches/fsfs-improvements/tools/dev/fsfs-access-map.c Mon Jul 22 11:22:18 2013
@@ -92,6 +92,9 @@ typedef struct handle_info_t
typedef unsigned char byte;
typedef unsigned short word;
+/* an RGB color */
+typedef byte color_t[3];
+
/* global const char * file name -> *file_info_t map */
static apr_hash_t *files = NULL;
@@ -188,6 +191,14 @@ open_file(const char *name, int handle)
else
file->rev_num = -1;
+ /* filter out log/phys index files */
+ if (file->rev_num >= 0)
+ {
+ const char *suffix = name + strlen(name) - 4;
+ if (strcmp(suffix, ".l2p") == 0 || strcmp(suffix, ".p2l") == 0)
+ file->rev_num = -1;
+ }
+
apr_hash_set(files, file->name, APR_HASH_KEY_STRING, file);
}
@@ -275,10 +286,17 @@ parse_line(svn_stringbuf_t *line)
char *return_value = strrchr(line->data, ' ');
char *first_param_end;
apr_int64_t func_return = 0;
+ char *func_start = strchr(line->data, ' ');
if (func_end == NULL || return_value == NULL)
return;
+ if (func_start == NULL || func_start > func_end)
+ func_start = line->data;
+ else
+ while(*func_start == ' ')
+ func_start++;
+
first_param_end = strchr(func_end, ',');
if (first_param_end == NULL)
first_param_end = strchr(func_end, ')');
@@ -295,7 +313,7 @@ parse_line(svn_stringbuf_t *line)
svn_error_clear(svn_cstring_atoi64(&func_return, return_value));
/* process those operations that we care about */
- if (strcmp(line->data, "open") == 0)
+ if (strcmp(func_start, "open") == 0)
{
/* remove double quotes from file name parameter */
*func_end++ = 0;
@@ -303,11 +321,11 @@ parse_line(svn_stringbuf_t *line)
open_file(func_end, (int)func_return);
}
- else if (strcmp(line->data, "read") == 0)
+ else if (strcmp(func_start, "read") == 0)
read_file(atoi(func_end), func_return);
- else if (strcmp(line->data, "lseek") == 0)
+ else if (strcmp(func_start, "lseek") == 0)
seek_file(atoi(func_end), func_return);
- else if (strcmp(line->data, "close") == 0)
+ else if (strcmp(func_start, "close") == 0)
close_file(atoi(func_end));
}
@@ -494,17 +512,82 @@ write_bitmap_header(apr_file_t *file, in
apr_file_write(file, header, &written);
}
-/* write the cluster read map for all files in INFO as BMP image to FILE.
+/* To COLOR, add the fractional value of SOURCE from fractional indexes
+ * SOURCE_START to SOURCE_END and apply the SCALING_FACTOR.
+ */
+static void
+add_sample(color_t color,
+ color_t *source,
+ double source_start,
+ double source_end,
+ double scaling_factor)
+{
+ double factor = (source_end - source_start) / scaling_factor;
+
+ apr_size_t i;
+ for (i = 0; i < sizeof(color_t) / sizeof(*color); ++i)
+ color[i] += (source_end - source_start < 0.5) && source_start > 1.0
+ ? factor * source[(apr_size_t)source_start - 1][i]
+ : factor * source[(apr_size_t)source_start][i];
+}
+
+/* Scale the IN_LEN RGB values from IN to OUT_LEN RGB values in OUT.
+ */
+static void
+scale_line(color_t* out,
+ apr_size_t out_len,
+ color_t *in,
+ apr_size_t in_len)
+{
+ double scaling_factor = (double)(in_len) / (double)(out_len);
+
+ apr_size_t i;
+ memset(out, 0, out_len * sizeof(color_t));
+ for (i = 0; i < out_len; ++i)
+ {
+ color_t color = { 0 };
+
+ double source_start = i * scaling_factor;
+ double source_end = (i + 1) * scaling_factor;
+
+ if ((apr_size_t)source_start == (apr_size_t)source_end)
+ {
+ add_sample(color, in, source_start, source_end, scaling_factor);
+ }
+ else
+ {
+ apr_size_t k;
+ apr_size_t first_sample_end = (apr_size_t)source_start + 1;
+ apr_size_t last_sample_start = (apr_size_t)source_end;
+
+ add_sample(color, in, source_start, first_sample_end, scaling_factor);
+ for (k = first_sample_end; k < last_sample_start; ++k)
+ add_sample(color, in, k, k + 1, scaling_factor);
+
+ add_sample(color, in, last_sample_start, source_end, scaling_factor);
+ }
+
+ memcpy(out[i], color, sizeof(color));
+ }
+}
+
+/* Write the cluster read map for all files in INFO as BMP image to FILE.
+ * If MAX_X is not 0, scale all lines to MAX_X pixels. Use POOL for
+ * allocations.
*/
static void
-write_bitmap(apr_array_header_t *info, apr_file_t *file)
+write_bitmap(apr_array_header_t *info,
+ apr_size_t max_x,
+ apr_file_t *file,
+ apr_pool_t *pool)
{
int ysize = info->nelts;
int xsize = 0;
int x, y;
int row_size;
- int padding;
apr_size_t written;
+ color_t *line, *scaled_line;
+ svn_boolean_t do_scale = max_x > 0;
/* xsize = max cluster number */
for (y = 0; y < ysize; ++y)
@@ -516,37 +599,40 @@ write_bitmap(apr_array_header_t *info, a
xsize = 0x3fff;
if (ysize >= 0x4000)
ysize = 0x3fff;
+ if (max_x == 0)
+ max_x = xsize;
/* rows in BMP files must be aligned to 4 bytes */
- row_size = APR_ALIGN(xsize * 3, 4);
- padding = row_size - xsize * 3;
+ row_size = APR_ALIGN(max_x * sizeof(color_t), 4);
+ /**/
+ line = apr_pcalloc(pool, xsize * sizeof(color_t));
+ scaled_line = apr_pcalloc(pool, row_size);
+
/* write header to file */
- write_bitmap_header(file, xsize, ysize);
+ write_bitmap_header(file, max_x, ysize);
/* write all rows */
for (y = 0; y < ysize; ++y)
{
file_stats_t *file_info = APR_ARRAY_IDX(info, y, file_stats_t *);
+ int block_count = file_info->read_map->nelts;
for (x = 0; x < xsize; ++x)
{
- byte color[3] = { 128, 128, 128 };
- if (x < file_info->read_map->nelts)
+ color_t color = { 128, 128, 128 };
+ if (x < block_count)
{
word count = APR_ARRAY_IDX(file_info->read_map, x, word);
select_color(color, count);
}
- written = sizeof(color);
- apr_file_write(file, color, &written);
+ memcpy(line[x], color, sizeof(color));
}
- if (padding)
- {
- char pad[3] = { 0 };
- written = padding;
- apr_file_write(file, pad, &written);
- }
+ scale_line(scaled_line, max_x, line, block_count ? block_count : 1);
+
+ written = row_size;
+ apr_file_write(file, do_scale ? scaled_line : line, &written);
}
}
@@ -665,7 +751,13 @@ int main(int argc, const char *argv[])
apr_file_open(&file, "access.bmp",
APR_WRITE | APR_CREATE | APR_TRUNCATE | APR_BUFFERED,
APR_OS_DEFAULT, pool);
- write_bitmap(get_rev_files(pool), file);
+ write_bitmap(get_rev_files(pool), 0, file, pool);
+ apr_file_close(file);
+
+ apr_file_open(&file, "access_scaled.bmp",
+ APR_WRITE | APR_CREATE | APR_TRUNCATE | APR_BUFFERED,
+ APR_OS_DEFAULT, pool);
+ write_bitmap(get_rev_files(pool), 1024, file, pool);
apr_file_close(file);
apr_file_open(&file, "scale.bmp",
Modified: subversion/branches/fsfs-improvements/tools/dev/unix-build/Makefile.svn
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/tools/dev/unix-build/Makefile.svn?rev=1505660&r1=1505659&r2=1505660&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/tools/dev/unix-build/Makefile.svn (original)
+++ subversion/branches/fsfs-improvements/tools/dev/unix-build/Makefile.svn Mon Jul 22 11:22:18 2013
@@ -70,7 +70,7 @@ APR_VER = 1.4.6
APR_ICONV_VER = 1.2.1
GNU_ICONV_VER = 1.14
APR_UTIL_VER = 1.4.1
-HTTPD_VER = 2.2.22
+HTTPD_VER = 2.2.25
NEON_VER = 0.29.6
SERF_VER = 1.2.1
SERF_OLD_VER = 0.3.1
@@ -548,15 +548,35 @@ httpd-reset:
httpd-clean:
-(cd $(HTTPD_OBJDIR) && make clean)
+ rm -f $(HTTPD_OBJDIR)/no_ssl_v2.diff
# fetch distfile for httpd
$(DISTDIR)/$(HTTPD_DIST):
cd $(DISTDIR) && $(FETCH_CMD) $(HTTPD_URL)
+$(HTTPD_OBJDIR)/no_ssl_v2.diff:
+ mkdir -p $(dir $@)
+ echo > $@.tmp '--- modules/ssl/ssl_engine_io.c.orig Sat Jul 13 16:49:52 2013'
+ echo >> $@.tmp '+++ modules/ssl/ssl_engine_io.c Sat Jul 13 16:50:10 2013'
+ echo >> $@.tmp '@@ -1079,7 +1079,9 @@'
+ echo >> $@.tmp ' * IPv4 and IPv6 addresses are not permitted".)'
+ echo >> $@.tmp ' */'
+ echo >> $@.tmp ' if (hostname_note &&'
+ echo >> $@.tmp '+#ifndef OPENSSL_NO_SSL2'
+ echo >> $@.tmp ' sc->proxy->protocol != SSL_PROTOCOL_SSLV2 &&'
+ echo >> $@.tmp '+#endif'
+ echo >> $@.tmp ' sc->proxy->protocol != SSL_PROTOCOL_SSLV3 &&'
+ echo >> $@.tmp ' apr_ipsubnet_create(&ip, hostname_note, NULL,'
+ echo >> $@.tmp ' c->pool) != APR_SUCCESS) {'
+ mv -f $@.tmp $@
+
# retrieve httpd
-$(HTTPD_OBJDIR)/.retrieved: $(DISTDIR)/$(HTTPD_DIST)
+$(HTTPD_OBJDIR)/.retrieved: $(DISTDIR)/$(HTTPD_DIST) \
+ $(HTTPD_OBJDIR)/no_ssl_v2.diff
[ -d $(HTTPD_OBJDIR) ] || mkdir -p $(HTTPD_OBJDIR)
tar -C $(SRCDIR) -jxf $(DISTDIR)/$(HTTPD_DIST)
+ cd $(SRCDIR)/httpd-$(HTTPD_VER) && \
+ patch -p0 < $(HTTPD_OBJDIR)/no_ssl_v2.diff
touch $@
# configure httpd
Modified: subversion/branches/fsfs-improvements/tools/dist/backport.pl
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/tools/dist/backport.pl?rev=1505660&r1=1505659&r2=1505660&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/tools/dist/backport.pl (original)
+++ subversion/branches/fsfs-improvements/tools/dist/backport.pl Mon Jul 22 11:22:18 2013
@@ -541,13 +541,14 @@ sub handle_entry {
merge %entry;
my $output = `$SVN status`;
- my (@conflicts) = ($output =~ m#^(?:C|.C|...C).*/(.*)#mg);
+ my (@conflicts) = ($output =~ m#^(?:C...|.C..|...C)...\s(.*)#mg);
if (@conflicts and !$entry{depends}) {
$ERRORS{$entry{id}} //= "Conflicts merging the $entry{header}: "
- . (join ', ', @conflicts);
+ . (join ', ', map m#.*/(.*)#, @conflicts);
say STDERR "Conflicts merging the $entry{header}!";
say STDERR "";
say STDERR $output;
+ system "$SVN diff -- @conflicts";
} elsif (!@conflicts and $entry{depends}) {
# Not a warning since svn-role may commit the dependency without
# also committing the dependent in hte same pass.
@@ -626,6 +627,7 @@ sub handle_entry {
when (/^([+-][01])\s*$/i) {
$votes->{$key} = [$1, \%entry];
say "Your '$1' vote has been recorded." if $VERBOSE;
+ last PROMPT;
}
when (/^e/i) {
my $original = $entry{raw};
@@ -633,9 +635,11 @@ sub handle_entry {
trailing_eol => 2;
$votes->{$key} = ['edit', \%entry] # marker for the 2nd pass
if $original ne $entry{raw};
+ last PROMPT;
}
when (/^N/i) {
$state->{$entry{digest}}++;
+ last PROMPT;
}
when (/^\x20/) {
last PROMPT; # Fall off the end of the given/when block.
Modified: subversion/branches/fsfs-improvements/tools/server-side/fsfs-stats.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/tools/server-side/fsfs-stats.c?rev=1505660&r1=1505659&r2=1505660&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/tools/server-side/fsfs-stats.c (original)
+++ subversion/branches/fsfs-improvements/tools/server-side/fsfs-stats.c Mon Jul 22 11:22:18 2013
@@ -1573,7 +1573,9 @@ read_revisions(fs_fs_t **fs,
svn_cache__get_global_membuffer_cache(),
NULL, NULL,
sizeof(window_cache_key_t),
- "", FALSE, pool));
+ "",
+ SVN_CACHE__MEMBUFFER_DEFAULT_PRIORITY,
+ FALSE, pool));
/* read all packed revs */
for ( revision = start_revision
Modified: subversion/branches/fsfs-improvements/win-tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/win-tests.py?rev=1505660&r1=1505659&r2=1505660&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/win-tests.py (original)
+++ subversion/branches/fsfs-improvements/win-tests.py Mon Jul 22 11:22:18 2013
@@ -84,6 +84,8 @@ def _usage_exit():
print(" --disable-bulk-updates : Disable bulk updates on HTTP server")
print(" --ssl-cert : Path to SSL server certificate to trust.")
print(" --javahl : Run the javahl tests instead of the normal tests")
+ print(" --swig=language : Run the swig perl/python/ruby tests instead of")
+ print(" the normal tests")
print(" --list : print test doc strings only")
print(" --milestone-filter=RE : RE is a regular expression pattern that (when")
print(" used with --list) limits the tests listed to")
@@ -130,7 +132,7 @@ opts, args = my_getopt(sys.argv[1:], 'hr
'httpd-dir=', 'httpd-port=', 'httpd-daemon',
'httpd-server', 'http-short-circuit', 'httpd-no-log',
'disable-http-v2', 'disable-bulk-updates', 'help',
- 'fsfs-packing', 'fsfs-sharding=', 'javahl',
+ 'fsfs-packing', 'fsfs-sharding=', 'javahl', 'swig=',
'list', 'enable-sasl', 'bin=', 'parallel',
'config-file=', 'server-minor-version=', 'log-level=',
'log-to-stdout', 'mode-filter=', 'milestone-filter=',
@@ -156,6 +158,7 @@ http_bulk_updates = True
list_tests = None
milestone_filter = None
test_javahl = None
+test_swig = None
enable_sasl = None
svn_bin = None
parallel = None
@@ -216,6 +219,11 @@ for opt, val in opts:
fsfs_packing = 1
elif opt == '--javahl':
test_javahl = 1
+ elif opt == '--swig':
+ if val not in ['ruby']:
+ sys.stderr.write('Running \'%s\' swig tests not supported (yet).\n'
+ % (val,))
+ test_swig = val
elif opt == '--list':
list_tests = 1
elif opt == '--milestone-filter':
@@ -336,19 +344,13 @@ def locate_libs():
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.sasl_path is not None:
- dlls.append(os.path.join(gen_obj.sasl_path, 'lib', 'libsasl.dll'))
-
for dll in dlls:
- copy_changed_file(dll, abs_objdir)
+ copy_changed_file(dll, abs_builddir)
# Copy the Subversion library DLLs
if not cp.has_option('options', '--disable-shared'):
for svn_dll in svn_dlls:
- copy_changed_file(os.path.join(abs_objdir, svn_dll), abs_objdir)
+ copy_changed_file(os.path.join(abs_objdir, svn_dll), abs_builddir)
# Copy the Apache modules
if run_httpd and cp.has_option('options', '--with-httpd'):
@@ -359,11 +361,11 @@ def locate_libs():
mod_dontdothat_path = os.path.join(abs_objdir, 'tools', 'server-side',
'mod_dontdothat', 'mod_dontdothat.so')
- copy_changed_file(mod_dav_svn_path, abs_objdir)
- copy_changed_file(mod_authz_svn_path, abs_objdir)
- copy_changed_file(mod_dontdothat_path, abs_objdir)
+ copy_changed_file(mod_dav_svn_path, abs_builddir)
+ copy_changed_file(mod_authz_svn_path, abs_builddir)
+ copy_changed_file(mod_dontdothat_path, abs_builddir)
- os.environ['PATH'] = abs_objdir + os.pathsep + os.environ['PATH']
+ os.environ['PATH'] = abs_builddir + os.pathsep + os.environ['PATH']
def fix_case(path):
path = os.path.normpath(path)
@@ -752,7 +754,7 @@ else:
print('Testing %s configuration on %s' % (objdir, repo_loc))
sys.path.insert(0, os.path.join(abs_srcdir, 'build'))
-if not test_javahl:
+if not test_javahl and not test_swig:
import run_tests
if log_to_stdout:
log_file = None
@@ -780,7 +782,7 @@ if not test_javahl:
raise
else:
os.chdir(old_cwd)
-else:
+elif test_javahl:
failed = False
args = (
'java.exe',
@@ -818,6 +820,88 @@ else:
if (r != 0):
print('[Test runner reported failure]')
failed = True
+elif test_swig == 'perl':
+ print('Running Swig Perl tests not supported yet')
+
+ # TODO: Implement something like
+
+ # mkdir "%TESTDIR%\swig\pl-release\SVN"
+ # mkdir "%TESTDIR%\swig\pl-release\auto\SVN"
+ # xcopy subversion\bindings\swig\perl\native\*.pm "%TESTDIR%\swig\pl-release\SVN" > nul:
+ # pushd release\subversion\bindings\swig\perl\native
+ # for %%i in (*.dll) do (
+ # set name=%%i
+ # mkdir "%TESTDIR%\swig\pl-release\auto\SVN\!name:~0,-4!"
+ # xcopy "!name:~0,-4!.*" "%TESTDIR%\swig\pl-release\auto\SVN\!name:~0,-4!" > nul:
+ # xcopy /y "_Core.dll" "%TESTDIR%\swig\pl-release\auto\SVN\!name:~0,-4!" > nul:
+ # )
+ # popd
+ #
+ # SET PERL5LIB=%PERL5LIB%;%TESTDIR%\swig\pl-release;
+ # pushd subversion\bindings\swig\perl\native
+ # perl -MExtUtils::Command::MM -e test_harness() t\*.t
+ # IF ERRORLEVEL 1 (
+ # echo [Perl reported error %ERRORLEVEL%]
+ # SET result=1
+ # )
+ # popd
+
+ failed = False
+elif test_swig == 'python':
+ print('Running Swig Python tests not supported yet')
+
+ # TODO: Implement something like
+
+ # IF EXIST "%TESTDIR%\swig" rmdir /s /q "%TESTDIR%\swig"
+ # mkdir "%TESTDIR%\swig\py-release\libsvn"
+ # mkdir "%TESTDIR%\swig\py-release\svn"
+ #
+ # xcopy "release\subversion\bindings\swig\python\*.pyd" "%TESTDIR%\swig\py-release\libsvn\*.pyd" > nul:
+ # xcopy "release\subversion\bindings\swig\python\libsvn_swig_py\*.dll" "%TESTDIR%\swig\py-release\libsvn\*.dll" > nul:
+ # xcopy "subversion\bindings\swig\python\*.py" "%TESTDIR%\swig\py-release\libsvn\*.py" > nul:
+ # xcopy "subversion\bindings\swig\python\svn\*.py" "%TESTDIR%\swig\py-release\svn\*.py" > nul:
+ #
+ # SET PYTHONPATH=%TESTDIR%\swig\py-release
+ #
+ # python subversion\bindings\swig\python\tests\run_all.py
+ # IF ERRORLEVEL 1 (
+ # echo [Python reported error %ERRORLEVEL%]
+ # SET result=1
+ # )
+
+ failed = False
+elif test_swig == 'ruby':
+ failed = False
+
+ if 'ruby' not in gen_obj._libraries:
+ print('Ruby not found. Skipping Ruby tests')
+ else:
+ print('Running Swig Ruby Tests')
+ ruby_lib = gen_obj._libraries['ruby']
+
+ ruby_exe = 'ruby.exe'
+ ruby_subdir = os.path.join('subversion', 'bindings', 'swig', 'ruby')
+ ruby_args = [
+ '-I', os.path.join(abs_srcdir, ruby_subdir),
+ os.path.join(abs_srcdir, ruby_subdir, 'test', 'run-test.rb'),
+ '--verbose'
+ ]
+
+ old_cwd = os.getcwd()
+ try:
+ os.chdir(ruby_subdir)
+
+ os.environ["BUILD_TYPE"] = objdir
+ r = subprocess.call([ruby_exe] + ruby_args)
+ finally:
+ os.chdir(old_cwd)
+
+ sys.stdout.flush()
+ sys.stderr.flush()
+ if (r != 0):
+ print()
+ print('[Test runner reported failure]')
+ failed = True
# Stop service daemon, if any
if daemon: