Hello.
I am using Ruby bindings and found that methods of Context object
always fail when a Time object is specified as a revision.
Here is a patch for the problem.
[[[
* subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c
(svn_swig_rb_set_revision): Fix the way of converting Time object
to revision specification.
]]]
Index: subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c
===================================================================
--- subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c (revision
33854)
+++ subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c (working copy)
@@ -3206,7 +3206,8 @@
if (rb_obj_is_kind_of(value,
rb_const_get(rb_cObject, rb_intern("Time")))) {
rev->kind = svn_opt_revision_date;
- rev->value.date = NUM2LONG(rb_funcall(value, rb_intern("to_i"), 0));
+ rev->value.date = apr_time_from_sec(
+ NUM2LONG(rb_funcall(value, rb_intern("to_i"), 0)));
} else {
rb_raise(rb_eArgError,
"invalid type: %s",
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-10-23 06:35:56 CEST