try { read("x", buffer); read("[()]", buffer); return; } catch (SVNException e2) {  SVNDebugLog.logInfo(e2);  }
    public void lock(Map pathsToRevisions, String comment, boolean force, ISVNLockHandler handler) throws SVNException {        try {            openConnection();            Object[] buffer = new Object[] { "lock-many", comment, Boolean.valueOf(force) };            write("(w((s)w(", buffer);            buffer = new Object[2];            for (Iterator paths = pathsToRevisions.keySet().iterator(); paths.hasNext();) {                buffer[0] = paths.next();                buffer[1] = pathsToRevisions.get(buffer[0]);                write("(s(n))", buffer);            }            write(")))", buffer);            try {                authenticate();            } catch (SVNException e) {                if (e.getMessage() != null && e.getMessage().toLowerCase().indexOf("unknown command") > 0) {                    lock12(pathsToRevisions, comment, force, handler);                    return;                }                throw e;            }            for (Iterator paths = pathsToRevisions.keySet().iterator(); paths.hasNext();) {                String path = (String) paths.next();                SVNLock lock = null;                SVNException error = null;                try {                    read("[L]", buffer);                    lock = (SVNLock) buffer[0];                    path = lock.getPath();                } catch (SVNException e) {                    // try to read 'x'                    try {                        read("x", buffer);                        read("[()]", buffer);                        return;                    } catch (SVNException e2) {                        //                        SVNDebugLog.logInfo(e2);                        //                    }                    path = getRepositoryPath(path);                    error = e;                }                if (handler != null) {                    handler.handleLock(path, lock, error);                }            }            read("x", buffer);            read("[()]", buffer);        } finally {            closeConnection();        }    }