public static void writeDigestLockFile(SVNLock lock, Collection children, String repositoryPath, File reposRootDir) throws SVNException {
private static void writeDigestLockFile(SVNLock lock, Collection children, String repositoryPath, File reposRootDir) throws SVNException {
    public static void writeDigestLockFile(SVNLock lock, Collection children, String repositoryPath, File reposRootDir) throws SVNException {        if(!ensureDirExists(FSRepositoryUtil.getDBLocksDir(reposRootDir), true)){            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.UNKNOWN, "Can't create a directory at ''{0}''", FSRepositoryUtil.getDBLocksDir(reposRootDir));            SVNErrorManager.error(err);        }        File digestLockFile = FSRepositoryUtil.getDigestFileFromRepositoryPath(repositoryPath, reposRootDir);        File lockDigestSubdir = FSRepositoryUtil.getDigestSubdirectoryFromDigest(FSRepositoryUtil.getDigestFromRepositoryPath(repositoryPath), reposRootDir);        if(!ensureDirExists(lockDigestSubdir, true)){            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.UNKNOWN, "Can't create a directory at ''{0}''", lockDigestSubdir);            SVNErrorManager.error(err);        }        Map props = new HashMap();        if(lock != null){            props.put(FSConstants.PATH_LOCK_KEY, lock.getPath());            props.put(FSConstants.OWNER_LOCK_KEY, lock.getOwner());            props.put(FSConstants.TOKEN_LOCK_KEY, lock.getID());            props.put(FSConstants.IS_DAV_COMMENT_LOCK_KEY, "0");            if(lock.getComment() != null){                props.put(FSConstants.COMMENT_LOCK_KEY, lock.getComment());            }            if(lock.getCreationDate() != null){                props.put(FSConstants.CREATION_DATE_LOCK_KEY, SVNTimeUtil.formatDate(lock.getCreationDate()));            }            if(lock.getExpirationDate() != null){                props.put(FSConstants.EXPIRATION_DATE_LOCK_KEY, SVNTimeUtil.formatDate(lock.getExpirationDate()));            }        }        if(children != null && children.size() > 0){            Object[] digests = children.toArray();            StringBuffer value = new StringBuffer();            for(int i = 0; i < digests.length; i++){                value.append(digests[i]);                value.append('\n');            }            props.put(FSConstants.CHILDREN_LOCK_KEY, value.toString());        }        try{            SVNProperties.setProperties(props, digestLockFile);        }catch(SVNException svne){            SVNErrorMessage err = svne.getErrorMessage().wrap("Cannot write lock/entries hashfile ''{0}''", digestLockFile);            SVNErrorManager.error(err, svne);        }    }