svnkit: how to get latest revision number from SVN DB?

后端 未结 3 790
孤独总比滥情好
孤独总比滥情好 2020-12-20 07:14

I want to get the latest revision number of the SVN database using SVNKIT. I don\'t want to update the local repository and get the head revision number , i want to directly

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-20 07:59

    DAVRepositoryFactory.setup();
    
    final SVNURL url = SVNURL.parseURIDecoded("http://svn.apache.org/repos/asf");
    final SVNRepository repository = SVNRepositoryFactory.create(url);
    final long latestRevision = repository.getLatestRevision();
    System.out.println(latestRevision);
    

提交回复
热议问题