workspace.addWorkspaceListener(new SVNWorkspaceAdapter() { public void committed(String committedPath, int kind) { try { committedPath = convertPath(homePath, workspace, committedPath); } catch (IOException e) {} println(out, "Adding " + committedPath); } }); SVNRepositoryLocation location = SVNRepositoryLocation.parseURL(url); String message = (String) getCommandLine().getArgumentValue(SVNArgument.MESSAGE); if (message == null) { DebugLog.log("NO MESSAGE!"); message = ""; } long revision = workspace.commit(location, wsPath, message); out.println("Imported revision " + revision + ".");
    public void run(final PrintStream out, PrintStream err) throws SVNException {        final String path = getCommandLine().getPathAt(0);        String url = getCommandLine().getURL(0);        DebugLog.log("import url: " + url);        DebugLog.log("import path: " + path);        final ISVNWorkspace workspace = createWorkspace(path, false);        final String homePath = path;        DebugLog.log("import root: " + workspace.getID());        String wsPath = SVNUtil.getWorkspacePath(workspace, path);        if (wsPath.trim().length() == 0) {            wsPath = null;        } else {            url = PathUtil.removeTail(url);        }        workspace.addWorkspaceListener(new SVNWorkspaceAdapter() {            public void committed(String committedPath, int kind) {                try {                    committedPath = convertPath(homePath, workspace, committedPath);                } catch (IOException e) {}                println(out, "Adding " + committedPath);            }        });        SVNRepositoryLocation location = SVNRepositoryLocation.parseURL(url);        String message = (String) getCommandLine().getArgumentValue(SVNArgument.MESSAGE);        if (message == null) {            DebugLog.log("NO MESSAGE!");            message = "";        }        long revision = workspace.commit(location, wsPath, message);        out.println("Imported revision " + revision + ".");    }