DebugLog.log("needs lock: " + needsLock);
    public boolean revert(String name) throws SVNException {        DebugLog.log("reverting: " + name + " in " + getRoot());        boolean magicPropsChanged = false;        boolean wasReverted = false;                SVNEntry entry = getEntries().getEntry(name);        if (entry == null || entry.isHidden()) {            return wasReverted;        }                SVNProperties baseProps = getBaseProperties(name, false);        SVNProperties wcProps = getProperties(name, false);        if (hasPropModifications(name)) {            DebugLog.log("props modified");            Map propDiff = baseProps.compareTo(wcProps);            if (propDiff != null && !propDiff.isEmpty()) {                magicPropsChanged = propDiff.containsKey(SVNProperty.EXECUTABLE) ||                    propDiff.containsKey(SVNProperty.KEYWORDS) ||                    propDiff.containsKey(SVNProperty.NEEDS_LOCK) ||                    propDiff.containsKey(SVNProperty.EOL_STYLE) ||                    propDiff.containsKey(SVNProperty.SPECIAL);                            }            // copy base over wc            if (baseProps.getFile().isFile()) {                baseProps.copyTo(wcProps);                entry.setPropTime(TimeUtil.formatDate(new Date(wcProps.getFile().lastModified())));            } else if (wcProps.getFile().isHidden()) {                wcProps.delete();                entry.setPropTime(null);            }            getEntries().save(false);                        wasReverted |= true;        } else if (entry.isScheduledForReplacement()) {            baseProps.copyTo(wcProps);            entry.setPropTime(TimeUtil.formatDate(new Date(wcProps.getFile().lastModified())));            wasReverted |= true;        }        DebugLog.log("m.props changed: " + magicPropsChanged);                if (entry.isFile()) {            boolean textModified = false;            if (!magicPropsChanged) {                textModified = hasTextModifications(name, false);            }            File file = getFile(entry.getName(), false);            if (textModified || magicPropsChanged || !file.exists()) {                // copy base to wc and expand.                String eolStyle = wcProps.getPropertyValue(SVNProperty.EOL_STYLE);                String keywords = wcProps.getPropertyValue(SVNProperty.KEYWORDS);                String url = entry.getURL();                String author = entry.getAuthor();                String date = entry.getCommittedDate();                String rev = Long.toString(entry.getCommittedRevision());                boolean special = wcProps.getPropertyValue(SVNProperty.SPECIAL) != null;                                Map keywordsMap = SVNTranslator.computeKeywords(keywords, url, author, date, rev);                File src = getBaseFile(name, false);                File dst = getFile(name, false);                SVNTranslator.translate(this, name, SVNFileUtil.getBasePath(src), SVNFileUtil.getBasePath(dst), true, true);                                boolean executable = wcProps.getPropertyValue(SVNProperty.EXECUTABLE) != null;                boolean needsLock = wcProps.getPropertyValue(SVNProperty.NEEDS_LOCK) != null;                DebugLog.log("needs lock: " + needsLock);                if (executable) {                    SVNFileUtil.setExecutable(dst, true);                }                if (needsLock) {                    try {                        SVNFileUtil.setReadonly(dst, entry.getLockToken() == null);                    } catch (IOException e) {                        SVNErrorManager.error(0, e);                    }                }                long tstamp = dst.lastModified();                if (myWCAccess.getOptions().isUseCommitTimes() && !special) {                    entry.setTextTime(entry.getCommittedDate());                    tstamp = TimeUtil.parseDate(entry.getCommittedDate()).getTime();                    dst.setLastModified(tstamp);                } else {                    entry.setTextTime(TimeUtil.formatDate(new Date(tstamp)));                }                getEntries().save(false);                wasReverted |= true;            }            wasReverted |= markResolved(name, true, false);        }        return wasReverted;    }