SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_OUT_OF_DATE, "Lock failed: newer version of ''{0}'' exists", path);
SVNErrorManager.error(err, SVNLogType.FSFS);
}
}
SVNLock existingLock = getLockHelper(path, true);
if (existingLock != null) {
if (!stealLock) {
SVNErrorManager.error(FSErrors.errorPathAlreadyLocked(existingLock.getPath(), existingLock.getOwner(), this), SVNLogType.FSFS);
} else {
deleteLock(existingLock);
}
}
SVNLock lock = null;
if (token == null) {
String uuid = SVNUUIDGenerator.formatUUID(SVNUUIDGenerator.generateUUID());
token = FSFS.SVN_OPAQUE_LOCK_TOKEN + uuid;
lock = new FSLock(path, token, username, comment, new Date(System.currentTimeMillis()), expirationDate, isDAVComment);
} else {