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. 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