Modified: subversion/branches/svn-patch-improvements/subversion/tests/libsvn_subr/mergeinfo-test.c URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/tests/libsvn_subr/mergeinfo-test.c?rev=931980&r1=931979&r2=931980&view=diff ============================================================================== --- subversion/branches/svn-patch-improvements/subversion/tests/libsvn_subr/mergeinfo-test.c (original) +++ subversion/branches/svn-patch-improvements/subversion/tests/libsvn_subr/mergeinfo-test.c Thu Apr 8 15:52:53 2010 @@ -1559,6 +1559,99 @@ test_rangelist_diff(apr_pool_t *pool) } return err; } + + +/* Test data structure for test_remove_prefix_from_catalog(). */ +struct catalog_bits +{ + const char *orig_path; + const char *new_path; + const char *mergeinfo; +}; + + +/* Helper for test_remove_prefix_from_catalog(). */ +static svn_error_t * +remove_prefix_helper(struct catalog_bits *test_data, + const char *prefix_path, + apr_pool_t *pool) +{ + svn_mergeinfo_catalog_t in_catalog, out_catalog, exp_out_catalog; + apr_hash_index_t *hi; + int i = 0; + + in_catalog = apr_hash_make(pool); + exp_out_catalog = apr_hash_make(pool); + while (test_data[i].orig_path) + { + struct catalog_bits data = test_data[i]; + const char *orig_path = apr_pstrdup(pool, data.orig_path); + const char *new_path = apr_pstrdup(pool, data.new_path); + svn_mergeinfo_t mergeinfo; + SVN_ERR(svn_mergeinfo_parse(&mergeinfo, data.mergeinfo, pool)); + apr_hash_set(in_catalog, orig_path, APR_HASH_KEY_STRING, mergeinfo); + apr_hash_set(exp_out_catalog, new_path, APR_HASH_KEY_STRING, mergeinfo); + i++; + } + SVN_ERR(svn_mergeinfo__remove_prefix_from_catalog(&out_catalog, in_catalog, + prefix_path, pool)); + if (apr_hash_count(exp_out_catalog) != apr_hash_count(out_catalog)) + return svn_error_create(SVN_ERR_TEST_FAILED, 0, + "Got unexpected number of catalog entries"); + for (hi = apr_hash_first(pool, out_catalog); hi; hi = apr_hash_next(hi)) + { + const void *path; + apr_ssize_t path_len; + void *out_mergeinfo, *exp_out_mergeinfo; + apr_hash_this(hi, &path, &path_len, &out_mergeinfo); + exp_out_mergeinfo = apr_hash_get(exp_out_catalog, path, path_len); + if (! exp_out_mergeinfo) + return svn_error_createf(SVN_ERR_TEST_FAILED, 0, + "Found unexpected key '%s' in catalog", + (const char *)path); + if (exp_out_mergeinfo != out_mergeinfo) + return svn_error_create(SVN_ERR_TEST_FAILED, 0, + "Detected value tampering in catalog"); + } + return SVN_NO_ERROR; +} + +static svn_error_t * +test_remove_prefix_from_catalog(apr_pool_t *pool) +{ + apr_pool_t *subpool = svn_pool_create(pool); + + /* For testing the remove of the prefix "/trunk" */ + struct catalog_bits test_data_1[] = + { + { "/trunk", "", "/A:1" }, + { "/trunk/foo", "foo", "/A/foo:1,3*" }, + { "/trunk/foo/bar", "foo/bar", "/A/foo:1-4" }, + { "/trunk/baz", "baz", "/A/baz:2" }, + { NULL, NULL, NULL } + }; + + /* For testing the remove of the prefix "/" */ + struct catalog_bits test_data_2[] = + { + { "/", "", "/:2" }, + { "/trunk", "trunk", "/A:1" }, + { "/trunk/foo", "trunk/foo", "/A/foo:1,3*" }, + { "/trunk/foo/bar", "trunk/foo/bar", "/A/foo:1-4" }, + { "/trunk/baz", "trunk/baz", "/A/baz:2" }, + { NULL, NULL, NULL } + }; + + svn_pool_clear(subpool); + SVN_ERR(remove_prefix_helper(test_data_1, "/trunk", subpool)); + + svn_pool_clear(subpool); + SVN_ERR(remove_prefix_helper(test_data_2, "/", subpool)); + + svn_pool_destroy(subpool); + return SVN_NO_ERROR; +} + /* The test table. */ @@ -1599,5 +1692,7 @@ struct svn_test_descriptor_t test_funcs[ "merge of rangelists"), SVN_TEST_PASS2(test_rangelist_diff, "diff of rangelists"), + SVN_TEST_PASS2(test_remove_prefix_from_catalog, + "removal of prefix paths from catalog keys"), SVN_TEST_NULL };
Modified: subversion/branches/svn-patch-improvements/subversion/tests/svn_test_fs.c URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/tests/svn_test_fs.c?rev=931980&r1=931979&r2=931980&view=diff ============================================================================== --- subversion/branches/svn-patch-improvements/subversion/tests/svn_test_fs.c (original) +++ subversion/branches/svn-patch-improvements/subversion/tests/svn_test_fs.c Thu Apr 8 15:52:53 2010 @@ -88,7 +88,10 @@ make_fs_config(const char *fs_type, fs_type); if (server_minor_version) { - if (server_minor_version == 5) + if (server_minor_version == 6) + apr_hash_set(fs_config, SVN_FS_CONFIG_PRE_1_7_COMPATIBLE, + APR_HASH_KEY_STRING, "1"); + else if (server_minor_version == 5) apr_hash_set(fs_config, SVN_FS_CONFIG_PRE_1_6_COMPATIBLE, APR_HASH_KEY_STRING, "1"); else if (server_minor_version == 4) Modified: subversion/branches/svn-patch-improvements/subversion/tests/svn_test_main.c URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/tests/svn_test_main.c?rev=931980&r1=931979&r2=931980&view=diff ============================================================================== --- subversion/branches/svn-patch-improvements/subversion/tests/svn_test_main.c (original) +++ subversion/branches/svn-patch-improvements/subversion/tests/svn_test_main.c Thu Apr 8 15:52:53 2010 @@ -80,7 +80,8 @@ static const apr_getopt_option_t cl_opti {"verbose", verbose_opt, 0, N_("print extra information")}, {"server-minor-version", server_minor_version_opt, 1, - N_("Set the minor version for the server ('4' or '5')")}, + N_("set the minor version for the server ('3', '4',\n" + "'5', or '6')")}, {"quiet", quiet_opt, 0, N_("print only unexpected results")}, {0, 0, 0, 0} @@ -362,7 +363,7 @@ main(int argc, const char *argv[]) exit(1); } if ((opts.server_minor_version < 3) - || (opts.server_minor_version > 5)) + || (opts.server_minor_version > 6)) { fprintf(stderr, "FAIL: Invalid minor version given\n"); exit(1); Propchange: subversion/branches/svn-patch-improvements/tools/buildbot/slaves/win32-SharpSvn/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Thu Apr 8 15:52:53 2010 @@ -0,0 +1,3 @@ +build +deps +svn-config.cmd Modified: subversion/branches/svn-patch-improvements/tools/buildbot/slaves/win32-SharpSvn/svn-config.cmd.template URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/tools/buildbot/slaves/win32-SharpSvn/svn-config.cmd.template?rev=931980&r1=931979&r2=931980&view=diff ============================================================================== --- subversion/branches/svn-patch-improvements/tools/buildbot/slaves/win32-SharpSvn/svn-config.cmd.template (original) +++ subversion/branches/svn-patch-improvements/tools/buildbot/slaves/win32-SharpSvn/svn-config.cmd.template Thu Apr 8 15:52:53 2010 @@ -1,4 +1,23 @@ @echo off +REM ================================================================ +REM Licensed to the Apache Software Foundation (ASF) under one +REM or more contributor license agreements. See the NOTICE file +REM distributed with this work for additional information +REM regarding copyright ownership. The ASF licenses this file +REM to you under the Apache License, Version 2.0 (the +REM "License"); you may not use this file except in compliance +REM with the License. You may obtain a copy of the License at +REM +REM http://www.apache.org/licenses/LICENSE-2.0 +REM +REM Unless required by applicable law or agreed to in writing, +REM software distributed under the License is distributed on an +REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +REM KIND, either express or implied. See the License for the +REM specific language governing permissions and limitations +REM under the License. +REM ================================================================ + CALL "c:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86 SET TESTDIR=E:\Full Modified: subversion/branches/svn-patch-improvements/tools/buildbot/slaves/win32-SharpSvn/svntest-bindings.cmd URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/tools/buildbot/slaves/win32-SharpSvn/svntest-bindings.cmd?rev=931980&r1=931979&r2=931980&view=diff ============================================================================== --- subversion/branches/svn-patch-improvements/tools/buildbot/slaves/win32-SharpSvn/svntest-bindings.cmd (original) +++ subversion/branches/svn-patch-improvements/tools/buildbot/slaves/win32-SharpSvn/svntest-bindings.cmd Thu Apr 8 15:52:53 2010 @@ -1,9 +1,25 @@ @echo off -SETLOCAL ENABLEEXTENSIONS +REM ================================================================ +REM Licensed to the Apache Software Foundation (ASF) under one +REM or more contributor license agreements. See the NOTICE file +REM distributed with this work for additional information +REM regarding copyright ownership. The ASF licenses this file +REM to you under the Apache License, Version 2.0 (the +REM "License"); you may not use this file except in compliance +REM with the License. You may obtain a copy of the License at +REM +REM http://www.apache.org/licenses/LICENSE-2.0 +REM +REM Unless required by applicable law or agreed to in writing, +REM software distributed under the License is distributed on an +REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +REM KIND, either express or implied. See the License for the +REM specific language governing permissions and limitations +REM under the License. +REM ================================================================ + +SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION CALL ..\svn-config.cmd IF ERRORLEVEL 1 EXIT /B 1 - - - Modified: subversion/branches/svn-patch-improvements/tools/buildbot/slaves/win32-SharpSvn/svntest-build-bindings.cmd URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/tools/buildbot/slaves/win32-SharpSvn/svntest-build-bindings.cmd?rev=931980&r1=931979&r2=931980&view=diff ============================================================================== --- subversion/branches/svn-patch-improvements/tools/buildbot/slaves/win32-SharpSvn/svntest-build-bindings.cmd (original) +++ subversion/branches/svn-patch-improvements/tools/buildbot/slaves/win32-SharpSvn/svntest-build-bindings.cmd Thu Apr 8 15:52:53 2010 @@ -1,4 +1,23 @@ @echo off +REM ================================================================ +REM Licensed to the Apache Software Foundation (ASF) under one +REM or more contributor license agreements. See the NOTICE file +REM distributed with this work for additional information +REM regarding copyright ownership. The ASF licenses this file +REM to you under the Apache License, Version 2.0 (the +REM "License"); you may not use this file except in compliance +REM with the License. You may obtain a copy of the License at +REM +REM http://www.apache.org/licenses/LICENSE-2.0 +REM +REM Unless required by applicable law or agreed to in writing, +REM software distributed under the License is distributed on an +REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +REM KIND, either express or implied. See the License for the +REM specific language governing permissions and limitations +REM under the License. +REM ================================================================ + SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION CALL ..\svn-config.cmd Modified: subversion/branches/svn-patch-improvements/tools/buildbot/slaves/win32-SharpSvn/svntest-build.cmd URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/tools/buildbot/slaves/win32-SharpSvn/svntest-build.cmd?rev=931980&r1=931979&r2=931980&view=diff ============================================================================== --- subversion/branches/svn-patch-improvements/tools/buildbot/slaves/win32-SharpSvn/svntest-build.cmd (original) +++ subversion/branches/svn-patch-improvements/tools/buildbot/slaves/win32-SharpSvn/svntest-build.cmd Thu Apr 8 15:52:53 2010 @@ -1,4 +1,23 @@ @echo off +REM ================================================================ +REM Licensed to the Apache Software Foundation (ASF) under one +REM or more contributor license agreements. See the NOTICE file +REM distributed with this work for additional information +REM regarding copyright ownership. The ASF licenses this file +REM to you under the Apache License, Version 2.0 (the +REM "License"); you may not use this file except in compliance +REM with the License. You may obtain a copy of the License at +REM +REM http://www.apache.org/licenses/LICENSE-2.0 +REM +REM Unless required by applicable law or agreed to in writing, +REM software distributed under the License is distributed on an +REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +REM KIND, either express or implied. See the License for the +REM specific language governing permissions and limitations +REM under the License. +REM ================================================================ + SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION CALL ..\svn-config.cmd @@ -12,4 +31,4 @@ IF ERRORLEVEL 1 EXIT /B 1 POPD msbuild subversion_vcnet.sln /p:Configuration=Debug /p:Platform=win32 /t:__ALL_TESTS__ -IF ERRORLEVEL 1 EXIT /B 1 \ No newline at end of file +IF ERRORLEVEL 1 EXIT /B 1 Modified: subversion/branches/svn-patch-improvements/tools/buildbot/slaves/win32-SharpSvn/svntest-cleanup.cmd URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/tools/buildbot/slaves/win32-SharpSvn/svntest-cleanup.cmd?rev=931980&r1=931979&r2=931980&view=diff ============================================================================== --- subversion/branches/svn-patch-improvements/tools/buildbot/slaves/win32-SharpSvn/svntest-cleanup.cmd (original) +++ subversion/branches/svn-patch-improvements/tools/buildbot/slaves/win32-SharpSvn/svntest-cleanup.cmd Thu Apr 8 15:52:53 2010 @@ -1,5 +1,25 @@ @echo off -SETLOCAL ENABLEEXTENSIONS +REM ================================================================ +REM Licensed to the Apache Software Foundation (ASF) under one +REM or more contributor license agreements. See the NOTICE file +REM distributed with this work for additional information +REM regarding copyright ownership. The ASF licenses this file +REM to you under the Apache License, Version 2.0 (the +REM "License"); you may not use this file except in compliance +REM with the License. You may obtain a copy of the License at +REM +REM http://www.apache.org/licenses/LICENSE-2.0 +REM +REM Unless required by applicable law or agreed to in writing, +REM software distributed under the License is distributed on an +REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +REM KIND, either express or implied. See the License for the +REM specific language governing permissions and limitations +REM under the License. +REM ================================================================ + +SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION + CALL ..\svn-config.cmd IF NOT EXIST "..\deps\" MKDIR "..\deps" @@ -13,6 +33,7 @@ IF NOT EXIST "imports\" ( IF NOT EXIST build\imports.done ( copy /y imports\dev-default.build default.build nant build %NANTARGS% + del release\bin\*svn* IF NOT ERRORLEVEL 1 ( echo. > build\imports.done ) Modified: subversion/branches/svn-patch-improvements/tools/buildbot/slaves/win32-SharpSvn/svntest-template.cmd URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/tools/buildbot/slaves/win32-SharpSvn/svntest-template.cmd?rev=931980&r1=931979&r2=931980&view=diff ============================================================================== --- subversion/branches/svn-patch-improvements/tools/buildbot/slaves/win32-SharpSvn/svntest-template.cmd (original) +++ subversion/branches/svn-patch-improvements/tools/buildbot/slaves/win32-SharpSvn/svntest-template.cmd Thu Apr 8 15:52:53 2010 @@ -1,9 +1,24 @@ @echo off -SETLOCAL ENABLEEXTENSIONS +REM ================================================================ +REM Licensed to the Apache Software Foundation (ASF) under one +REM or more contributor license agreements. See the NOTICE file +REM distributed with this work for additional information +REM regarding copyright ownership. The ASF licenses this file +REM to you under the Apache License, Version 2.0 (the +REM "License"); you may not use this file except in compliance +REM with the License. You may obtain a copy of the License at +REM +REM http://www.apache.org/licenses/LICENSE-2.0 +REM +REM Unless required by applicable law or agreed to in writing, +REM software distributed under the License is distributed on an +REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +REM KIND, either express or implied. See the License for the +REM specific language governing permissions and limitations +REM under the License. +REM ================================================================ + +SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION CALL ..\svn-config.cmd IF ERRORLEVEL 1 EXIT /B 1 - - - - Modified: subversion/branches/svn-patch-improvements/tools/buildbot/slaves/win32-SharpSvn/svntest-test.cmd URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/tools/buildbot/slaves/win32-SharpSvn/svntest-test.cmd?rev=931980&r1=931979&r2=931980&view=diff ============================================================================== --- subversion/branches/svn-patch-improvements/tools/buildbot/slaves/win32-SharpSvn/svntest-test.cmd (original) +++ subversion/branches/svn-patch-improvements/tools/buildbot/slaves/win32-SharpSvn/svntest-test.cmd Thu Apr 8 15:52:53 2010 @@ -1,4 +1,23 @@ -...@echo off +...@echo off +REM ================================================================ +REM Licensed to the Apache Software Foundation (ASF) under one +REM or more contributor license agreements. See the NOTICE file +REM distributed with this work for additional information +REM regarding copyright ownership. The ASF licenses this file +REM to you under the Apache License, Version 2.0 (the +REM "License"); you may not use this file except in compliance +REM with the License. You may obtain a copy of the License at +REM +REM http://www.apache.org/licenses/LICENSE-2.0 +REM +REM Unless required by applicable law or agreed to in writing, +REM software distributed under the License is distributed on an +REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +REM KIND, either express or implied. See the License for the +REM specific language governing permissions and limitations +REM under the License. +REM ================================================================ + SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION CALL ..\svn-config.cmd @@ -34,6 +53,9 @@ IF "%1" == "-r" ( ) ELSE IF "%1" == "serf" ( SET SERF=1 SHIFT +) ELSE IF "%1" == "neon" ( + SET NEON=1 + SHIFT ) ELSE ( SET ARGS=!ARGS! -t %1 SHIFT @@ -43,26 +65,33 @@ IF NOT "%1" == "" GOTO next IF NOT EXIST "%TESTDIR%\bin" MKDIR "%TESTDIR%\bin" -xcopy /y /i ..\deps\release\bin\* "%TESTDIR%\bin" +xcopy /y /i ..\deps\release\bin\*.dll "%TESTDIR%\bin" PATH %TESTDIR%\bin;%PATH% -if "%LOCAL%+%FSFS%" == "1+1" ( +IF "%LOCAL%+%FSFS%" == "1+1" ( echo win-tests.py -c %PARALLEL% %MODE% -f fsfs %ARGS% "%TESTDIR%\tests" - win-tests.py -c %PARALLEL% -v %MODE% -f fsfs %ARGS% "%TESTDIR%\tests" + win-tests.py -c %PARALLEL% %MODE% -f fsfs %ARGS% "%TESTDIR%\tests" IF ERRORLEVEL 1 EXIT /B 1 ) -if "%SVN%+%FSFS%" == "1+1" ( +IF "%SVN%+%FSFS%" == "1+1" ( taskkill /im svnserve.exe /f 2> nul: echo win-tests.py -c %PARALLEL% %MODE% -f fsfs -u svn://localhost %ARGS% "%TESTDIR%\tests" - win-tests.py -c %PARALLEL% -v %MODE% -f fsfs -u svn://localhost %ARGS% "%TESTDIR%\tests" + win-tests.py -c %PARALLEL% %MODE% -f fsfs -u svn://localhost %ARGS% "%TESTDIR%\tests" + IF ERRORLEVEL 1 EXIT /B 1 +) + +IF "%SERF%+%FSFS%" == "1+1" ( + taskkill /im httpd.exe /f 2> nul: + echo win-tests.py -c %PARALLEL% %MODE% -f fsfs --http-library serf --httpd-dir "%CD%\..\deps\release\httpd" --httpd-port %TESTPORT% -u http://localhost:%TESTPORT% %ARGS% "%TESTDIR%\tests" + win-tests.py -c %PARALLEL% %MODE% -f fsfs --http-library serf --httpd-dir "%CD%\..\deps\release\httpd" --httpd-port %TESTPORT% -u http://localhost:%TESTPORT% %ARGS% "%TESTDIR%\tests" IF ERRORLEVEL 1 EXIT /B 1 ) -if "%SERF%+%FSFS%" == "1+1" ( +IF "%NEON%+%FSFS%" == "1+1" ( taskkill /im httpd.exe /f 2> nul: - echo win-tests.py -c %PARALLEL% %MODE% -f fsfs --httpd-dir "%CD%\..\deps\release\httpd" --httpd-port %TESTPORT% -u http://localhost:%TESTPORT% %ARGS% "%TESTDIR%\tests" - win-tests.py -c %PARALLEL% %MODE% -f fsfs --httpd-dir "%CD%\..\deps\release\httpd" --httpd-port %TESTPORT% -u http://localhost:%TESTPORT% %ARGS% "%TESTDIR%\tests" + echo win-tests.py -c %PARALLEL% %MODE% -f fsfs --http-library neon --httpd-dir "%CD%\..\deps\release\httpd" --httpd-port %TESTPORT% -u http://localhost:%TESTPORT% %ARGS% "%TESTDIR%\tests" + win-tests.py -c %PARALLEL% %MODE% -f fsfs --http-library neon --httpd-dir "%CD%\..\deps\release\httpd" --httpd-port %TESTPORT% -u http://localhost:%TESTPORT% %ARGS% "%TESTDIR%\tests" IF ERRORLEVEL 1 EXIT /B 1 )
