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

Re: JavaHL setConfigDirectory() and auth cache problems

From: Daniel Rall <dlr_at_collab.net>
Date: 2006-12-20 18:53:08 CET

On Wed, 20 Dec 2006, Patrick Mayweg wrote:

> Hi Daniel,
>
> Daniel Rall wrote:
> >On Tue, 19 Dec 2006, David James wrote:
...
> >>If we need to be compatible with Subversion 1.3.x DLLs, why don't we
> >>simply fix JavaHL to set the config directory to "$HOME/.subversion"?
> >>There's nothing wrong with being explicit, and this is the only
> >>reliable way to initialize the config dir which is compatible with
> >>both Subversion 1.3.x and 1.4.x DLLs.
> >>
> >
> >Java does not support environment variables, so there is no way to
> >access $HOME.
>
> That is not totally true. System.getEnv(String name) does allows you to
> access the environment variables. It does not work for every version,
> because access to environment variables was deprecated by Sun, but the
> were convinced by the users, that this functionality is needed.

This is the behavior that I'm accustomed to:

$ java test
Exception in thread "main" java.lang.Error: getenv no longer supported, use properties and -D instead: HOME
        at java.lang.System.getenv(System.java:691)
        at test.main(test.java:8)

I ran this test using "Java(TM) 2 Runtime Environment, Standard
Edition (build 1.4.2_12-b03)", and recall similar disfunctional
behavior with older JREs.

> In Jdk 1.5 they added a new method, which returns all variables in a
> map. The Subversion core libraries handle this default properly on
> trunk, but IIRC, not gracefully enough in the 1.4.x and earlier
> series.

Yup, "Java(TM) 2 Runtime Environment, Standard Edition (build
1.5.0_07-b03)" now works as expected. Thanks for the update, Patrick.
If I can't weasel some native library version checks into JavaHL's
Java code, we'll go with this as a best-effort attempt to maintain
some compatibility with older native library versions.

Since it's only me that'll be embarrassed here, I'm going to CC the
dev list on this conversation. Hope ya don't mind.

- Dan

  • application/pgp-signature attachment: stored
Received on Wed Dec 20 18:54:47 2006

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