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

JavaHL info2 problem

From: Marcin Porwit <mporwit_at_salesforce.com>
Date: Mon, 27 Aug 2012 15:40:25 -0700

Hi,

I'm running into a problem with the info2 call in the 1.6 JavaHL library. I am attempting to use this to fake password validation for a user, so if this is a bass-ackwards way of doing things, please let me know. I issue two calls to svnclient.info2. The first one does an info2 on the local, checked out directory, and the callback stores the serverUrl (gotten using the getUrl() call). I get the correct value:
        http://10.0.62.148/svn/myproject
The second call then does an svnclient.info2 on the serverUrl. This second call throws a ClientException:
        2012-08-27 15:21:57,446 [main] ERROR P42svnMain - com.salesforce.cheetah.p42svn.SubversionRepositoryException: Could not validate the user [p42svn:p42svn] on repository [http://10.0.62.148/svn/myproject] at com.salesforce.cheetah.p42svn.SubversionRepository.validatePassword(SubversionRepository.java:113) at com.salesforce.cheetah.p42svn.P42svnMain.setupSubversionRepo(P42svnMain.java:46) at com.salesforce.cheetah.p42svn.P42svnMain.main(P42svnMain.java:68) Caused by: org.tigris.subversion.javahl.ClientException: Path is not a working copy directory svn: 'http://10.0.62.148/svn' is not a working copy No such file or directory svn: 'http://10.0.62.148/svn' does not exist at org.tigris.subversion.javahl.SVNClient.info2(Native Method) at org.tigris.subversion.javahl.SVNClientSynchronized.info2(SVNClientSynchronized.java:1779) at com.salesforce.cheetah.p42svn.SubversionRepository.validatePassword(SubversionRepository.java:111) ... 2 more

If I do an svn info from the command line, it works fine:
mporwit-wsl[script]$ svn --username p42svn info http://10.0.62.148/svn/myprojectAuthentication realm: <http://10.0.62.148:80> myproject subversion repository
Password for 'p42svn':

-----------------------------------------------------------------------
ATTENTION! Your password for authentication realm:

   <http://10.0.62.148:80> myproject subversion repository

can only be stored to disk unencrypted! You are advised to configure
your system so that Subversion can store passwords encrypted, if
possible. See the documentation for details.

You can avoid future appearances of this warning by setting the value
of the 'store-plaintext-passwords' option to either 'yes' or 'no' in
'/home/mporwit/.subversion/servers'.
-----------------------------------------------------------------------
Store password unencrypted (yes/no)? no
Path: myproject
URL: http://10.0.62.148/svn/myproject
Repository Root: http://10.0.62.148/svn/myproject
Repository UUID: 945e25ec-ac10-400e-ab83-16708dcd2c39
Revision: 77
Node Kind: directory
Last Changed Author: p42svn
Last Changed Rev: 77
Last Changed Date: 2012-08-26 19:34:58 -0700 (Sun, 26 Aug 2012)

So I'm confused as to why info2 is failing. It seems to be dropping the last element of the path, which is another thing I'm confused about. Pointers to what I am doing wrong are appreciated, as would be pointers on how to better validate a user password prior to doing a commit on the repo.

I'm not subscribed to the mailing list, so an explicit CC would be greatly appreciated.

Thanks,

Marcin
Received on 2012-08-28 07:17:39 CEST

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.