How to write built number (revision)
I use TurtoiseSVN but don't use a compiler. I simply manage a set of files. Nevertheless I want to have some kind of built number (set number) to be able to identify of which status an export is. So I tried to use the post-commit hook which launched a batch file that exported the revision into a file in the Current Working Directory (ECHO %REV% > %CWD%/built.txt) This has the big disadvantage that after the commit I immediately have an uncommitted file in my Working Copy. and that an export is always inconsistent with this situation (especially with multiple contributors in the same repository). I would have used the start-commit hook but it does not have the revision parameter (only PATH MESSAGEFILE CWD). How can I solve this?
Hi, why not using the revision number which is displayed after an export ? Or may be you can use the working copy first and use "svnversion" and after that do an svn export... Kind regards Karl Heinz Marbaise
kamaHi, why not using the revision number which is displayed after an export ? [/quote] Karl Heinz, I do want to use the revision number, but I don't want to enter this manually somewhere. I want the commit-action to put this number into a file automatically. My repository contains a set of customization files for a business application in our company. This application has access to this file containing the revision number and can display it thus showing the customization version (status) within the application. [quote=kama] Or maybe you can use the working copy first and use "svnversion" and after that do an svn exportCan you explain some more please? What exactly do you mean with "svnversion"?
svnversion returns the revision number if you type it in the command line. I have the same problem than you do i think. I want to download a file called version.h which looks like: #define svn_rev %%revision number%%
and it has a much simpler solution: Create file version.h:
#define revision = $Rev$svn propset svn:keywords "Rev" version.h svn ci -m" version counter introduced" On your next update $Rev$ has changed to $Rev 123$.
Damn the link point to 404 :(
Provided you have the svn command line application, you can use the following code - we use it in our projects (slightly altered)
Best Wishes By Cegonsoft
1-8 of 8
Reply to this discussion
You cannot edit posts or make replies: You should be logged in before you can post.