Java 如何使用SVNkit获取特殊文件的所有修订(非最新版本)?

Java 如何使用SVNkit获取特殊文件的所有修订(非最新版本)?,java,svn,svnkit,Java,Svn,Svnkit,我使用了一个示例java代码来获取文件的修订历史记录,但只获得了一个修订。 此文件的respository中有许多修订。那么,如何一次获得此文件的所有修订 … long startRevision = -1; long endRevision = 0; //HEAD (i.e. the latest) revision SVNRepositoryFactoryImpl.setup(); repository = SVNRepositoryFactory.create( SVNURL.parse

我使用了一个示例java代码来获取文件的修订历史记录,但只获得了一个修订。 此文件的respository中有许多修订。那么,如何一次获得此文件的所有修订

…
long startRevision = -1;
long endRevision = 0; //HEAD (i.e. the latest) revision

SVNRepositoryFactoryImpl.setup();
repository = SVNRepositoryFactory.create( SVNURL.parseURIEncoded(url) );
ISVNAuthenticationManager authManager = 
         SVNWCUtil.createDefaultAuthenticationManager( name, password );
repository.setAuthenticationManager( authManager );

Collection logEntries = null;
logEntries = repository.log( new String[] { "EJB.java" }, null, startRevision,
                             endRevision, true, true );
…

使用0表示开始修订,使用-1表示结束修订获取日志,并使用这些日志条目获取修订

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 );
SVNRepository repository=null;
repository=SVNRepositoryFactory.create(SVNURL.parseURIDecoded(url));
ISVNAuthenticationManager身份验证管理器=
SVNWCUtil.createDefaultAuthenticationManager(“,”);
setAuthenticationManager(authManager);
SvnOperationFactory operationFactory=新的SvnOperationFactory();
SvnLog logOperation=operationFactory.createLog();
logOperation.setSingleTarget(
SvnTarget.fromURL(
parseURIEncoded(url));
logOperation.setRevisionRanges(Collections.singleton(
SvnRevisionRange.create(
SVNRevision.创建(1),
SVNRevision.HEAD
)
) );
Collection logEntries=logOperation.run(null);
现在遍历日志条目,并使用logEntry.getRevision()获取截止日期的所有修订