|
svn commit: r13161 - in branches/ruby/subversion/bindings/swig/ruby: libsvn: msg#00341version-control.subversion.svn
Author: kou Date: Fri Feb 25 23:07:22 2005 New Revision: 13161 Modified: branches/ruby/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c branches/ruby/subversion/bindings/swig/ruby/test/test_delta.rb Log: Fix wrong argument passing. * subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c: Pass ib->baton instead of ib->editor. * subversion/bindings/swig/ruby/test/test_delta.rb: Add test for the bug. Modified: branches/ruby/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c Url: http://svn.collab.net/viewcvs/svn/branches/ruby/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c?view=diff&rev=13161&p1=branches/ruby/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c&r1=13160&p2=branches/ruby/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c&r2=13161 ============================================================================== --- branches/ruby/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c (original) +++ branches/ruby/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c Fri Feb 25 23:07:22 2005 @@ -572,7 +572,7 @@ args = rb_ary_new3(6, ib->editor, rb_id_change_dir_prop(), - ib->editor, + ib->baton, c2r_string2(name), value ? rb_str_new(value->data, value->len) : Qnil, c2r_swig_type((void *)pool, (void *)"apr_pool_t *")); Modified: branches/ruby/subversion/bindings/swig/ruby/test/test_delta.rb Url: http://svn.collab.net/viewcvs/svn/branches/ruby/subversion/bindings/swig/ruby/test/test_delta.rb?view=diff&rev=13161&p1=branches/ruby/subversion/bindings/swig/ruby/test/test_delta.rb&r1=13160&p2=branches/ruby/subversion/bindings/swig/ruby/test/test_delta.rb&r2=13161 ============================================================================== --- branches/ruby/subversion/bindings/swig/ruby/test/test_delta.rb (original) +++ branches/ruby/subversion/bindings/swig/ruby/test/test_delta.rb Fri Feb 25 23:07:22 2005 @@ -134,6 +134,75 @@ assert_equal([].sort, editor.added_dirs) end + def test_change_prop + prop_name = "prop" + prop_value = "value" + + dir = "changed_dir" + dir_path = File.join(@wc_path, dir) + dir_svn_path = dir + + log = "added 1 dirs\nanded 5 files" + ctx = make_context(log) + + ctx.mkdir([dir_path]) + + file1 = "changed1.txt" + file2 = "changed2.txt" + file3 = "changed3.txt" + file4 = "changed4.txt" + file5 = "changed5.txt" + file1_path = File.join(@wc_path, file1) + file2_path = File.join(dir_path, file2) + file3_path = File.join(@wc_path, file3) + file4_path = File.join(dir_path, file4) + file5_path = File.join(@wc_path, file5) + file1_svn_path = file1 + file2_svn_path = [dir_svn_path, file2].join("/") + file3_svn_path = file3 + file4_svn_path = [dir_svn_path, file4].join("/") + file5_svn_path = file5 + FileUtils.touch(file1_path) + FileUtils.touch(file2_path) + FileUtils.touch(file3_path) + FileUtils.touch(file4_path) + FileUtils.touch(file5_path) + ctx.add(file1_path) + ctx.add(file2_path) + ctx.add(file3_path) + ctx.add(file4_path) + ctx.add(file5_path) + + ctx.propset(prop_name, prop_value, dir_path) + + commit_info = ctx.commit(@wc_path) + + editor = traverse(Svn::Delta::ChangedDirsEditor, commit_info.revision) + assert_equal(["", dir_svn_path].collect{|path| "#{path}/"}.sort, + editor.changed_dirs) + + + log = "prop changed" + ctx = make_context(log) + + ctx.propdel(prop_name, dir_path) + + commit_info = ctx.commit(@wc_path) + + editor = traverse(Svn::Delta::ChangedDirsEditor, commit_info.revision) + assert_equal([dir_svn_path].collect{|path| "#{path}/"}.sort, + editor.changed_dirs) + + + ctx.propset(prop_name, prop_value, file1_path) + + commit_info = ctx.commit(@wc_path) + + editor = traverse(Svn::Delta::ChangedDirsEditor, commit_info.revision) + assert_equal([""].collect{|path| "#{path}/"}.sort, + editor.changed_dirs) + end + private def traverse(editor_class, rev, pass_root=false) root = @fs.root |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | svn commit: r13160 - trunk/subversion/libsvn_subr: 00341, dionisos-jqHnx1hy4Dsdnm+yROfE0A |
|---|---|
| Next by Date: | svn commit: r13162 - branches/ruby/subversion/bindings/swig/ruby/test: 00341, kou-jqHnx1hy4Dsdnm+yROfE0A |
| Previous by Thread: | svn commit: r13160 - trunk/subversion/libsvn_subri: 00341, dionisos-jqHnx1hy4Dsdnm+yROfE0A |
| Next by Thread: | svn commit: r13162 - branches/ruby/subversion/bindings/swig/ruby/test: 00341, kou-jqHnx1hy4Dsdnm+yROfE0A |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |