file.generateDelta(editor); editor.closeFile(null);
file.generateDelta(root.getPath(), editor); editor.closeFile(root.getPath(), null);
    private void doCommit(ISVNEntry root, ISVNEditor editor) throws SVNException {        if (!isModified(root)) {            return;        }        long revision = -1;        String revStr = root.getPropertyValue("svn:entry:committed-rev");        // previous revision!        if (revStr != null) {            revision = Long.parseLong(revStr);        }        root.setPropertyValue("svn:entry:committed-rev", null);        if (root.isScheduledForDeletion()) {            editor.deleteEntry(root.getPath(), revision);        } else if (root.isDirectory()) {            if (root.isScheduledForAddition()) {                editor.addDir(root.getPath(), null, -1);            } else {                if ("".equals(root.getPath())) {                    editor.openRoot(revision);                } else {                    editor.openDir(root.getPath(), revision);                }            }            // update modified props.            // recurse            // drop "schedule" property from entry            List toDelete = new LinkedList();            ISVNDirectoryEntry dir = (ISVNDirectoryEntry) root;            for(Iterator children = dir.childEntries(); children.hasNext();) {                ISVNEntry child = (ISVNEntry) children.next();                doCommit(child, editor);                // if was scheduled for deletion => simply delete                if (child.isScheduledForDeletion()) {                    toDelete.add(child.getName());                } else {                    // remove schedule=add                    dir.unschedule(child.getName());                }            }            for(Iterator deleted = toDelete.iterator(); deleted.hasNext();) {                dir.deleteChild((String) deleted.next(), false);            }            editor.closeDir();            if ("".equals(root.getPath())) {                SVNCommitInfo info = editor.closeEdit();                updateWorkingCopy(root, info, root.getPropertyValue("svn:entry:uuid"));                root.dispose();            }        } else {            if (root.isScheduledForAddition()) {                editor.addFile(root.getPath(), null, -1);            } else {                editor.openFile(root.getPath(), revision);            }            // update modified props.            // drop "commited-rev" -> will be reset.            ISVNFileEntry file = (ISVNFileEntry) root;            file.generateDelta(editor);            editor.closeFile(null);        }    }