Joe Swatosh <joe.swatosh@gmail.com>


Found Patch Review Suggested
r23999, r23835, r23834, r22887, r22879 r24398, r24140, r24066, r24059, r24057, r23783, r23318, r23066, r22956, r22928, r22926, r22922, r22921, r22909, r22854 r24116 r24495, r24116, r23924, r23327, r23147, r23088, r23031, r22923, r22848, r22846, r22837, r22836, r22823, r22821, r22819, r22818

r24495 | kou | 2007-04-07 07:16:22 -0500 (Sat, 07 Apr 2007)

* build/win32/make_gem.rb: Add required_ruby_version attribute.

Suggested by: Joe Swatosh


r24398 | kou | 2007-04-03 21:37:11 -0500 (Tue, 03 Apr 2007)

Fix EOL related tests on Windows.

* subversion/bindings/swig/ruby/test/test_wc.rb
  (SvnWcTest#assert_translated_eol) Removed if windows? test.
  (SvnWcTest#assert_translated_keyword) Open files for binary access.

* subversion/bindings/swig/ruby/svn/util.rb
  (Svn::Util.filename_to_temp_file) Open file for binary access.

Patch by: Joe Swatosh


r24140 | kou | 2007-03-26 05:24:35 -0500 (Mon, 26 Mar 2007)

* subversion/bindings/swig/ruby/test/windows_util.rb
  (SvnTestUtils::Windows::SetupEnvironement#add_depended_dll_path_to_dll_wrapper_util):
  Change recommended sqlite directory structure.

Patch by: Joe Swatosh


r24116 | vgeorgescu | 2007-03-25 10:59:29 -0500 (Sun, 25 Mar 2007)

When running the test suite on Windows, copy all library dependency DLLs to the
root of the build tree (currently we only copy APR & friends, and require all
others to be somewhere in PATH).

To accomplish this, move some of the path detection and initialization
logic from WinGeneratorBase to GeneratorBase, which we already use in
win-tests.py for other reasons.

* build/generator/gen_win.py
  (GeneratorBase.parse_options, GeneratorBase._find_bdb): Moved from
   WinGeneratorBase, minus the parts that print to stderr.
  (GeneratorBase.__init__): Call parse_options() and _find_bdb().
  (WinGeneratorBase.__init__): Move the parent class initialization to the
   start of the function. Check some of the values that we need and print
   warnings or errors if they are not found.

* win-tests.py
  Read the options from 'gen-make.opts', use them when creating gen_obj (an
  instance of GeneratorBase).
  (copy_changed_file): Print a human-friendly error message if the file isn't
   found.
  (_locate_libs): Remove the get() function. Use gen_obj's attributes to
   determine which DLLs should be copied and from where.

Suggested by: Joe Swatosh <joe.swatosh@gmail.com>
              djh
Review by: Joe Swatosh <joe.swatosh@gmail.com>
           djh


r24066 | kou | 2007-03-23 21:00:07 -0500 (Fri, 23 Mar 2007)

Follow changes by merging merge-tracking branch.

* subversion/bindings/swig/ruby/test/windows_util.rb
  (SvnTestUtil::Windows::SetupEnvironment#add_apr_dll_path_to_dll_wrapper_util): 
  Rename to ..
  (SvnTestUtil::Windows::SetupEnvironment#add_depended_dll_path_to_dll_wrapper_util): 
  ... this. And add bdb and sqlite directoreis to PATH.

Patch by: Joe Swatosh


r24059 | dlr | 2007-03-23 14:26:18 -0500 (Fri, 23 Mar 2007)

SWIG: Assure config paths don't include any "\n" characters.

* subversion/bindings/swig/ruby/test/windows_util.rb
 (SvnTestUtil::Windows::SetupEnvironment#add_apr_dll_path_to_dll_wrapper_util):
  Trim any trailing newlines from configuration read from gen-make.opts.

Patch by: Joe Swatosh <joe.swatosh@gmail.com>


r24057 | dlr | 2007-03-23 14:13:15 -0500 (Fri, 23 Mar 2007)

SWIG: Add sqlite3 dependency for testing the Ruby Windows bindings.

*  subversion/bindings/swig/ruby/test/windows_util.rb
  (SvnTestUtil::Windows::Svnserve#setup_svnserve): Add sqlite3.dll to
   the targets needed to start svnserve.

Patch by: Joe Swatosh <joe.swatosh@gmail.com>


r23999 | kou | 2007-03-22 02:11:24 -0500 (Thu, 22 Mar 2007)

Follow-up r23955 and r23956.

* subversion/bindings/swig/ruby/svn/client.rb:
  - Remove needless require and end.
  (Svn::Clienct::Context): Fix typos.

Found by: Joe Swatosh


r23924 | kou | 2007-03-20 04:18:34 -0500 (Tue, 20 Mar 2007)

Remove dependency on win32/service for the Ruby bindings test.

* subversion/bindings/swig/ruby/test/windows_util.rb
  (SvnTestUtil::Windows::Svnserve#setup_svnserve):
  - Use sc.exe instead of Win32::Service.
  - Restart svnserve each time.
  (SvnTestUtil::Windows::Svnserve#teardown_svnserve): Stop svnserve
  each time.
  (SvnTestUtil::Windows::Svnserve.escape_value,
   SvnTestUtil::Windows::Svnserve#service_control,
   SvnTestUtil::Windows::Svnserve#grant_everyone_full_access,
   SvnTestUtil::Windows::Svnserve#service_exists?): New method.
  (SvnTestUtil::Windows::SetupEnvironment#setup_test_environment):
  Detect a folder where svnserve.exe exists to find svnserve.exe in
  SvnTestUtil::Windows::Svnserve#setup_svnserve.

Suggested by: Joe Swatosh


r23835 | kou | 2007-03-15 01:58:13 -0500 (Thu, 15 Mar 2007)

Fix the Ruby bindings' test failures related line break on Windows.

* subversion/bindings/swig/ruby/test/test_fs.rb
  (SvnFsTest#test_delta): Normalize line breaks of diff inputs and
  check sum targets because they are wrote to files in text mode.

Found by: Joe Swatosh   


r23834 | kou | 2007-03-15 01:52:12 -0500 (Thu, 15 Mar 2007)

Fix the Ruby bindings test problem that temporary directory can't be
removed at exit because DLLs are still loaded.

* subversion/bindings/swig/ruby/test/windows_util.rb
  (SvnTestUtil::Windows::SetupEnvironment#setup_test_environment):
  Use PATH environment variable instead of copying DLL.

Found by: Joe Swatosh


r23783 | kou | 2007-03-12 07:15:43 -0500 (Mon, 12 Mar 2007)

Fix the Ruby bindings' test failures related line break on Windows.

* subversion/bindings/swig/ruby/test/test_client.rb
  (SvnClientTest#test_merge,
   SvnClientTest#test_merge_peg,
   SvnClientTest#test_cat,
   SvnClientTest#test_switch,
   SvnClientTest#test_authentication,
   SvnClientTest#test_simple_provider):
  Call normalize_line_break on the expected result for various tests.

Patch by: Joe Swatosh


r23327 | kou | 2007-02-02 09:07:04 -0600 (Fri, 02 Feb 2007)

* subversion/bindings/swig/ruby/test/windows_util.rb: Set svn:eol-style
  for Windows.

Suggested by: Joe Swatosh


r23318 | kou | 2007-02-01 05:27:16 -0600 (Thu, 01 Feb 2007)

Support running tests for the Ruby bindings on Windows.

* subversion/bindings/swig/ruby/test/windows_util.rb
  (SvnTestUtil::Windows::Svnserve#setup_svnserve,
   SvnTestUtil::Windows::Svnserve#teardown_svnserve,
   SvnTestUtil::Windows::Svnserve#add_pre_revprop_change_hook
   SvnTestUtil::Windows::SetupEnvironment#setup_test_environment):
  New method for Windows.

* subversion/bindings/swig/ruby/test/util.rb
  (SvnTestUtil::Svnserve#setup_svnserve,
   SvnTestUtil::Svnserve#teardown_svnserve,
   SvnTestUtil::Svnserve#add_pre_revprop_change_hook,
   SvnTestUtil::SetupEnvironment#setup_test_environment): Move from
  SvnTestUtil.
  (SvnTestUtil):
  - Include SvnTestUtil::Windows::Svnserve for Windows or
    SvnTestUtil::Svnserve for others.
  - Extend SvnTestUtil::Windows::SetupTestEnvironment for Windows or
    SvnTestUtil::SetupEnvironment for others.

* subversion/bindings/swig/ruby/test/run-test.rb:
  Use SvnTestUtil.setup_test_environment.

Patch by: Joe Swatosh


r23147 | kou | 2007-01-21 09:10:01 -0600 (Sun, 21 Jan 2007)

Implement Svn::Fs::FileSystem#close and Svn::Repos::ReposCore#close to
be able to delete them on your timing.

* subversion/bindings/swig/core.i (apr_pool_wrapper_t::destroy): New method.

* subversion/bindings/swig/ruby/svn/util.rb
  (Svn::Util.set_methods): Use module_eval instead of define_method.

* subversion/bindings/swig/ruby/svn/fs.rb
  (Svn::Fs): Remove needless Fs. prefix.
  (Svn::Fs::FileSystem.create, Svn::Fs::FileSystem.open): Support block.

* subversion/bindings/swig/ruby/svn/repos.rb
  (Svn::Repos::ReposCore.create, Svn::Repos::ReposCore.open): Support block.

* subversion/bindings/swig/ruby/svn/error.rb
  (Svn::Error::SvnError): New super class for Subversion errors.
  (Svn::Error::FsAlreadyClose, Svn::Error::ReposAlreadyClose):
  New error class.

* subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c,
  subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.h
  (svn_swig_rb_raise_svn_fs_already_close,
   svn_swig_rb_raise_svn_repos_already_close): New function.

* subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c
  (rb_svn_error_svn_error): New function.
  (svn_swig_rb_svn_error_new): Use Svn::Error::SvnError instead of Svn::Error.
   
* subversion/bindings/swig/include/svn_types.swg
  (%typemap(argout) SWIGTYPE **OUTPARAM_WITH_BLOCK,
   %apply SWIGTYPE **OUTPARAM_WITH_BLOCK): Support block form object creattion
  that close the object automatically.
  (%raise_if_null(TYPE)): New typemap(check) macro.
  (%raise_if_null(fs), %raise_if_null(repos)): Add NULL check.
  (%define_close_related_methods(TYPE)): New macro that define close and
  closed? methods to TYPE class.

* subversion/bindings/swig/svn_fs.i
  (%define_close_related_methods(fs)): Define Svn::Fs::FileSystem#close
  and Svn::Fs::FileSystem#closed?.

* subversion/bindings/swig/svn_repos.i
  (%define_close_related_methods(repos)): Define Svn::Repos::ReposCore#close
  and Svn::Repos::ReposCore#closed?.

* subversion/bindings/swig/ruby/test/util.rb
  (SvnTestUtil#teardown_repository): Ensure that a temporary repository is
  deleted for test.

* subversion/bindings/swig/ruby/test/test_client.rb
  (SvnClientTest#test_mkdir): Follow error class hierarchy changes.

* subversion/bindings/swig/ruby/test/test_fs.rb
  (SvnFsTest#test_create): Use block style to close fs automatically.

* subversion/bindings/swig/ruby/test/test_repos.rb
  (SvnReposTest#test_create): Use block style to close fs automatically. 

Suggested by: Joe Swatosh


r23088 | kou | 2007-01-18 09:24:37 -0600 (Thu, 18 Jan 2007)

Normalize line break to work on Windows.

* subversion/bindings/swig/ruby/test/test_client.rb
  (SvnClientTest#test_merge,
   SvnClientTest#test_merge_peg,
   SvnClientTest#test_cat,
   SvnClientTest#test_switch,
   SvnClientTest#test_authentication,
   SvnClientTest#test_simple_provider,
   SvnClientTest#test_windows_simple_provider): Normalize line break of
  source to remove dependency on platform.

Suggested by: Joe Swatosh


r23066 | kou | 2007-01-17 07:35:47 -0600 (Wed, 17 Jan 2007)

Add workaround for different time precisions between Subversion and Ruby on
Windows.

* subversion/bindings/swig/ruby/test/test_fs.rb
  (SvnFsTest#test_transaction): Hack solution to problem of Subversion and
    Ruby using clocks with different precisions in this test.

Patch by: Joe Swatosh


r23031 | kou | 2007-01-16 08:44:53 -0600 (Tue, 16 Jan 2007)

Don't delete a file system because we can't ensure the file system is closed.

* subversion/bindings/swig/ruby/test/test_fs.rb
  (SvnFsTest#test_create): Don't call Svn::Fs::FileSystem.delete.

Suggested by: Joe Swatosh


r22956 | kou | 2007-01-10 08:39:01 -0600 (Wed, 10 Jan 2007)

Resolve dependency.

* subversion/bindings/swig/ruby/test/test_fs.rb: Require MD5 module.

Patch by: Joe Swatosh


r22928 | kou | 2007-01-07 18:25:36 -0600 (Sun, 07 Jan 2007)

Follow-up r22926. Use ";" instead of "\n" for multi statements.

* build/generator/gen_win.py (WinGeneratorBase._find_ruby): 
  The -e parameter needs to be all on one line. So the semicolons are
  needed.

Patch by: Joe Swatosh


r22926 | kou | 2007-01-07 04:00:23 -0600 (Sun, 07 Jan 2007)

Generate project files for VC6 that will link the Ruby bindings with
the Ruby library.

* build/generator/gen_win.py
  (WinGeneratorBase.__init__): Find build information for the Ruby bindings.
  (WinGeneratorBase.get_win_includes): Add found include paths for the Ruby
  bindings.
  (WinGeneratorBase.get_win_lib_dirs): Add found library directory for the
  Ruby bindings.
  (WinGeneratorBase.get_win_libs): Add found library name for the Ruby
  bindings.
  (WinGeneratorBase._find_ruby): New method.

Patch by: Joe Swatosh
Approved by: dlr


r22923 | kou | 2007-01-06 00:00:05 -0600 (Sat, 06 Jan 2007)

Revert r22920. SvnTestUtil.normalize_line_break is still needed.

* subversion/bindings/swig/ruby/test/util.rb
  (SvnTestUtil.normalize_line_break): Redefine.

* subversion/bindings/swig/ruby/test/test_core.rb
  (SvnCoreTest#test_diff_unified, SvnCoreTest#test_diff_merge):
  Use SvnTestUtil.normalize_line_break again.

Suggested by: Joe Swatosh


r22922 | kou | 2007-01-05 23:36:43 -0600 (Fri, 05 Jan 2007)

Fix line ends handling on Windows.

* subversion/bindings/swig/ruby/test/test_wc.rb
  (SvnWcTest#test_translated_file): Treat files as binary so on windows
  Ruby's line end processing doesn't mask what Subversion does with line
  ends when the svn:eol-style is set.

Patch by: Joe Swatosh


r22921 | kou | 2007-01-05 23:28:21 -0600 (Fri, 05 Jan 2007)

Create DLL instead of LIB for the Ruby bindings.

* build.conf (libsvn_swig_ruby): Make dynamic library on Windows.

* subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c
  (SVN_SWIG_SWIGUTIL_RB_C): Define to indicate swigutil_rb.c is a source.

* subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.h
  (SVN_RB_SWIG_SWIGUTIL_EXPORT): Define and use this for creating DLL
  on Windows.

Patch by: Joe Swatosh


r22909 | dlr | 2007-01-04 15:20:16 -0600 (Thu, 04 Jan 2007)

* subversion/bindings/swig/core.i
  (%extend apr_pool_wrapper_t): Release memory aquired with
   ruby_xmalloc() (via ALLOC()) with ruby_xfree().

Patch by: Joe Swatosh <joe.swatosh@gmail.com>


r22887 | djames | 2007-01-03 15:18:36 -0600 (Wed, 03 Jan 2007)

Update the Python bindings tests to (in theory) work on Windows, by
using the portable svn_io_remove_dir function to delete directories,
and by canonicalizing paths to use forward slashes throughout the new
tests in wc.py.

Found by: Joe Swatosh <joe.swatosh@gmail.com>
(See http://svn.haxx.se/users/archive-2007-01/0024.shtml)

[ In subversion/bindings/swig ]

  * core.i
    (svn_io_remove_file, svn_io_remove_dir): Wrap these functions for the
    Python bindings, so that we can make use of them in the test suite.

  * python/tests/wc.py
    (setUp): Canonicalize the path returned to us by mktemp, so that the
    paths will always use forward slashes.

    (test_crawl_revisions2, test_get_pristine_copy_path): Join canonical
     paths using forward slashes, not os-native slashes.

    (tearDown): Use svn_io_remove_dir to remove paths, instead of
    shutil.rmtree, for compatibility with Windows.



r22879 | djames | 2007-01-02 20:24:18 -0600 (Tue, 02 Jan 2007)

Update the Python bindings to use repos.delete to delete repositories,
instead of a custom Python implementation. Also update test_create to
delete the repositories it creates.

This change should hopefully stop the "permission denied" errors on
Windows, which occurred because shutil.rmtree could not delete the
read-only "format" files.

Found by: Joe Swatosh <joe.swatosh@gmail.com>
(See http://svn.haxx.se/users/archive-2006-12/0742.shtml)

[ In subversion/bindings/swig/python/tests ]

  * trac/versioncontrol/tests/svn_fs.py
    (tearDown): Use repos.delete, instead of a custom Python
    implementation.

  * repository.py
    (test_create): For good form, clean up all of the repositories
    we create.



r22854 | kou | 2007-01-01 19:33:05 -0600 (Mon, 01 Jan 2007)

Followup to r22847, fix dependency.

* subversion/bindings/swig/ruby/ruby/test/test_wc.rb: Require 'svn/repos'.

Patch by: Joe Swatosh


r22848 | kou | 2006-12-31 17:54:40 -0600 (Sun, 31 Dec 2006)

Normalize line break for Windows.

* subversion/bindings/swig/ruby/test/util.rb
  (SvnTestUtil.normalize_line_break): New method.

* subversion/bindings/swig/ruby/test/test_core.rb
  (SvnCoreTest#test_diff_unified, SvnCoreTest#test_diff_merge):
  Use SvnTestUtil.normalize_line_break to compare diff result.

Suggested by: Joe Swatosh


r22846 | kou | 2006-12-31 17:33:05 -0600 (Sun, 31 Dec 2006)

Resolve dependency of each test file by themselves. 

* subversion/bindings/swig/ruby/test/util.rb: Require my-assertions.rb.

Suggested by: Joe Swatosh


r22837 | kou | 2006-12-30 00:01:39 -0600 (Sat, 30 Dec 2006)

Support preparing test environment for non-installation test on Windows.

* subversion/bindings/swig/ruby/test/run-test.rb: Use copy instead of
  symbolic link on Windows.

Suggested by: Joe Swatosh


r22836 | kou | 2006-12-29 23:54:14 -0600 (Fri, 29 Dec 2006)

Support file:// style repository URI on Windows.

* subversion/bindings/swig/ruby/test/util.rb
  (SvnTestUtil#setup_basic): Ensure the first "/" for repository path in
  file:// URI.

Suggested by: Joe Swatosh


r22823 | kou | 2006-12-28 02:09:31 -0600 (Thu, 28 Dec 2006)

Check whether LC_MESSAGES is available or not.

* subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c
  (svn_swig_rb_initialize): Do not define Svn::Locale::MESSAGES if LC_MESSAGES
  is not defined.

Suggested by: Joe Swatosh


r22821 | kou | 2006-12-28 01:22:13 -0600 (Thu, 28 Dec 2006)

Link with ruby library.

* build/ac-macros/swig.m4 (SVN_FIND_SWIG): Detect ruby library.

* Makefile.in (SWIG_RB_LINK): Register.

* build.conf (libsvn_swig_ruby): Use SWIG_RB_LIBS for linking.

Suggested by: Joe Swatosh


r22819 | kou | 2006-12-27 23:58:14 -0600 (Wed, 27 Dec 2006)

Use empty object-like macro for empty argument in function-like macro
to work with MSVC6 preprocessor.

* subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c
  (EMPTY_CPP_ARGUMENT): New macro.
  (DEFINE_APR_ARRAY_TO_ARRAY): Use EMPTY_CPP_ARGUMENT for empty argument.

Suggested by: Joe Swatosh


r22818 | kou | 2006-12-27 23:39:50 -0600 (Wed, 27 Dec 2006)

Use SIZEOF_LONG_LONG instead of sizeof(long long) and define codes
using sizeof(long long) as convenience macros, AOFF2NUM and AI642NUM.

* subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c
  (AOFF2NUM, AI642NUM): New macro.
  (ra_callbacks_progress_func): Use AOFF2NUM.
  (svn_swig_rb_client_blame_receiver_func): Use AI642NUM.

Suggested by: Joe Swatosh