editor.textDeltaEnd();
editor.textDeltaEnd(filePath);
    private static SVNCommitInfo addDir(ISVNEditor editor, String dirPath,            String filePath, byte[] data) throws SVNException {        /*         * Always called first. Opens the current root directory. It means all         * modifications will be applied to this directory until a next entry         * (located inside the root) is opened.         */        editor.openRoot(-1);        /*         * Adds a new directory (not a copy of an existing one in the         * repository) to the currently opened directory (in this case - to the         * root directory for which the SVNRepository was created). Since this         * moment all changes will be applied to this new directory.         *          * dirPath is relative to the root directory.         */        editor.addDir(dirPath, null, -1);        /*         * Adds a new file (not a copy) to the just added directory. The file         * path is also defined as relative to the root directory.         *           */        editor.addFile(filePath, null, -1);        /*         * The next steps are directed to applying and writing the file delta         * (that is the full contents of the file in this case).         */        editor.applyTextDelta(null);        long deltaLength = data.length;        /*         * Creating a new diff window (provided the size of the delta -         * deltaLength) that will contain instructions of applying the delta to         * the file in the repository.         */        SVNDiffWindow diffWindow = SVNDiffWindowBuilder                .createReplacementDiffWindow(deltaLength);        /*         * Gets an OutputStream where the delta will be written to.         */        OutputStream os = editor.textDeltaChunk(diffWindow);        try {            /*             * If the file is not empty this code writes the file delta to the             * OutputStream.             */            for (int i = 0; i < deltaLength; i++) {                os.write(data[i]);            }        } catch (IOException ioe) {            System.err.println("An i/o error while writing the delta bytes: "                    + ioe.getMessage());        } finally {            /*            * Don't forget to close the stream after you have written the            * delta!            */            if (os != null) {                try {                    os.close();                } catch (IOException ioeInternal) {                    //                }            }        }        /*         * Finally closes the delta when all the bytes are already written. From         * this point the previously defined diff window knows how to apply the         * delta to the file (that will be created in the repository).         */        editor.textDeltaEnd();        /*         * Closes the new added file.         */        editor.closeFile(null);        /*         * Closes the new added directory.         */        editor.closeDir();        /*         * Closes the root directory.         */        editor.closeDir();        /*         * This is the final point in all editor handling. Only now all that new         * information previously described with the editor's methods is sent to         * the server for committing. As a result the server sends the new         * commit information.         */        return editor.closeEdit();    }