如何使用svnkit获取修订号的确切文件夹位置

时间:2017-08-16 14:21:00

标签: java svn svnkit

我有一个SVN位置,我每天都会发送所有代码签到的通知

我能够从主存储库获取最后一天的修订号,但是我无法获得检查代码的存储库下的确切文件夹。

SVNRepository repository = null;
        repository = SVNRepositoryFactory.create(SVNURL.parseURIDecoded(url));
        ISVNAuthenticationManager authManager =
                           SVNWCUtil.createDefaultAuthenticationManager("", "");
        repository.setAuthenticationManager(authManager);
        SvnOperationFactory operationFactory = new SvnOperationFactory();
        SvnLog logOperation = operationFactory.createLog();
        logOperation.setSingleTarget(
                SvnTarget.fromURL(
                        SVNURL.parseURIEncoded(url)));
        logOperation.setRevisionRanges( Collections.singleton(
                SvnRevisionRange.create(
                        SVNRevision.create( 1 ),
                        SVNRevision.HEAD
                )
        ) );
        Collection<SVNLogEntry> logEntries = logOperation.run( null );

0 个答案:

没有答案