[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: request for simple example: commit or update a file with java

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2002-11-04 15:37:41 CET

"Robert Koberg" <rob@koberg.com> writes:

> Am I asking something totally stupid? Can anybody give me some hints (offlist if
> this is an offtopic question)?

It's on-topic, it's just I don't think we have that many Java
programmers.

> > -----Original Message-----
> > From: Robert Koberg [mailto:rob@koberg.com]
> > Sent: Saturday, November 02, 2002 7:58 AM
> > To: dev@subversion.tigris.org
> > Subject: request for simple example: commit or update a file with java
> >
> >
> > Hi,
> >
> > Can anybody post a simple, basic example of the best way to perform a
> > commit or update from within a java app? Lets say the app lives on
> > the same machine as the subversion repos. Is there any way to pass
> > the commit info as headers in a http response? Is the only way,
> > currently, to do a Runtime.exec()? Any advice is appreciated.

I'm not a Java programmer, and I'm not quite sure what you want. If
you are using http then whether the app and the repository are on the
same machine is irrelevant.

If you have a mod_dav_svn server then you certainly can talk to it
using http, but generating the correct commit http without using the
subversion libraries is quite a complex tast. That's what the
libraries are for.

I assume your app is manipulating a local working copy, in which case
you want to call svn_client_commit. This is a C function so, as far
as I know, this means you need a JNI wrapper for it. This wrapper
could be generated by SWIG (I know as much about SWIG as I do about
Java :) or you could create it manually.

> > I remember seeing some posts on somebody doing some work on the java
> > bindings. has that gotten anywhere? I can do some QA if or when ready.

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Nov 4 15:38:28 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.