简体   繁体   中英

Get current revision number of SVN working copy in java program

I'm trying to get the current revision number of the working copy to log it into the log file.

The software is written in Java. So how is it possible to access the revision number through Java?

It's unclear what kind of software you're writing - a webapp in a war? A standalone java program/client packaged in a jar? If you're creating a war or jar file, you can have your build put the SVN info into the META-INF/MANIFEST.MF and your code can read it from there.

使用svnkit并使用以下方法:

SVNWCClient.doInfo()

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM