[prev in list] [next in list] [prev in thread] [next in thread] 

List:       subversion-cvs
Subject:    svn commit: rev 580 - trunk/subversion/bindings/ruby
From:       yoshiki () tigris ! org
Date:       2001-11-30 12:16:11
[Download RAW message or body]

Author: yoshiki
Date: 2001-11-30 12:16 GMT
New Revision: 580

Modified:
   trunk/subversion/bindings/ruby/ra.c
Log:
Implement Svn::Ra#check_path.

* ra.c (ra_check_path): New function.

(svn_ruby_init_ra): Add checkPath method to Svn::Ra.


Modified: trunk/subversion/bindings/ruby/ra.c
==============================================================================
--- OLD/trunk/subversion/bindings/ruby/ra.c	Fri Nov 30 06:16:08 2001
+++ NEW/trunk/subversion/bindings/ruby/ra.c	Fri Nov 30 06:16:09 2001
@@ -677,6 +677,29 @@
 			      ra->plugin, ra->session_baton, ra->pool);
 }
 
+static VALUE
+ra_check_path (VALUE self, VALUE aPath, VALUE aRevision)
+{
+  svn_ruby_ra_t *ra;
+  svn_node_kind_t kind;
+  svn_revnum_t revision;
+  svn_error_t *err;
+
+  Data_Get_Struct (self, svn_ruby_ra_t, ra);
+
+  if (ra->closed)
+    rb_raise (rb_eRuntimeError, "not opened");
+
+  revision = NUM2LONG (aRevision);
+
+  err = ra->plugin->check_path (&kind, ra->session_baton,
+				StringValuePtr (aPath), revision);
+  if (err)
+    svn_ruby_raise (err);
+
+  return INT2FIX (kind);
+}
+
 
 void
 svn_ruby_init_ra (void)
@@ -704,4 +727,5 @@
   rb_define_method (cSvnRa, "doCheckout", ra_do_checkout, 2);
   rb_define_method (cSvnRa, "doUpdate", ra_do_update, -1);
   rb_define_method (cSvnRa, "getLog", ra_get_log, -1);
+  rb_define_method (cSvnRa, "checkPath", ra_check_path, 2);
 }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic