Results 1 to 7 of 7

Thread: subversion revision number

  1. #1
    Join Date
    Apr 2006
    Location
    Erlangen, Germany
    Posts
    58
    Thanks
    11
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default subversion revision number

    is there any chance to get at subversions revision number for my project to write it in my about-page that is worth the work?
    I see lot of applications writing their revisionnumber there and it makes sense to make sure you have the latest version, but i doubt that there is an easy way?

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: subversion revision number

    For example like:
    Qt Code:
    1. static QString revision()
    2. {
    3. QString rev("$Revision: 1152 $");
    4. rev.remove(QChar('$'));
    5. return rev.simplified();
    6. }
    To copy to clipboard, switch view to plain text mode 
    The revision will only get updated when the file containing the piece of code above changes, though..
    J-P Nurmi

  3. #3
    Join Date
    Apr 2006
    Location
    Erlangen, Germany
    Posts
    58
    Thanks
    11
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: subversion revision number

    how does this work? the $ make it a kind of makro that subversion recognizes?

  4. #4
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: subversion revision number

    J-P Nurmi

  5. The following 2 users say thank you to jpn for this useful post:

    mikro (10th October 2006), sunil.thaha (10th October 2006)

  6. #5
    Join Date
    Jan 2006
    Posts
    21
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: subversion revision number

    Quote Originally Posted by jpn View Post
    The revision will only get updated when the file containing the piece of code above changes, though..
    Yes :-( Is there any way to get it always updated?

  7. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: subversion revision number

    Quote Originally Posted by AlexKiriukha View Post
    Yes :-( Is there any way to get it always updated?
    Maybe you should try the BundleMan? I didn't have time to evaluate it, but maybe you will find it interesting.

  8. #7
    Join Date
    Jan 2006
    Posts
    21
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Wink Re: subversion revision number

    Quote Originally Posted by jacek View Post
    Maybe you should try the BundleMan? I didn't have time to evaluate it, but maybe you will find it interesting.
    I have not evaluated that too but it gives me idea: in subversion you can write custom scripts that executed on different events. So, if you are administrator of repository, you can easily extend it to whatever you wish

Similar Threads

  1. Replies: 6
    Last Post: 5th March 2006, 22:05

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.