无法使用 svnkit 将整个 SVN 存储库检出到本地计算机

Unable to checkout the entire SVN repository to local machine using svnkit

我正在尝试使用 svnkit 将整个 SVN 存储库检出到本地目录,当我尝试 SVNUpdateClient updateClient = clientManger.getUpdateClient();始终 return 为空。 我正在使用 svnkit 这样做。

这是我的代码:

File wcFolder=new File("some directory path");
        ISVNOptions myOptions=SVNWCUtil.createDefaultOptions(true); 
         ISVNAuthenticationManager myAuthManager=SVNWCUtil.createDefaultAuthenticationManager("xyz","abc"); 
        SVNClientManager clientManger = SVNClientManager.newInstance(myOptions, myAuthManager);
        SVNUpdateClient updateClient = clientManger.getUpdateClient();
        updateClient.setIgnoreExternals(false); 
        updateClient.doCheckout(SVNURL.parseURIDecoded("some path to xyz/trunk"), wcFolder, SVNRevision.HEAD,SVNRevision.HEAD, SVNDepth.INFINITY, true);

我找到了查看 SVN 的正确方法,

SVNURL svnurl = SVNURL.parseURIDecoded(url);
SVNRepository repository = SVNRepositoryFactory.create(svnurl);
ISVNAuthenticationManager authManager = SVNWCUtil.createDefaultAuthenticationManager(uname, password);
repository.setAuthenticationManager(authManager);
SVNClientManager ourClientManager = SVNClientManager.newInstance();
ourClientManager.setAuthenticationManager(authManager);
SVNUpdateClient updateClient = ourClientManager.getUpdateClient();
updateClient.setIgnoreExternals(true);

long latestRevision = repository.getLatestRevision();
if (updateClient.doCheckout(svnurl, destinationDir,
        SVNRevision.HEAD, SVNRevision.HEAD, SVNDepth.INFINITY,
                allowUnversionedObstructions) == latestRevision) {
    ourClientManager.dispose();
}