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

Re: request to add new method in javahl: SVNClient.isValidPath

From: Daniel Rall <dlr_at_collab.net>
Date: 2006-03-16 02:07:58 CET

On Fri, 10 Mar 2006, Tim Dionne wrote:

> Hi --
>
> I'm working on a java application that stores data in the subversion repository.
> I would like to be able to validate svn paths before using them, so I created a new
> javahl method called isValidPath which calls the C api svn_path_check_valid.
> I've tested the changes locally and they are working. So I'm proposing that they
> be incorporated into subversion

Generally speaking, looks good to me.

I have one main objection, which is easily rectifiable: this function
isn't specific to the client library, but part of the utility library
(declared in svn_path.h).

AFAICT, there's only one other set of APIs on the SVNClient JNI
binding which doesn't belong to the client library:
getAdminDirectoryName() and setAdminDirectoryName().

I'd prefer to create a separate JNI binding which exposes a native API
on a new class (maybe org.tigris.subversion.Path?). Thoughts?

> with the following log message:
>
> Add isValidPath javahl api. The native java method calls
> svn_path_check_valid and returns a jboolean of true if the return value
> of svn_path_check_valid is SVN_NO_ERROR. The error message does not
> appear to be l10n/i18n so I have localized my own message in CEE.

You can leave out the bit about localization and CEE, and focus on
behavior and implementation in the change summary. The gory details
should show up below, in the per-file/symbol portion of the change
log.

> * subversion/bindings/java/javahl/native/SVNClient.cpp
> (isValidPath): New function which calls svn_path_check_valid and returns
> a jboolean of true if the return value is SVN_NO_ERROR.
>
> *
> subversion/bindings/java/javahl/native/org_tigris_subversion_javahl_SVNClient.cpp
> (Java_org_tigris_subversion_javahl_SVNClient_isValidPath): New function
> which sets up a JNI call to SVNClient.isValidPath
>
> * subversion/bindings/java/javahl/native/SVNClient.h
> (isValidPath): New function declaration.
>
> *
> subversion/bindings/java/javahl/src/org/tigris/subversion/javahl/SVNClientInterface.java
> (isValidPath): New interface declaration.
>
> *
> subversion/bindings/java/javahl/src/org/tigris/subversion/javahl/SVNClient.java
> (isValidPath): New native method declaration.
>
> *
> subversion/bindings/java/javahl/src/org/tigris/subversion/javahl/SVNClientSynchronized.java
> (isValidPath): New method implementation which calls the native method
> in a synchronized block.

  • application/pgp-signature attachment: stored
Received on Thu Mar 16 01:59:11 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.