I'd like to be able to read the current svn revision number (I'm using Subclipse) from my Java Code to output it with the rest of the things I need in my regression tests written using JUnit 4.
I googled a lot without any luck (some info pointing to javahl.jar, but I wasn't able to figure out anything useful for my case), I also tried to figure out by myself but no luck again.
Environment:
- Eclipse Version: 3.6.2, Build id: M20110210-1200
- Windows 7 32-bit
- Subclipse 1.6.18 (JavaHL 1.6.17)
If possible I'd like to avoid to read .snv files directly and reach a "clean" solution because I have to leave this code to other people.
Thanks in advance, Alessandro
I figured out that the questions seems still open even if I solved the problem, I post here the code for clarity even if it was already inserted into a commet:
Please note that this stub uses some deprecated methods, it is of course possible to replace them with other methods, but this is to be intended as a guideline for solving the original problem.