0

I know I can add the Revision number and more SVN Information via Keywords to the Comment blocks.

But is there a way to get this information as a string for further computing.

I'm Using Eclipse and Subclipse plugin.

Reason:

I want to have an information string which I can display inside the Application or send it to me via an trouble report.

1

1 Answer 1

0

You can put svn keywords anywhere in your code; not just in comments, but also in strings for example. However, this may not work as nicely as you think since the svn keywords are only updated as the file containing them is committed. Are you going to update the file containing the version information as you make changes to your program? Probably not.

A better way is to have your build take care of this. One way is to use svnversion or svnversion -c and manipulate its output to your liking. If you invoke svnversion from the top of your working directory you get the version range of all your files recursively. You can use this to make a nice version number.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.