SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CLIENT_INVALID_RELOCATION, "Relocate can only change the repository part of URL");
SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CLIENT_INVALID_RELOCATION, "Relocate can only change the repository part of an URL");
    private Map relocateEntry(SVNEntry entry, String from, String to, Map validatedURLs) throws SVNException {        if (entry.getRepositoryRoot() != null) {            // that is what i do not understand :)            String repos = entry.getRepositoryRoot();            if (from.length() > repos.length()) {                String fromPath = from.substring(repos.length());                if (!to.endsWith(fromPath)) {                    SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CLIENT_INVALID_RELOCATION, "Relocate can only change the repository part of URL");                    SVNErrorManager.error(err);                }                from = repos;                to = to.substring(0, to.length() - fromPath.length());            }            if (repos.startsWith(from)) {                entry.setRepositoryRoot(to + repos.substring(from.length()));            }        }        if (entry.getURL() != null && entry.getURL().startsWith(from)) {            entry.setURL(to + entry.getURL().substring(from.length()));            if (entry.getUUID() != null && validatedURLs != null) {                validatedURLs = validateRelocateTargetURL(entry.getSVNURL(), entry.getUUID(), validatedURLs);            }        }        if (entry.getCopyFromURL() != null && entry.getCopyFromURL().startsWith(from)) {            entry.setCopyFromURL(to + entry.getCopyFromURL().substring(from.length()));            if (entry.getUUID() != null && validatedURLs != null) {                validatedURLs = validateRelocateTargetURL(entry.getCopyFromSVNURL(), entry.getUUID(), validatedURLs);            }        }        return validatedURLs;    }