dstDir.updateURL(SVNProperty.URL, true);
dstDir.updateURL(dstURL, true);
    public static void doMove(File src, File dst) throws SVNException {        if (dst.exists()) {            throw new SVNException("svn: Cannot move '" + src + "' over existing file '" + dst);        } else if (!src.exists()) {            throw new SVNException("svn: Cannot move '" + src + "'; file does not exist");        }        // src condidered as unversioned when it is not versioned        boolean srcIsVersioned = isVersionedFile(src);        // dst is considered as unversioned when its parent is not versioned.        boolean dstParentIsVersioned = isVersionedFile(dst.getParentFile());                if (!srcIsVersioned && !dstParentIsVersioned) {            // world:world            SVNFileUtil.rename(src, dst);        } else if (!dstParentIsVersioned) {            // wc:world            // 1. export to world            SVNFileUtil.copy(src, dst, false, false);                        // 2. delete in wc.            SVNWCClient client = new SVNWCClient();            client.doDelete(src, true, false);        } else if (!srcIsVersioned) {            // world:wc (add, if dst is 'deleted' it will be replaced)            SVNFileUtil.rename(src, dst);            SVNWCClient client = new SVNWCClient();            client.doAdd(dst, false, false, false, true);                    } else {            // wc:wc.            // 1. collect information on src and dst entries.            SVNWCAccess srcAccess = SVNWCAccess.create(src);            SVNWCAccess dstAccess = SVNWCAccess.create(dst);            SVNEntry srcEntry = srcAccess.getTargetEntry();            SVNEntry dstEntry = dstAccess.getTargetEntry();            SVNEntry dstParentEntry = dstAccess.getAnchor().getEntries().getEntry("", false);                        boolean sameWC = dstParentEntry.getUUID() != null &&                dstParentEntry.getUUID().equals(srcEntry.getUUID());                        // 2. do manual copy of the file or directory            SVNFileUtil.copy(src, dst, false, sameWC);            // obstruction assertion.            if (dstEntry != null && dstEntry.getKind() != srcEntry.getKind()) {                // ops have no sence->target is obstructed, just export src to dst and delete src.                SVNWCClient client = new SVNWCClient();                client.doDelete(src, true, false);                return;                                    }            // 3. update dst dir and dst entry in parent.            if (!sameWC) {                // just add dst (at least try to add, files already there).                try {                    SVNWCClient client = new SVNWCClient();                    client.doAdd(dst, false, false, false, true);                            } catch (SVNException e) {}            } else if (srcEntry.isFile()){                if (dstEntry == null) {                    dstEntry = dstAccess.getAnchor().getEntries().addEntry(dst.getName());                }                                 String srcURL = srcEntry.getURL();                String srcCFURL = srcEntry.getCopyFromURL();                long srcRevision = srcEntry.getRevision();                long srcCFRevision = srcEntry.getCopyFromRevision();                                if (srcEntry.isScheduledForAddition() && srcEntry.isCopied()) {                    dstEntry.scheduleForAddition();                    dstEntry.setCopyFromRevision(srcCFRevision);                    dstEntry.setCopyFromURL(srcCFURL);                    dstEntry.setKind(SVNNodeKind.FILE);                    dstEntry.setRevision(srcRevision);                    dstEntry.setCopied(true);                } else if (!srcEntry.isCopied()) {                    dstEntry.setCopied(true);                    dstEntry.scheduleForAddition();                    dstEntry.setKind(SVNNodeKind.FILE);                    dstEntry.setCopyFromRevision(srcRevision);                    dstEntry.setCopyFromURL(srcURL);                } else {                    dstEntry.scheduleForAddition();                    dstEntry.setKind(SVNNodeKind.FILE);                    if (!dstEntry.isScheduledForReplacement()) {                        dstEntry.setRevision(0);                    }                }                dstAccess.getAnchor().getEntries().save(true);            } else if (srcEntry.isDirectory()) {                if (dstEntry == null) {                    dstEntry = dstAccess.getAnchor().getEntries().addEntry(dst.getName());                }                                 String srcURL = srcEntry.getURL();                String srcCFURL = srcEntry.getCopyFromURL();                String dstURL = dstParentEntry.getURL();                long srcRevision = srcEntry.getRevision();                long srcCFRevision = srcEntry.getCopyFromRevision();                                dstURL = PathUtil.append(dstURL, PathUtil.encode(dst.getName()));                if (srcEntry.isScheduledForAddition() && srcEntry.isCopied()) {                    dstEntry.scheduleForAddition();                    dstEntry.setCopyFromRevision(srcCFRevision);                    dstEntry.setCopyFromURL(srcCFURL);                    dstEntry.setKind(SVNNodeKind.DIR);                    dstEntry.setRevision(srcRevision);                    dstEntry.setCopied(true);                    dstAccess.getAnchor().getEntries().save(true);                    // update URL in children.                    try {                        dstAccess = SVNWCAccess.create(dst);                         dstAccess.open(false, true);                        SVNDirectory dstDir = dstAccess.getTarget();                        dstDir.updateURL(SVNProperty.URL, true);                    } finally {                        dstAccess.close(false);                    }                } else if (!srcEntry.isCopied()) {                    dstEntry.setCopied(true);                    dstEntry.scheduleForAddition();                    dstEntry.setKind(SVNNodeKind.DIR);                    dstEntry.setCopyFromRevision(srcRevision);                    dstEntry.setCopyFromURL(srcURL);                    dstAccess.getAnchor().getEntries().save(true);                    // update URL, CF-URL and CF-REV in children.                    try {                        dstAccess = SVNWCAccess.create(dst);                         dstAccess.open(false, true);                        SVNDirectory dstDir = dstAccess.getTarget();                        dstEntry = dstDir.getEntries().getEntry("", false);                        dstEntry.setCopied(true);                        dstEntry.scheduleForAddition();                        dstEntry.setKind(SVNNodeKind.DIR);                        dstEntry.setCopyFromRevision(srcRevision);                        dstEntry.setURL(dstURL);                        dstEntry.setCopyFromURL(srcURL);                                                SVNCopyClient.updateCopiedDirectory(dstDir, "", dstURL, null, -1);                        dstDir.getEntries().save(true);                    } finally {                        dstAccess.close(false);                    }                } else {                    // replay                    dstAccess.getAnchor().getEntries().deleteEntry(dst.getName());                    dstAccess.getAnchor().getEntries().save(true);                    SVNFileUtil.deleteAll(dst);                    SVNFileUtil.copy(src, dst, false, false);                    SVNWCClient client = new SVNWCClient();                    client.doAdd(dst, false, false, false, true);                            }            }            // now delete src.            try {                SVNWCClient client = new SVNWCClient();                client.doDelete(src, true, false);            } catch (SVNException e) {                //            }            srcAccess.close(false);            dstAccess.close(false);        }    }