Page 1 of 1

SVN version display switch

Posted: 12 Jul 2008, 08:15
by bigglesworth
I know i can execute....

Code: Select all

tmw -v
and

Code: Select all

tmw --version
to display which client version I'm running.

But, other than at the time of compilation, is there a way to view which SVN version I'm running?

Re: SVN version display switch

Posted: 12 Jul 2008, 16:03
by Jaxad0127
I'm not sure how those are different. Do you want to have the SVN revision number in the executable?

Also, the client displays it's version number in one of the corners (I can't remember which one at the moment, but I think it's the upper left).

Re: SVN version display switch

Posted: 12 Jul 2008, 17:26
by bigglesworth
jaxad0127,

You are correct. The output is the same from both commands.

I apologize. I did not specify that I would like to see the SVN revision number in the 0.0.x (and future) clients.

It would be helpful to see the number in the login screen or through a command switch, rather than only the base number '0.0.24.1' in the top-left corner of the login screen.

I'd like to request this as a feature.

Should I create a Mantis ticket or request that this thread be moved to the 'Suggestions' topic?

Re: SVN version display switch

Posted: 12 Jul 2008, 18:09
by Crush
I am not sure if it is possible to do this automatically.

Subversion can enter the revision a file was last changed automatically, but only when the specific file itself was changed. But the only file which is updated every single commit is the changelog.

Maybe Bjørn Lindeijer, our SVN guru, knows a solution to get the revision number into the client binary.

Re: SVN version display switch

Posted: 12 Jul 2008, 18:56
by fate
Hi,

As part of the configure script, run "svn info | grep '^Last Changed Rev' | cut -d' ' --field=4". The result might be empty or erroneous, but in that case you leave it as "". AC_DEFINE an appropriate constant, and you should be good to go. Recall that this is only a debug feature, so there's no need to be universal or subtle about it.

Hope that helps.

-- fate

Re: SVN version display switch

Posted: 12 Jul 2008, 18:59
by Superkoop
Maybe the changelog could include the revision number, and then when you config/compile it could automatically extract the revision number from there, and insert it into the data/help/header.txt.

Code: Select all

               T  H  E      M  A  N  A      W  O  R  L  D
               ==========================================
 
           Version:0.0.24.1              Date:7 April 2008
           SVN Revision:4405
                    Website: http://themanaworld.org
 

Re: SVN version display switch

Posted: 13 Jul 2008, 17:39
by Rotonen
An automated solution which would provide it to the login screen would be preferred and nice on the long run. A conditional script to fetch the release number if available/applicable (SVN release tag should be parseable somehow?) and if not, fetch the SVN revision.

Anyone up to it?

Re: SVN version display switch

Posted: 14 Jul 2008, 07:01
by ElvenProgrammer
Actually I was thinking about adding the revision number to the Win32 client, since I already have the info when I create the installer. I'll see if I can find sometime to do it.