if (changedPath != null && changedPath.getType() == SVNLogEntryPath.TYPE_ADDED && changedPath.getCopyPath() != null && changedPath.getCopyRevision() >= 0) {
if (changedPath != null && (changedPath.getType() == SVNLogEntryPath.TYPE_ADDED || changedPath.getType() == SVNLogEntryPath.TYPE_REPLACED) && changedPath.getCopyPath() != null && changedPath.getCopyRevision() >= 0) {
    public void addFile(String path, String copyFromPath, long copyFromRevision) throws SVNException {        EntryBaton baton = new EntryBaton();        myPathsToFileBatons.put(path, baton);        String absPath = myRepos.getRepositoryPath(path);        SVNLogEntryPath changedPath = (SVNLogEntryPath) myChangedPaths.get(absPath);                if (changedPath != null && changedPath.getType() == SVNLogEntryPath.TYPE_ADDED && changedPath.getCopyPath() != null && changedPath.getCopyRevision() >= 0) {            baton.myPropsAct = DECIDE;            baton.myTextAct = ACCEPT;            if (areFileContentsEqual(absPath, myTargetRevision, changedPath.getCopyPath(), changedPath.getCopyRevision())) {                baton.myTextAct = IGNORE;            }                        HashMap props = new HashMap();            SVNRepository rep = SVNRepositoryFactory.create(myRepos.getLocation());            rep.setAuthenticationManager(myRepos.getAuthenticationManager());            rep.getFile(changedPath.getCopyPath(), changedPath.getCopyRevision(), props, null);                        baton.myProps = props;            myCommitEditor.addFile(path, changedPath.getCopyPath(), changedPath.getCopyRevision());            SVNDebugLog.logInfo("Adding file '" + absPath + "'");        } else if (changedPath != null && (changedPath.getType() == SVNLogEntryPath.TYPE_ADDED || changedPath.getType() == SVNLogEntryPath.TYPE_REPLACED)) {            baton.myPropsAct = ACCEPT;            baton.myTextAct = ACCEPT;            if(changedPath.getType() == SVNLogEntryPath.TYPE_REPLACED){                myCommitEditor.deleteEntry(path, myTargetRevision);                myChangedPaths.remove(absPath);            }            myCommitEditor.addFile(path, null, -1);            SVNDebugLog.logInfo("Adding file '" + absPath + "'");        } else if (changedPath != null && changedPath.getType() == SVNLogEntryPath.TYPE_MODIFIED) {            baton.myPropsAct = DECIDE;            baton.myTextAct = ACCEPT;            SVNLogEntryPath realPath = getFileCopyOrigin(absPath);            if (realPath == null) {                SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.UNKNOWN, "Unknown error, can't get the copy origin of a file");                SVNErrorManager.error(err);            }            if (areFileContentsEqual(absPath, myTargetRevision, realPath.getCopyPath(), realPath.getCopyRevision())) {                baton.myTextAct = IGNORE;            }            HashMap props = new HashMap();            SVNRepository rep = SVNRepositoryFactory.create(myRepos.getLocation());            rep.setAuthenticationManager(myRepos.getAuthenticationManager());            rep.getFile(realPath.getCopyPath(), realPath.getCopyRevision(), props, null);            baton.myProps = props;            myCommitEditor.openFile(path, myTargetRevision);            SVNDebugLog.logInfo("Opening file '" + absPath + "'");        } else if (changedPath == null) {            baton.myPropsAct = IGNORE;            baton.myTextAct = IGNORE;            myCommitEditor.openFile(path, myTargetRevision);            SVNDebugLog.logInfo("Opening file '" + absPath + "'");        } else {            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.UNKNOWN, "Unknown bug in addFile()");            SVNErrorManager.error(err);        }    }