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

Re: Java Question

From: Daniel Rall <dlr_at_collab.net>
Date: 2006-08-01 23:30:24 CEST

On Tue, 01 Aug 2006, Dan Pozmanter wrote:

> Swig/Java API
>
> I think we should precisely mirror the c api.
> This will be faster to write, and the same docs/experience exists.

Experience with the bindings -- especially the Python bindings -- has
shown us that typical users want language bindings with the look and
feel of APIs they're familiar with in that language.

Which is to say, Java APIs should look like Java APIs, not C APIs.

> Here are a few example python lines:
>
> fs.node_history(connection._v_root, self.svnpath, pool)
>
> stream = fs.file_contents(repository_root, target_path, pool)
> data = util.svn_stream_read(stream, CHUNK_SIZE)
>
> if kind_of_node == core.svn_node_none:
> return ()
> elif kind_of_node != core.svn_node_dir:
> return (target_path, self.GetFileData(repository_root,
> target_path, pool))
>
> svn_pool_destroy(pool)
>
> revision = fs.youngest_rev(fs, pool)

This example is quite helpful, but deals with the libsvn_fs API. I
assumed that you were trying to get the data via the RA layer. Is
this not the case? Can you go straight to the repository's file
system with no need for auth?

Please elaborate on the specifics of what you're trying to do.

Thanks, Dan

> -----Original Message-----
> From: Daniel Rall [mailto:dlr@collab.net]
> Sent: Tuesday, August 01, 2006 4:45 PM
> To: Dan Pozmanter
> Subject: Re: Java Question
>
> Let's start by defining what the APIs should look like for Java (see my
> questions about half way down the quoted text).
>
> If you have examples in Python (or whatever), that would be a good place
> to start the discussion. Let's continue it on the dev list.
>
> - Dan
>
> On Tue, 01 Aug 2006, Dan Pozmanter wrote:
>
> > Super Cool.
> > I would like to help.
> > We can I start?
> >
> > -----Original Message-----
> > From: Daniel Rall [mailto:dlr@collab.net]
> > Sent: Tuesday, August 01, 2006 2:00 PM
> > To: Dan Pozmanter
> > Cc: Mark Phippard; dev@subversion.tigris.org
> > Subject: Re: Java Question
> >
> > On Mon, 31 Jul 2006, Mark Phippard wrote:
> >
> > > JavaHL does not allow you to write files without a working copy,
> > > unless you count import. It can run log, info, cat and ls directly.
> > > Also, copy, move, delete.
> > >
> > > I did not realize that Subversion even let you do a commit with a
> > > working copy. Can it commit a change that way? One thing I would
> > > like to do in Subclipse with JavaHL is several repository actions in
>
> > > one commit. Such as create many directories with one commit, or
> > > move
> > many files.
> >
> > It can. The hoops to jump through involve writing delta editor
> > callbacks, doing validation on the state of the repository, and --
> > most importantly, and where most of the work is -- driving the delta
> > editor to apply your changes to the repository.
> >
> > Here's an example (in C):
> >
> > http://svn.collab.net/repos/svn/trunk/tools/examples/svnput.c
> >
> > (Also cited as examples by cmpilato and rooneg are: 'svn import', 'svn
>
> > copy URL URL', 'svn mkdir URL', 'svn delete URL', etc.)
> >
> >
> > Dan Pozmanter responded to Mark:
> >
> > > You can do all of these with the c api, as well as with the mildly
> > > higher level bindings for python, perl and ruby. It is especially
> > > nifty being able to do a bunch of operations at once...
> > ...
> >
> > Can you describe exactly what you'd like the API to look like, and
> > provide pointers to how this looks in the other binding APIs (e.g.
> > Ruby, Python, etc.)?
> >
> >
> > And in another message on Mon, 31 Jul 2006, Dan Pozmanter wrote:
> >
> > > :) So, how's about add and commit?
> >
> > I might be able to put something together.
> >
> > ...
> > > Are there any plans to implement the repository, core, or fs api's
> > > in
> > java?
> >
> > As Mark mentioned, implementation of these APIs will be need-driven.
> > Personally, I'm definitely interested in seeing such bindings emerge,
> > and would certainly be willing to help anyone interested in writing
> > some patches.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org

  • application/pgp-signature attachment: stored
Received on Tue Aug 1 23:31:37 2006

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.