|
|
0d46aa |
Date: Tue, 20 Dec 2011 21:08:00 -0800
|
|
|
0d46aa |
From: Vincent Batts <vbatts@slackware.com>
|
|
|
0d46aa |
Subject: Re: [PATCH] enabling ruby in the subversion build
|
|
|
0d46aa |
Message-ID: <20111221050800.GA17350@slackware.com>
|
|
|
0d46aa |
|
|
|
0d46aa |
--- subversion-1.7.2/configure.ac.ruby19
|
|
|
0d46aa |
+++ subversion-1.7.2/configure.ac
|
|
|
0d46aa |
@@ -1130,13 +1130,6 @@ if test "$RUBY" != "none"; then
|
|
|
0d46aa |
|
|
|
0d46aa |
AC_SUBST(RUBY_MAJOR)
|
|
|
0d46aa |
AC_SUBST(RUBY_MINOR)
|
|
|
0d46aa |
- if test ! \( "$RUBY_MAJOR" -eq "1" -a "$RUBY_MINOR" -eq "8" \); then
|
|
|
0d46aa |
- # Disallow Ruby 1.9 or later until the binding tests get fixed
|
|
|
0d46aa |
- # to run with those versions.
|
|
|
0d46aa |
- RUBY="none"
|
|
|
0d46aa |
- AC_MSG_WARN([The detected Ruby is too new for Subversion to use])
|
|
|
0d46aa |
- AC_MSG_WARN([Only 1.8.x releases are supported at this time])
|
|
|
0d46aa |
- fi
|
|
|
0d46aa |
else
|
|
|
0d46aa |
AC_MSG_RESULT([no])
|
|
|
0d46aa |
RUBY="none"
|
|
|
0d46aa |
--- subversion-1.7.2/Makefile.in.ruby19
|
|
|
0d46aa |
+++ subversion-1.7.2/Makefile.in
|
|
|
0d46aa |
@@ -318,7 +318,7 @@ INSTALL_EXTRA_SWIG_RB=\
|
|
|
0d46aa |
$(INSTALL_DATA) "$$i" $(DESTDIR)$(SWIG_RB_SITE_LIB_DIR)/svn; \
|
|
|
0d46aa |
done
|
|
|
0d46aa |
|
|
|
0d46aa |
-APXS = @APXS@
|
|
|
0d46aa |
+APXS = @APXS@
|
|
|
0d46aa |
|
|
|
0d46aa |
PYTHON = @PYTHON@
|
|
|
0d46aa |
PERL = @PERL@
|
|
|
0d46aa |
@@ -818,9 +818,14 @@ swig-rb: autogen-swig-rb
|
|
|
0d46aa |
|
|
|
0d46aa |
check-swig-rb: swig-rb svnserve
|
|
|
0d46aa |
cd $(SWIG_RB_DIR); \
|
|
|
0d46aa |
- $(RUBY) -I $(SWIG_RB_SRC_DIR) \
|
|
|
0d46aa |
- $(SWIG_RB_SRC_DIR)/test/run-test.rb \
|
|
|
0d46aa |
- --verbose=$(SWIG_RB_TEST_VERBOSE)
|
|
|
0d46aa |
+ if [ "$(RUBY_MAJOR)" -eq 1 -a "$(RUBY_MINOR)" -lt 9 ] ; then \
|
|
|
0d46aa |
+ $(RUBY) -I $(SWIG_RB_SRC_DIR) \
|
|
|
0d46aa |
+ $(SWIG_RB_SRC_DIR)/test/run-test.rb \
|
|
|
0d46aa |
+ --verbose=$(SWIG_RB_TEST_VERBOSE); \
|
|
|
0d46aa |
+ else \
|
|
|
0d46aa |
+ $(RUBY) -I $(SWIG_RB_SRC_DIR) \
|
|
|
0d46aa |
+ $(SWIG_RB_SRC_DIR)/test/run-test.rb; \
|
|
|
0d46aa |
+ fi
|
|
|
0d46aa |
|
|
|
0d46aa |
EXTRACLEAN_SWIG_RB=rm -f $(SWIG_RB_SRC_DIR)/svn_*.c $(SWIG_RB_SRC_DIR)/core.c
|
|
|
0d46aa |
|
|
|
0d46aa |
--- subversion-1.7.2/subversion/bindings/swig/ruby/svn/info.rb.ruby19
|
|
|
0d46aa |
+++ subversion-1.7.2/subversion/bindings/swig/ruby/svn/info.rb
|
|
|
0d46aa |
@@ -229,7 +229,9 @@ module Svn
|
|
|
0d46aa |
|
|
|
0d46aa |
def parse_diff_unified(entry)
|
|
|
0d46aa |
in_content = false
|
|
|
0d46aa |
- entry.body.each do |line|
|
|
|
0d46aa |
+ # accomodation for ruby 1.9 and 1.8
|
|
|
0d46aa |
+ each_meth = entry.body.respond_to?(:each_line) ? :each_line : :each
|
|
|
0d46aa |
+ entry.body.send(each_meth) do |line|
|
|
|
0d46aa |
case line
|
|
|
0d46aa |
when /^@@/
|
|
|
0d46aa |
in_content = true
|
|
|
0d46aa |
--- subversion-1.7.2/subversion/bindings/swig/ruby/svn/util.rb.ruby19
|
|
|
0d46aa |
+++ subversion-1.7.2/subversion/bindings/swig/ruby/svn/util.rb
|
|
|
0d46aa |
@@ -36,7 +36,7 @@ module Svn
|
|
|
0d46aa |
module Util #:nodoc:
|
|
|
0d46aa |
module_function
|
|
|
0d46aa |
def to_ruby_class_name(name)
|
|
|
0d46aa |
- name.split("_").collect do |x|
|
|
|
0d46aa |
+ name.to_s.split("_").collect do |x|
|
|
|
0d46aa |
"#{x[0,1].upcase}#{x[1..-1].downcase}"
|
|
|
0d46aa |
end.join("")
|
|
|
0d46aa |
end
|
|
|
0d46aa |
--- subversion-1.7.2/subversion/bindings/swig/ruby/test/my-assertions.rb.ruby19
|
|
|
0d46aa |
+++ subversion-1.7.2/subversion/bindings/swig/ruby/test/my-assertions.rb
|
|
|
0d46aa |
@@ -24,20 +24,33 @@ module Test
|
|
|
0d46aa |
module Unit
|
|
|
0d46aa |
module Assertions
|
|
|
0d46aa |
|
|
|
0d46aa |
+ # make an intermediary assertion block handler
|
|
|
0d46aa |
+ def _my_assert_block(&block)
|
|
|
0d46aa |
+ if RUBY_VERSION > '1.9'
|
|
|
0d46aa |
+ assert_block do
|
|
|
0d46aa |
+ yield
|
|
|
0d46aa |
+ end
|
|
|
0d46aa |
+ else
|
|
|
0d46aa |
+ _wrap_assertion do
|
|
|
0d46aa |
+ yield
|
|
|
0d46aa |
+ end
|
|
|
0d46aa |
+ end
|
|
|
0d46aa |
+ end
|
|
|
0d46aa |
+
|
|
|
0d46aa |
def assert_true(boolean, message=nil)
|
|
|
0d46aa |
- _wrap_assertion do
|
|
|
0d46aa |
+ _my_assert_block do
|
|
|
0d46aa |
assert_equal(true, boolean, message)
|
|
|
0d46aa |
end
|
|
|
0d46aa |
end
|
|
|
0d46aa |
|
|
|
0d46aa |
def assert_false(boolean, message=nil)
|
|
|
0d46aa |
- _wrap_assertion do
|
|
|
0d46aa |
+ _my_assert_block do
|
|
|
0d46aa |
assert_equal(false, boolean, message)
|
|
|
0d46aa |
end
|
|
|
0d46aa |
end
|
|
|
0d46aa |
|
|
|
0d46aa |
def assert_nested_sorted_array(expected, actual, message=nil)
|
|
|
0d46aa |
- _wrap_assertion do
|
|
|
0d46aa |
+ _my_assert_block do
|
|
|
0d46aa |
assert_equal(expected.collect {|elem| elem.sort},
|
|
|
0d46aa |
actual.collect {|elem| elem.sort},
|
|
|
0d46aa |
message)
|
|
|
0d46aa |
@@ -45,7 +58,7 @@ module Test
|
|
|
0d46aa |
end
|
|
|
0d46aa |
|
|
|
0d46aa |
def assert_equal_log_entries(expected, actual, message=nil)
|
|
|
0d46aa |
- _wrap_assertion do
|
|
|
0d46aa |
+ _my_assert_block do
|
|
|
0d46aa |
actual = actual.collect do |entry|
|
|
|
0d46aa |
changed_paths = entry.changed_paths
|
|
|
0d46aa |
changed_paths.each_key do |path|
|
|
|
0d46aa |
--- subversion-1.7.2/subversion/bindings/swig/ruby/test/test_client.rb.ruby19
|
|
|
0d46aa |
+++ subversion-1.7.2/subversion/bindings/swig/ruby/test/test_client.rb
|
|
|
0d46aa |
@@ -2203,7 +2203,11 @@ class SvnClientTest < Test::Unit::TestCa
|
|
|
0d46aa |
|
|
|
0d46aa |
make_context(log) do |ctx|
|
|
|
0d46aa |
items = nil
|
|
|
0d46aa |
- ctx.set_log_msg_func do |items|
|
|
|
0d46aa |
+ ctx.set_log_msg_func do |l_items|
|
|
|
0d46aa |
+ # ruby 1.8 magically carried the assignment of 'items' back from this Proc block,
|
|
|
0d46aa |
+ # but in 1.9, we need to have names that don't conflict, and set the outside 'items'.
|
|
|
0d46aa |
+ # This works in 1.8 as well
|
|
|
0d46aa |
+ items = l_items
|
|
|
0d46aa |
[true, log]
|
|
|
0d46aa |
end
|
|
|
0d46aa |
|
|
|
0d46aa |
--- subversion-1.7.2/subversion/bindings/swig/ruby/test/test_core.rb.ruby19
|
|
|
0d46aa |
+++ subversion-1.7.2/subversion/bindings/swig/ruby/test/test_core.rb
|
|
|
0d46aa |
@@ -1,3 +1,4 @@
|
|
|
0d46aa |
+# encoding: UTF-8
|
|
|
0d46aa |
# ====================================================================
|
|
|
0d46aa |
# Licensed to the Apache Software Foundation (ASF) under one
|
|
|
0d46aa |
# or more contributor license agreements. See the NOTICE file
|
|
|
0d46aa |
@@ -52,7 +53,13 @@ class SvnCoreTest < Test::Unit::TestCase
|
|
|
0d46aa |
now = Time.now.gmtime
|
|
|
0d46aa |
str = now.strftime("%Y-%m-%dT%H:%M:%S.") + "#{now.usec}Z"
|
|
|
0d46aa |
|
|
|
0d46aa |
- assert_equal(now, Time.from_svn_format(str))
|
|
|
0d46aa |
+ if RUBY_VERSION > '1.9'
|
|
|
0d46aa |
+ # ruby 1.9 Time comparison gets into the nano-seconds, that strftime
|
|
|
0d46aa |
+ # shaves off. So we can compare epoch time instead
|
|
|
0d46aa |
+ assert_equal(now.to_i, Time.from_svn_format(str).gmtime.to_i)
|
|
|
0d46aa |
+ else
|
|
|
0d46aa |
+ assert_equal(now, Time.from_svn_format(str).gmtime)
|
|
|
0d46aa |
+ end
|
|
|
0d46aa |
|
|
|
0d46aa |
apr_time = now.to_i * 1000000 + now.usec
|
|
|
0d46aa |
assert_equal(apr_time, now.to_apr_time)
|
|
|
0d46aa |
@@ -244,7 +251,11 @@ class SvnCoreTest < Test::Unit::TestCase
|
|
|
0d46aa |
config_infos << [section, name, value]
|
|
|
0d46aa |
end
|
|
|
0d46aa |
assert_equal(infos.sort, config_infos.sort)
|
|
|
0d46aa |
- assert_equal(infos.sort, config.collect {|args| args}.sort)
|
|
|
0d46aa |
+ if RUBY_VERSION > '1.9'
|
|
|
0d46aa |
+ assert_equal(infos.sort, config.collect {|sect,name,val| [sect,name,val]}.sort)
|
|
|
0d46aa |
+ else
|
|
|
0d46aa |
+ assert_equal(infos.sort, config.collect {|args| args}.sort)
|
|
|
0d46aa |
+ end
|
|
|
0d46aa |
end
|
|
|
0d46aa |
|
|
|
0d46aa |
def test_config_find_group
|
|
|
0d46aa |
@@ -532,7 +543,13 @@ EOD
|
|
|
0d46aa |
date_str = now.strftime("%Y-%m-%dT%H:%M:%S")
|
|
|
0d46aa |
date_str << ".#{now.usec}Z"
|
|
|
0d46aa |
info.date = date_str
|
|
|
0d46aa |
- assert_equal(now, info.date)
|
|
|
0d46aa |
+ if RUBY_VERSION > '1.9'
|
|
|
0d46aa |
+ # ruby 1.9 Time comparison gets into the nano-seconds, that strftime
|
|
|
0d46aa |
+ # shaves off. So we can compare epoch time instead
|
|
|
0d46aa |
+ assert_equal(now.to_i, info.date.gmtime.to_i)
|
|
|
0d46aa |
+ else
|
|
|
0d46aa |
+ assert_equal(now, info.date.gmtime)
|
|
|
0d46aa |
+ end
|
|
|
0d46aa |
end
|
|
|
0d46aa |
|
|
|
0d46aa |
def test_svn_prop
|
|
|
0d46aa |
--- subversion-1.7.2/subversion/bindings/swig/ruby/test/test_delta.rb.ruby19
|
|
|
0d46aa |
+++ subversion-1.7.2/subversion/bindings/swig/ruby/test/test_delta.rb
|
|
|
0d46aa |
@@ -17,9 +17,10 @@
|
|
|
0d46aa |
# under the License.
|
|
|
0d46aa |
# ====================================================================
|
|
|
0d46aa |
|
|
|
0d46aa |
+require "my-assertions"
|
|
|
0d46aa |
require "util"
|
|
|
0d46aa |
require "stringio"
|
|
|
0d46aa |
-require 'md5'
|
|
|
0d46aa |
+require 'digest/md5'
|
|
|
0d46aa |
require 'tempfile'
|
|
|
0d46aa |
|
|
|
0d46aa |
require "svn/info"
|
|
|
0d46aa |
@@ -46,8 +47,8 @@ class SvnDeltaTest < Test::Unit::TestCas
|
|
|
0d46aa |
target = StringIO.new(t)
|
|
|
0d46aa |
stream = Svn::Delta::TextDeltaStream.new(source, target)
|
|
|
0d46aa |
assert_nil(stream.md5_digest)
|
|
|
0d46aa |
- _wrap_assertion do
|
|
|
0d46aa |
- stream.each do |window|
|
|
|
0d46aa |
+ _my_assert_block do
|
|
|
0d46aa |
+ ret = stream.each do |window|
|
|
|
0d46aa |
window.ops.each do |op|
|
|
|
0d46aa |
op_size = op.offset + op.length
|
|
|
0d46aa |
case op.action_code
|
|
|
0d46aa |
@@ -62,8 +63,9 @@ class SvnDeltaTest < Test::Unit::TestCas
|
|
|
0d46aa |
end
|
|
|
0d46aa |
end
|
|
|
0d46aa |
end
|
|
|
0d46aa |
+ true if RUBY_VERSION > '1.9' # this block returns nil in > ruby '1.9'
|
|
|
0d46aa |
end
|
|
|
0d46aa |
- assert_equal(MD5.new(t).hexdigest, stream.md5_digest)
|
|
|
0d46aa |
+ assert_equal(Digest::MD5.hexdigest(t), stream.md5_digest)
|
|
|
0d46aa |
end
|
|
|
0d46aa |
|
|
|
0d46aa |
def test_txdelta_window_compose
|
|
|
0d46aa |
@@ -81,7 +83,7 @@ class SvnDeltaTest < Test::Unit::TestCas
|
|
|
0d46aa |
end
|
|
|
0d46aa |
end
|
|
|
0d46aa |
|
|
|
0d46aa |
- _wrap_assertion do
|
|
|
0d46aa |
+ assert_block do
|
|
|
0d46aa |
composed_window.ops.each do |op|
|
|
|
0d46aa |
op_size = op.offset + op.length
|
|
|
0d46aa |
case op.action_code
|
|
|
0d46aa |
@@ -169,6 +171,7 @@
|
|
|
0d46aa |
stream = Svn::Delta::TextDeltaStream.new(source, target)
|
|
|
0d46aa |
|
|
|
0d46aa |
output = StringIO.new("")
|
|
|
0d46aa |
+ output.set_encoding Encoding::ASCII_8BIT if output.respond_to? :set_encoding
|
|
|
0d46aa |
handler = Svn::Delta.svndiff_handler(output)
|
|
|
0d46aa |
|
|
|
0d46aa |
Svn::Delta.send(target_text, handler)
|
|
|
0d46aa |
--- subversion-1.7.2/subversion/bindings/swig/ruby/test/test_fs.rb.ruby19
|
|
|
0d46aa |
+++ subversion-1.7.2/subversion/bindings/swig/ruby/test/test_fs.rb
|
|
|
0d46aa |
@@ -20,7 +20,7 @@
|
|
|
0d46aa |
require "my-assertions"
|
|
|
0d46aa |
require "util"
|
|
|
0d46aa |
require "time"
|
|
|
0d46aa |
-require "md5"
|
|
|
0d46aa |
+require "digest/md5"
|
|
|
0d46aa |
|
|
|
0d46aa |
require "svn/core"
|
|
|
0d46aa |
require "svn/fs"
|
|
|
0d46aa |
@@ -49,14 +49,15 @@ class SvnFsTest < Test::Unit::TestCase
|
|
|
0d46aa |
|
|
|
0d46aa |
assert(!File.exist?(path))
|
|
|
0d46aa |
fs = nil
|
|
|
0d46aa |
- callback = Proc.new do |fs|
|
|
|
0d46aa |
+ callback = Proc.new do |t_fs|
|
|
|
0d46aa |
assert(File.exist?(path))
|
|
|
0d46aa |
assert_equal(fs_type, Svn::Fs.type(path))
|
|
|
0d46aa |
- fs.set_warning_func do |err|
|
|
|
0d46aa |
+ t_fs.set_warning_func do |err|
|
|
|
0d46aa |
p err
|
|
|
0d46aa |
abort
|
|
|
0d46aa |
end
|
|
|
0d46aa |
- assert_equal(path, fs.path)
|
|
|
0d46aa |
+ assert_equal(path, t_fs.path)
|
|
|
0d46aa |
+ fs = t_fs
|
|
|
0d46aa |
end
|
|
|
0d46aa |
yield(:create, [path, config], callback)
|
|
|
0d46aa |
|
|
|
0d46aa |
@@ -162,7 +163,7 @@ class SvnFsTest < Test::Unit::TestCase
|
|
|
0d46aa |
|
|
|
0d46aa |
assert_equal(src, @fs.root.file_contents(path_in_repos){|f| f.read})
|
|
|
0d46aa |
assert_equal(src.length, @fs.root.file_length(path_in_repos))
|
|
|
0d46aa |
- assert_equal(MD5.new(src).hexdigest,
|
|
|
0d46aa |
+ assert_equal(Digest::MD5.hexdigest(src),
|
|
|
0d46aa |
@fs.root.file_md5_checksum(path_in_repos))
|
|
|
0d46aa |
|
|
|
0d46aa |
assert_equal([path_in_repos], @fs.root.paths_changed.keys)
|
|
|
0d46aa |
@@ -364,7 +365,7 @@ class SvnFsTest < Test::Unit::TestCase
|
|
|
0d46aa |
|
|
|
0d46aa |
File.open(path, "w") {|f| f.print(modified)}
|
|
|
0d46aa |
@fs.transaction do |txn|
|
|
|
0d46aa |
- checksum = MD5.new(normalize_line_break(result)).hexdigest
|
|
|
0d46aa |
+ checksum = Digest::MD5.hexdigest(normalize_line_break(result))
|
|
|
0d46aa |
stream = txn.root.apply_text(path_in_repos, checksum)
|
|
|
0d46aa |
stream.write(normalize_line_break(result))
|
|
|
0d46aa |
stream.close
|
|
|
0d46aa |
@@ -392,8 +393,8 @@ class SvnFsTest < Test::Unit::TestCase
|
|
|
0d46aa |
|
|
|
0d46aa |
File.open(path, "w") {|f| f.print(modified)}
|
|
|
0d46aa |
@fs.transaction do |txn|
|
|
|
0d46aa |
- base_checksum = MD5.new(normalize_line_break(src)).hexdigest
|
|
|
0d46aa |
- checksum = MD5.new(normalize_line_break(result)).hexdigest
|
|
|
0d46aa |
+ base_checksum = Digest::MD5.hexdigest(normalize_line_break(src))
|
|
|
0d46aa |
+ checksum = Digest::MD5.hexdigest(normalize_line_break(result))
|
|
|
0d46aa |
handler = txn.root.apply_textdelta(path_in_repos,
|
|
|
0d46aa |
base_checksum, checksum)
|
|
|
0d46aa |
assert_raises(Svn::Error::ChecksumMismatch) do
|
|
|
0d46aa |
--- subversion-1.7.2/subversion/bindings/swig/ruby/test/test_repos.rb.ruby19
|
|
|
0d46aa |
+++ subversion-1.7.2/subversion/bindings/swig/ruby/test/test_repos.rb
|
|
|
0d46aa |
@@ -98,11 +98,12 @@ class SvnReposTest < Test::Unit::TestCas
|
|
|
0d46aa |
fs_type = Svn::Fs::TYPE_FSFS
|
|
|
0d46aa |
fs_config = {Svn::Fs::CONFIG_FS_TYPE => fs_type}
|
|
|
0d46aa |
repos = nil
|
|
|
0d46aa |
- Svn::Repos.create(tmp_repos_path, {}, fs_config) do |repos|
|
|
|
0d46aa |
+ Svn::Repos.create(tmp_repos_path, {}, fs_config) do |t_repos|
|
|
|
0d46aa |
assert(File.exist?(tmp_repos_path))
|
|
|
0d46aa |
- fs_type_path = File.join(repos.fs.path, Svn::Fs::CONFIG_FS_TYPE)
|
|
|
0d46aa |
+ fs_type_path = File.join(t_repos.fs.path, Svn::Fs::CONFIG_FS_TYPE)
|
|
|
0d46aa |
assert_equal(fs_type, File.open(fs_type_path) {|f| f.read.chop})
|
|
|
0d46aa |
- repos.fs.set_warning_func(&warning_func)
|
|
|
0d46aa |
+ t_repos.fs.set_warning_func(&warning_func)
|
|
|
0d46aa |
+ repos = t_repos
|
|
|
0d46aa |
end
|
|
|
0d46aa |
|
|
|
0d46aa |
assert(repos.closed?)
|
|
|
0d46aa |
--- subversion-1.7.2/subversion/bindings/swig/ruby/test/test-unit-ext/priority.rb.ruby19
|
|
|
0d46aa |
+++ subversion-1.7.2/subversion/bindings/swig/ruby/test/test-unit-ext/priority.rb
|
|
|
0d46aa |
@@ -179,7 +179,7 @@ module Test
|
|
|
0d46aa |
apply_priority
|
|
|
0d46aa |
!@tests.empty?
|
|
|
0d46aa |
end
|
|
|
0d46aa |
- end
|
|
|
0d46aa |
+ end if RUBY_VERSION < '1.9.3'
|
|
|
0d46aa |
|
|
|
0d46aa |
class AutoRunner
|
|
|
0d46aa |
alias_method :original_options, :options
|
|
|
0d46aa |
--- subversion-1.7.2/subversion/bindings/swig/ruby/test/test-unit-ext.rb.ruby19
|
|
|
0d46aa |
+++ subversion-1.7.2/subversion/bindings/swig/ruby/test/test-unit-ext.rb
|
|
|
0d46aa |
@@ -17,7 +17,7 @@
|
|
|
0d46aa |
# under the License.
|
|
|
0d46aa |
# ====================================================================
|
|
|
0d46aa |
|
|
|
0d46aa |
-require "test-unit-ext/always-show-result"
|
|
|
0d46aa |
+require "test-unit-ext/always-show-result" if RUBY_VERSION < '1.9.3'
|
|
|
0d46aa |
require "test-unit-ext/priority"
|
|
|
0d46aa |
-require "test-unit-ext/backtrace-filter"
|
|
|
0d46aa |
-require "test-unit-ext/long-display-for-emacs"
|
|
|
0d46aa |
+require "test-unit-ext/backtrace-filter" if RUBY_VERSION < '1.9.3'
|
|
|
0d46aa |
+require "test-unit-ext/long-display-for-emacs" if RUBY_VERSION < '1.9.3'
|
|
|
0d46aa |
--- subversion-1.7.2/subversion/bindings/swig/ruby/test/test_wc.rb.ruby19
|
|
|
0d46aa |
+++ subversion-1.7.2/subversion/bindings/swig/ruby/test/test_wc.rb
|
|
|
0d46aa |
@@ -530,7 +530,7 @@ EOE
|
|
|
0d46aa |
ctx.ci(lf_path)
|
|
|
0d46aa |
|
|
|
0d46aa |
Svn::Wc::AdmAccess.open(nil, @wc_path, true, 5) do |access|
|
|
|
0d46aa |
- _wrap_assertion do
|
|
|
0d46aa |
+ _my_assert_block do
|
|
|
0d46aa |
File.open(src_path, "wb") {|f| f.print(source)}
|
|
|
0d46aa |
args = [method_name, src_path, crlf_path, Svn::Wc::TRANSLATE_FROM_NF]
|
|
|
0d46aa |
result = yield(access.send(*args), source)
|
|
|
0d46aa |
@@ -1084,7 +1084,11 @@ EOE
|
|
|
0d46aa |
assert_not_nil context
|
|
|
0d46aa |
assert_kind_of Svn::Wc::Context, context
|
|
|
0d46aa |
end
|
|
|
0d46aa |
- assert_nil result;
|
|
|
0d46aa |
+ if RUBY_VERSION > '1.9'
|
|
|
0d46aa |
+ assert_equal(result,true)
|
|
|
0d46aa |
+ else
|
|
|
0d46aa |
+ assert_nil result
|
|
|
0d46aa |
+ end
|
|
|
0d46aa |
end
|
|
|
0d46aa |
end
|
|
|
0d46aa |
|