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

Re: JavaHL info2 problem

From: Marcin Porwit <mporwit_at_salesforce.com>
Date: Tue, 28 Aug 2012 10:14:49 -0700

Hi Mark,

I'm calling the non-deprecated version of info2:
http://subversion.apache.org/docs/javahl/1.7/org/tigris/subversion/javahl/SVNClientInterface.html#info2(java.lang.String, org.tigris.subversion.javahl.Revision, org.tigris.subversion.javahl.Revision, int, java.lang.String[], org.tigris.subversion.javahl.InfoCallback)

You're right in that it looks like it is treating the URL as a local file system path… and yes, I'm passing in null for both the Revsion and pegRevision arguments. What should I be passing in instead? The svn info from the command line does not take a revision -- does it pass one in implicitly?

My first call to info2 uses the local file system path:
svnclient.info2(destdir, null, null, 0, null, infoCallback);

The second call to info2 uses the server URL I got from the first info2 call:
svnclient.info2(serverURI, null, null, 0, null, infoCallback);

The actual infoCallback is as follows:
        class InformationCallback implements InfoCallback {
                private SubversionRepository repo;

                InformationCallback(SubversionRepository repo) {
                        this.repo = repo;
                }

                public void singleInfo(Info2 info) {
                        repo.setServerURI(info.getReposRootUrl());
                }

        }

Thanks,

MKP
On Aug 28, 2012, at 6:06 AM, Mark Phippard wrote:

> On Mon, Aug 27, 2012 at 6:40 PM, Marcin Porwit <mporwit_at_salesforce.com> wrote:
>
>
>> 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:
>
> Which method are you calling? What are you passing for the Revision
> and pegRevision arguments?
>
> It seems like it is interpreting the String you are passing as a local
> path. I am guessing you are passing null or something else in the
> revision arguments that would cause it do this.
>
> --
> Thanks
>
> Mark Phippard
> http://markphip.blogspot.com/
Received on 2012-08-28 19:15:26 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.