[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Force commit of unchanged file

From: Phil Cairns <phil.cairns_at_gmail.com>
Date: 2006-06-20 12:13:28 CEST

Peter McNab wrote:
> Phil Cairns wrote:
>> Hi,
>>
>> I'm developing using VC2003, and I used to use a program that would
>> parse my resource file and increment the last value in my version
>> resource during a release build. This is kind of a nuisance, since
>> updating the resource file means that the project is going to rebuild,
>> which means that the version number is going to increment, and on it
>> goes. Sort of. Because sometimes it builds fast enough, and the file
>> system timestamps aren't high-res.
>>
> Why tamper with auto generated files at all?. You can insert the build
> number into one of your source files by running SubWCRev.exe that comes
> with Tortoise and avoid "touching" the .res file altogether.

I should have said "my resource script file". However, I thought this line

> IDS_SVNREVISION "$Rev: 1948 $"

was a bit of giveaway.

I liked the idea of SubWCRev.exe, and tried it. I created a
"svnrevision-template.h" file, with this as the contents:

const char* SVNREVISION = "(Rev. $WCREV$)";

In my prebuild event, I included this line (broken for readability):

"C:\Program Files\TortoiseSVN\bin\SubWCRev.exe" \
     "$(InputDir)." \
     "$(InputDir)..\common\svnrevision-template.h" \
     "$(InputDir)..\common\svnrevision.h" -f

Then in my about box cpp file, I #included svnrevision.h, and displayed
the string. This all works, but it has the same problems as my
buildno.exe. That is, the file is going to be updated every time I do a
build. More to the point, the file's timestamp is going to be updated,
and the IDE is going to want to rebuild all files dependent on this one.

I'm looking for this file to be updated whenever I do a commit for that
directory. I guess I'm looking for a post-commit event. Is there a way
to hook into that? I'm quite prepared to write code if necessary, but
don't want to reproduce it if someone has already done it.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: users-help@tortoisesvn.tigris.org
Received on Tue Jun 20 12:14:11 2006

This is an archived mail posted to the TortoiseSVN Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.