DebugLog.log("one of the targets is file");
    public void doMerge(String url1, String url2, SVNRevision rN,            SVNRevision rM, File dstPath, boolean recursive,            boolean useAncestry, boolean force, boolean dryRun)            throws SVNException {        // create merge editor that will receive diffs between url1 and url2        // (rN|rM)        url1 = validateURL(url1);        url2 = validateURL(url2);        DebugLog.log("url1: " + url1);        DebugLog.log("url2: " + url2);        rN = rN == null || !rN.isValid() ? SVNRevision.HEAD : rN;        rM = rM == null || !rM.isValid() ? SVNRevision.HEAD : rM;        SVNWCAccess wcAccess = createWCAccess(dstPath);        try {            wcAccess.open(true, recursive);            SVNRepository repos1 = createRepository(url1);            SVNRepository repos2 = createRepository(url1);            final long revN = getRevisionNumber(url1, rN);            long revM = getRevisionNumber(url2, rM);            SVNRepository repos3 = createRepository(url2);            if (SVNProperty.KIND_FILE.equals(wcAccess                    .getTargetEntryProperty(SVNProperty.KIND))) {                SVNMerger merger = new SVNMerger(wcAccess, url2, revM, force,                        dryRun, isLeaveConflictsUnresolved());                mergeSingleFile(wcAccess, repos1, repos3, revN, revM, merger);                return;            }            SVNNodeKind nodeKind1 = repos1.checkPath("", revN);            SVNNodeKind nodeKind2 = repos3.checkPath("", revM);            String target = null;            if (nodeKind1 == SVNNodeKind.FILE || nodeKind2 == SVNNodeKind.FILE) {                DebugLog.log("one of the targets is file");                target = PathUtil.tail(url1);                target = PathUtil.decode(target);                url1 = PathUtil.removeTail(url1);                repos1 = createRepository(url1);                repos2 = createRepository(url1);            }            url2 = PathUtil.decode(url2);            SVNMerger merger = new SVNMerger(wcAccess, url2, revM, force,                    dryRun, isLeaveConflictsUnresolved());            DebugLog.log("wc access: " + wcAccess);            DebugLog.log("url1: " + url1);            DebugLog.log("url2: " + url2);            DebugLog.log("revM: " + revM);            DebugLog.log("revN: " + revN);            DebugLog.log("target: " + target);            SVNMergeEditor mergeEditor = new SVNMergeEditor(wcAccess, repos2,                    revN, revM, merger);            repos1.diff(url2, revM, revN, target, !useAncestry, recursive,                    new ISVNReporterBaton() {                        public void report(ISVNReporter reporter)                                throws SVNException {                            reporter.setPath("", null, revN, false);                            reporter.finishReport();                        }                    }, mergeEditor);        } finally {            wcAccess.close(true);        }    }