Unfrotunately, it doesn’t work well for versioning... Since the file wont change, svn wont update it... The CVS model always inserted the version on update...
SVN doesnt -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Philipp Menke Sent: Thursday, February 16, 2012 6:27 AM To: [email protected] Subject: Re: [Interest] compile SVN-Version into Project with qmake Hey, Yesterday I talked to a friend about my issues with the svn-revision in the code an he told me that there is a special SVN properties to realise something like that: the property is called: svn:keywords It can be used to let SVN fill in values for special magic keywords each time the file gets changed. See http://johnbokma.com/mexit/2008/09/30/subversion-svn-keywords-property.html for more Philipp Am 14.02.2012 00:23, schrieb Martin Holmes: > I have a pre-build step in which I write something to a text file, > then do a commit, before retrieving the version info. That way, every > qmake operation increments the SVN revision number. > > Cheers, > Martin > > On 12-02-13 02:55 PM, Philipp Menke wrote: >> thanks, I tried some of the things from the weblinks but I could not >> bring it to work properly... >> That thing you wrote just works as I expect but I gut one question: >> >> Will the Variable SVNVERSION be updated every time I run make or just >> when I call qmake? So is the version.h always up to date? >> >> Thanks Philipp >> >> Am 13.02.2012 15:11, schrieb thomas vincent: >>> Hi, >>> Personally on Linux I use : >>> >>> SVNVERSION = $$system("svn info ../ | grep Revision | tr -d >>> 'Revison: '") system( "echo 'const std::string svn_version = >>> \"$$SVNVERSION\";'"> >>> ../version.h) >>> >>> Then you can include the "version.h" file when you need to use the >>> current SVN revision. >>> This gives a clean number (no letter and or working copy pre-commit >>> revision ...). >>> >>> I guess you can pass it to GCC from there ;). >>> >>> Tom >>> >>> 2012/2/8 André Pönitz<[email protected]>: >>>> On Wed, Feb 08, 2012 at 08:09:19PM +0100, Philipp Menke wrote: >>>>> Hi, >>>>> I would like to compile the current Revision of my repository into >>>>> my code. How could I manage this with qmake? >>>>> >>>>> I think one could use "svn info | grep Revision" or sth like that >>>>> to get the current Revision number and pass this as a >>>>> preprocessor-Define into gcc. >>>>> But how could I have this been done automatically? >>>>> >>>>> Do you have any idea how to realise? >>>> Looks like the the problem came up before, see >>>> >>>> http://lists.trolltech.com/qt-interest/2006-10/msg00596.html >>>> >>>> Seems to be also discussed on >>>> >>>> http://colby.id.au/node/145 >>>> >>>> http://stackoverflow.com/questions/5083441/how-to-add-pre-build-step-in-qmake-qtcreator >>>> >>>> http://qtcreator.blogspot.com/2009/10/generating-automatic-version- >>>> numbers.html >>>> >>>> etc >>>> >>>> Andre' >>>> _______________________________________________ >>>> Interest mailing list >>>> [email protected] >>>> http://lists.qt-project.org/mailman/listinfo/interest >> _______________________________________________ >> Interest mailing list >> [email protected] >> http://lists.qt-project.org/mailman/listinfo/interest >> _______________________________________________ Interest mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/interest _______________________________________________ Interest mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/interest
