Recent

Author Topic: How to get SVN Revision number?  (Read 9360 times)

Avishai

  • Hero Member
  • *****
  • Posts: 1021
How to get SVN Revision number?
« on: December 27, 2011, 11:47:54 am »
When I do SVN Update, the SVN Revision number in the Lazarus "About Box" does not change.  Is there a setting for this?  How can I find what Revision I am using?
Lazarus Trunk / fpc 2.6.2 / Win32

Blaazen

  • Hero Member
  • *****
  • Posts: 3241
  • POKE 54296,15
    • Eye-Candy Controls
Re: How to get SVN Revision number?
« Reply #1 on: December 27, 2011, 12:16:07 pm »
Not only "svn update", you have to recompile Lazarus after update.
I am on Linux+Qt and I use these two commands:
Code: [Select]
svn update
make clean all LCL_PLATFORM=qt
You are on windows, you have probably TortoiseSVN. You can also compile Lazarus from MainMenu Tools -> Configure Build Lazarus ...
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

Avishai

  • Hero Member
  • *****
  • Posts: 1021
Re: How to get SVN Revision number?
« Reply #2 on: December 27, 2011, 01:05:08 pm »
Thank you Blaazen.  I recompile every time I do an update but the number does not change in the "About Box".
Lazarus Trunk / fpc 2.6.2 / Win32

ludob

  • Hero Member
  • *****
  • Posts: 1173
Re: How to get SVN Revision number?
« Reply #3 on: December 27, 2011, 01:14:38 pm »
When you use the IDE to rebuild lazarus, make sure the "Update revision.inc" check box is checked in "Configure 'Build Lazarus'".

Avishai

  • Hero Member
  • *****
  • Posts: 1021
Re: How to get SVN Revision number?
« Reply #4 on: December 27, 2011, 01:19:21 pm »
Thank you Ludob, but it is checked.  I have updated many times and recompiled many times but the number still shows 34252.  SVN Update shows 34447.
Lazarus Trunk / fpc 2.6.2 / Win32

Avishai

  • Hero Member
  • *****
  • Posts: 1021
Re: How to get SVN Revision number?
« Reply #5 on: December 27, 2011, 01:35:02 pm »
OK.  I found svn2revisioninc.exe in C:\Lazarus\tools.  That changed the number, but I think this should be automatic.  I think something is not working correctly.
Lazarus Trunk / fpc 2.6.2 / Win32

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4694
  • I like bugs.
Re: How to get SVN Revision number?
« Reply #6 on: December 27, 2011, 01:38:02 pm »
Thank you Ludob, but it is checked.  I have updated many times and recompiled many times but the number still shows 34252.  SVN Update shows 34447.

Hi Avishai

You have the latest TortoiseSVN 1.7 but you didn't include the cmd line tools while installing it.
They are not installed by default for some reason.
SVN 1.7 has a new file format for its repository and the "revision.inc" feature was temporarily broken. See:

 http://bugs.freepascal.org/view.php?id=20711

Now it works if you have the cmd line tools installed.

Juha
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

Bart

  • Hero Member
  • *****
  • Posts: 5706
    • Bart en Mariska's Webstek
Re: How to get SVN Revision number?
« Reply #7 on: December 27, 2011, 01:40:18 pm »
You can do it manually.
After the svn update, open the file ($LazarusDir)/ide/revision.inc and change the revisionstring. Save the file.
Rebuild Lazarus, and now it shows up in the IDE.

I do this myself, because svn2revisioninc.exe takes a long time to finish on my machine, and I already know the reviosn I am at.

Bart

Avishai

  • Hero Member
  • *****
  • Posts: 1021
Re: How to get SVN Revision number?
« Reply #8 on: December 27, 2011, 01:45:18 pm »
Thank you Bart.  I already tried changing revision.inc but it seems to get recreated when I recompile because I get the old number.  But on my computer, svn2revisioninc.exe took only a blink.
Lazarus Trunk / fpc 2.6.2 / Win32

Bart

  • Hero Member
  • *****
  • Posts: 5706
    • Bart en Mariska's Webstek
Re: How to get SVN Revision number?
« Reply #9 on: December 27, 2011, 06:32:57 pm »
Well, then manualy edit revision.inc, and uncheck "update revision.inc" before building.

Bart

 

TinyPortal © 2005-2018