On Tue, 01 Aug 2006, Dan Pozmanter wrote:
> Hmmm, that sounds nice. I suppose I am biased towards dev time itself.
> I will be able to go straight in without auth.
Okay. Subversion has two layers which you might be interested in --
libsvn_repos, and libsvn_fs. It sounds like libsvn_fs would be more
useful to you. Should also/instead expose a repos layer, or is
SVNClient sufficient API here?
> (pools would be automatic)
Yup. Pools are currently managed in the C++ JNI code using
thread-local storage. This should work fine for a repository or FS
The pseudo-code you listed below is quite helpful. More comments
> svnConnection conn = new svnConnection(reposPath);
Is this a connection to the repos (the thing that Subversion's RA
layer talks to, like svnserve or mod_dav_svn), or directly to the FS?
While I rather like how you've made this object look JDBC
Connection-like, how about calling it what it is instead
(e.g. SVNFileSystem or SVNRepository)?
If we stayed with the Connection metaphor (or are talking directly to
the FS), I'd suggest beginTrans().
> svnPath sp = new svnPath(conn, path);
A slightly different usage pattern involving retrofitting the existing
org.tigris.subversion.javahl.Path class or using a basic data type
like java.lang.String. See below.
I wouldn't think that we need an explicit transaction to retrieve
logs. This functionality is already available through SVNClient, but
Allowing a series of editor-esque operation here inside the
transaction sounds good. What do the other bindings allow?
> svnFile f = sp.getFile(subpath);
> f.read(); //Whole String
> f.write(data); //Whole String
I'm not sure that I follow these.
commitTrans(), I take it?
This would typically be found in a catch block?
> -----Original Message-----
> From: Daniel Rall [mailto:email@example.com]
> Sent: Tuesday, August 01, 2006 5:30 PM
> To: Dan Pozmanter
> Cc: firstname.lastname@example.org
> Subject: Re: Java Question
> 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,
> > 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.
Received on Wed Aug 2 00:51:58 2006
- application/pgp-signature attachment: stored