public void unlock(Map pathToTokens, boolean force, ISVNLockHandler handler) throws SVNException {
try {
openConnection();
for (Iterator paths = pathToTokens.keySet().iterator(); paths.hasNext();) {
String path = (String) paths.next();
String shortPath = path;
String id = (String) pathToTokens.get(path);
String repositoryPath = getRepositoryPath(path);
path = getFullPath(path);
path = SVNEncodingUtil.uriEncode(path);
SVNErrorMessage error = null;
try {
myConnection.doUnlock(path, this, id, force);
error = null;
} catch (SVNException e) {
if (e.getErrorMessage() != null && e.getErrorMessage().getErrorCode() == SVNErrorCode.RA_NOT_LOCKED) {
error = e.getErrorMessage();
error = SVNErrorMessage.create(error.getErrorCode(), error.getMessageTemplate(), shortPath);
} else {
throw e;
}
}
if (handler != null) {
handler.handleUnlock(repositoryPath, new SVNLock(path, id, null, null, null, null), error);
}
}
} finally {
closeConnection();
}
}