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

Re: Java Libraries: Dumbo Question about svn_client.h

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2001-07-16 17:52:16 CEST

Alexander Mueller <alex@littleblue.de> writes:

> Right now I am working on the interface definitions for the Java Lib
> Classes. First I thought implementing classes and methods that
> would fit the "svn_client.h" and the "svn_wc.h" function definitions
> would be enough. It would suffice, if there weren't the "editor"
> parameters in the "svn_commit" and "svn_update" functions.

Do you understand `editors' now, having read svn_delta_edit_fns_t in
svn_delta.h? I don't mean to sound condescending; I'm just trying to
figure out how much you've learned so far.

The `editor' arguments in svn_client_*() are all optional. They're
defined as "before" and "after" editors... which means their routines
will be called before and after editor-events take place. (We should
update the doc strings to say that they're optional!)

For example, look at svn_client_checkout(). If you call it like

   svn_client_checkout (NULL, NULL, NULL, NULL,
                        SVN_INVALID_REVNUM, 0, NULL, pool)

Then you will end up with a working copy in a directory called
"working_copy_dir", which contains the latest version of the
'barproject' directory from the 'file:///home/foo/repo' repository.

(Note that the const char * arguments above actually need to be
created with svn_stringbuf_create()).

Now, suppose you have a GUI client. Every time a new file is added to
your working copy during a checkout, you want little yellow chickens
to dance across the screen. Or maybe you just want a graphical
status-bar indicator. So... just write your own editor, and make its
add_file() routine do these things. Then pass your editor to
svn_client_checkout as an "after" editor. Voila.... extensibility.

> Ok. What to do next? I still have to write the JNI functions. But I
> dont wan't to reimplement functionality that's already there. Can we
> shift something in between "svn_cl__update" and "svn_update"? Or
> shall I use "svn_cl__update" directly from my code?

Why do you need to use any code at all in svn_cl__* ?

The svn_cl__* code is the command-line client. You should definitely
look at it as an example of "how to use svn_client.h"... but you
shouldn't write JNI wrappers around them! Wrap svn_client.h and the
headers it immediately depends on.

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:33 2006

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