Hello Andy,
Sorry for not replying for a while. Your code is correct, but SVNKit has a bug
(usually people don't
call "svn info" recursively, that's why nobody noticed it before).
I've created an issue for it (http://issues.tmatesoft.com/issue/SVNKIT-379), so
let's continue all
discussions on it there.
As soon as I fix it, the fix will become a part of SVNKit 1.7.10. or if you
don't want to wait for
1.7.10, you can build SVNKit yourself from 1.7.x branch.
--
Dmitry Pavlenko,
TMate Software,
http://subgit.com/ - git-svn bridge
> Please forgive me if you see this more than once: I seem to have
> accidentally buried my first attempt at the end of a different thread.
>
> Thanks to Dmitry's earlier help, I've been able to get a single file's lock
> information just fine. Now, of course, I need to find the lock information
> for every file in a directory. To be specific, I'm hoping to read all of
> the locks in an SVN repository folder, without having to download any of
> those files to my own working copy. Unfortunately, svnInfo.getLock() seems
> to be returning NULL for every file, even when Sventon confirms that a
> file has a lock on it.
>
> Here's the part of the program that initiates the svninfo request:
>
> SVNURL codelineUrl = SVNURL.parseURIEncoded
> (urlOfSingleFolderInSvnRepos); SvnGetInfo svnGetInfo =
> svnOperationFactory.createGetInfo();
> SvnTarget svnTarget = SvnTarget.fromURL(codelineUrl, SVNRevision.HEAD);
> svnGetInfo.addTarget(svnTarget);
> svnGetInfo.setDepth(SVNDepth.INFINITY);
> SvnLocksReceiver svnLocksReceiver = new SvnLocksReceiver(svnUserName);
> svnGetInfo.setReceiver(svnLocksReceiver);
> svnGetInfo.run();
>
> I've tried appending "@HEAD" to my URL-string, but that caused an error.
> I've tried calling SvnTarget.fromURL() with and without its 'pegRevision'
> parameter, but it doesn't seem to make a difference.
>
> Here's the part of the program that implements the receiver's "receive"
> method, which I've confirmed is getting called once for each file in the
> requested directory:
>
> public void receive
> (SvnTarget svnTarget,
> SvnInfo svnInfo)
> throws SVNException
> {
> SVNLock svnLock = svnInfo.getLock(); // THIS ALWAYS RETURNS NULL
>
> if (svnLock == null)
> {
> return;
> }
>
> if (specifiedUsername.equals(svnLock.getOwner()))
> {
> this.filesLockedByUser.add(svnInfo);
> }
> }
>
> So, can you tell me what I should be doing differently, so that
> svnInfo.getLock() won't always return NULL?
>
> Thanks for any help,
>
> Andy
>
> Andy Cohen
> Principal Software Engineer
> Product Development
> Innovative Interfaces, Inc.
> 5850 Shellmound Way
> Emeryville, CA 94608
>
> [letter-t] 510-655-6200 Ext 4221
> [letter-e] [email protected]
>
> [INNOIcon]<http://www.iii.com/> [TwritterIcon]
> <https://twitter.com/iii_Innovative> [FacebookIcon]
> <https://www.facebook.com/InnovativeInterfaces>