} catch (SVNException svne) { if (svne.getCause() instanceof FileNotFoundException) { format = DB_FORMAT; }
    public void open() throws SVNException {        // repo format /root/format        FSFile formatFile = new FSFile(new File(myRepositoryRoot, "format"));        int format = -1;        try {            format = formatFile.readInt();        } finally {            formatFile.close();        }        if (format != REPOSITORY_FORMAT) {            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.REPOS_UNSUPPORTED_VERSION, "Expected format ''{0,number,integer}'' of repository; found format ''{1,number,integer}''", new Object[]{new Integer(REPOSITORY_FORMAT), new Integer(format)});            SVNErrorManager.error(err);        }        // fs format /root/db/format        formatFile = new FSFile(new File(myDBRoot, "format"));        try {            format = formatFile.readInt();        } finally {            formatFile.close();        }        if (format != DB_FORMAT) {            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_UNSUPPORTED_FORMAT, "Expected FS format ''{0,number,integer}''; found format ''{1,number,integer}''", new Object[]{new Integer(DB_FORMAT), new Integer(format)});            SVNErrorManager.error(err);        }        // fs type /root/db/fs-type        formatFile = new FSFile(new File(myDBRoot, "fs-type"));        String fsType = null;        try {            fsType = formatFile.readLine(128);            } finally {            formatFile.close();        }        if (!DB_TYPE.equals(fsType)) {            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_UNKNOWN_FS_TYPE, "Unsupported fs type ''{0}''", fsType);            SVNErrorManager.error(err);        }        File dbCurrentFile = getCurrentFile();        if(!(dbCurrentFile.exists() && dbCurrentFile.canRead())){            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR, "Can''t open file ''{0}''", dbCurrentFile);            SVNErrorManager.error(err);        }            }