public void unlockPath(String path, String token, String username, boolean breakLock) throws SVNException { String[] paths = {path}; if (!breakLock && username == null) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_NO_USER, "Cannot unlock path ''{0}'', no authenticated username available", path); SVNErrorManager.error(err); } FSHooks.runPreUnlockHook(myRepositoryRoot, path, username); FSWriteLock writeLock = FSWriteLock.getWriteLock(this); synchronized (writeLock) { try { writeLock.lock(); unlock(path, token, username, breakLock); } finally { writeLock.unlock(); FSWriteLock.realease(writeLock); } } try { FSHooks.runPostUnlockHook(myRepositoryRoot, paths, username); } catch (SVNException svne) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.REPOS_POST_UNLOCK_HOOK_FAILED, "Unlock succeeded, but post-unlock hook failed"); err.setChildErrorMessage(svne.getErrorMessage()); SVNErrorManager.error(err, svne); } }
FSHooks.runPostUnlockHook(myRepositoryRoot, paths, username); } catch (SVNException svne) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.REPOS_POST_UNLOCK_HOOK_FAILED, "Unlock succeeded, but post-unlock hook failed");
FSHooks.runPostUnlockHook(myRepositoryRoot, paths, username); } catch (SVNException svne) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.REPOS_POST_UNLOCK_HOOK_FAILED, "Unlock succeeded, but post-unlock hook failed");
public void unlockPath(String path, String token, String username, boolean breakLock, boolean enableHooks) throws SVNException { path = SVNPathUtil.canonicalizeAbsolutePath(path); String[] paths = {path}; if (!breakLock && username == null) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_NO_USER, "Cannot unlock path ''{0}'', no authenticated username available", path); SVNErrorManager.error(err, SVNLogType.FSFS); } if (enableHooks && isHooksEnabled()) { FSHooks.runPreUnlockHook(myRepositoryRoot, path, username); } FSWriteLock writeLock = FSWriteLock.getWriteLockForDB(this); synchronized (writeLock) { try { writeLock.lock(); unlock(path, token, username, breakLock); } finally { writeLock.unlock(); FSWriteLock.release(writeLock); } } if (enableHooks && isHooksEnabled()) { try { FSHooks.runPostUnlockHook(myRepositoryRoot, paths, username); } catch (SVNException svne) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.REPOS_POST_UNLOCK_HOOK_FAILED, "Unlock succeeded, but post-unlock hook failed"); err.setChildErrorMessage(svne.getErrorMessage()); SVNErrorManager.error(err, svne, SVNLogType.FSFS); } } }