topRev = SVNRepositoryReplicator.replicateRepository(srcURL, dstURL, topRev);
SVNRepository src = SVNRepositoryFactory.create(srcURL); SVNRepository dst = SVNRepositoryFactory.create(dstURL); topRev = SVNRepositoryReplicator.replicateRepository(src, dst, topRev);
    public static void main(String[] args) {        if (args.length < 4) {            System.out                    .println("Expected input values: 1. source repository url. 2. destination repository url. 3. source working copy dir. 4. destination working copy dir. [5.] top revision to copy up to");            SVNDebugLog                    .logInfo("Expected input values: 1. source repository url. 2. destination repository url. 3. source working copy dir. 4. destination working copy dir. [5.] top revision to copy up to");            System.exit(1);        }        String sourceRepositoryUrl = args[0];        String targetRepositoryUrl = args[1];        String sourceWC = args[2];        String targetWC = args[3];        long topRev = args.length > 4 ? Long.parseLong(args[4]) : -1;        boolean passed = false;        FSRepositoryFactory.setup();        SVNRepositoryFactoryImpl.setup();        DAVRepositoryFactory.setup();        try {            SVNURL srcURL = SVNURL.parseURIDecoded(sourceRepositoryUrl);            SVNURL dstURL = SVNURL.parseURIDecoded(targetRepositoryUrl);            topRev = SVNRepositoryReplicator.replicateRepository(srcURL, dstURL, topRev);            passed = compareRepositories1(srcURL, dstURL, topRev, new File(sourceWC), new File(targetWC));        } catch (SVNException svne) {            SVNDebugLog.logInfo("Repositories comparing test FAILED with errors: " + svne.getErrorMessage().getMessage());            System.out.println("Repositories comparing test FAILED with errors: " + svne.getErrorMessage().getMessage());            System.out.println(svne.getErrorMessage().getMessage());            System.exit(1);        }        if (passed) {            SVNDebugLog.logInfo("Repositories comparing test PASSED");            System.out.println("Repositories comparing test PASSED");        } else {            SVNDebugLog.logInfo("Repositories comparing test FAILED");            System.out.println("Repositories comparing test FAILED");            System.exit(1);        }    }