我想使用SVNKIT获取SVN数据库的最新版本号.我不想更新本地存储库并获取头版本号,我想直接联系SVN存储库并获取最新的版本号.请帮我 .
DAVRepositoryFactory.setup();
String url = "(directory in svn url)";
String name = "(login name)";
String password = "(login password)";
SVNRepository repository = null;
repository = SVNRepositoryFactory.create(SVNURL.parseURIDecoded(url));
ISVNAuthenticationManager authManager =
SVNWCUtil.createDefaultAuthenticationManager(name, password);
repository.setAuthenticationManager(authManager);
SVNDirEntry entry = repository.info(".", -1);
System.out.println("Latest Rev: " + entry.getRevision());
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
8807 次 |
| 最近记录: |