repository.lock(pathsRevisionsMap, lockMessage, stealLock, new ISVNLockHandler() {
public void handleLock(String path, SVNLock lock, SVNErrorMessage error) throws SVNException {
SVNURL fullURL = rootURL.appendPath(path, false);
LockInfo lockInfo = (LockInfo) entriesMap.get(fullURL);
SVNAdminArea dir = wcAccess.probeRetrieve(lockInfo.myFile);
if (error == null) {
SVNEntry entry = wcAccess.getVersionedEntry(lockInfo.myFile, false);
entry.setLockToken(lock.getID());
entry.setLockComment(lock.getComment());
entry.setLockOwner(lock.getOwner());
entry.setLockCreationDate(SVNDate.formatDate(lock.getCreationDate()));
// get properties and values.
SVNVersionedProperties props = dir.getProperties(entry.getName());
if (props.getPropertyValue(SVNProperty.NEEDS_LOCK) != null) {
SVNFileUtil.setReadonly(dir.getFile(entry.getName()), false);
}
SVNFileUtil.setExecutable(dir.getFile(entry.getName()), props.getPropertyValue(SVNProperty.EXECUTABLE) != null);
dir.saveEntries(false);
handleEvent(SVNEventFactory.createLockEvent(dir.getFile(entry.getName()), SVNEventAction.LOCKED, lock, null),
ISVNEventHandler.UNKNOWN);
} else {
handleEvent(SVNEventFactory.createLockEvent(dir.getFile(lockInfo.myFile.getName()), SVNEventAction.LOCK_FAILED, lock, error),
ISVNEventHandler.UNKNOWN);
}
}
public void handleUnlock(String path, SVNLock lock, SVNErrorMessage error) {