[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: Peter McNab <mcnab_p_at_melbpc.org.au>
Date: 2006-06-20 12:47:22 CEST

Phil Cairns wrote:
> I should have said "my resource script file". However, I thought this
> line
>
> > IDS_SVNREVISION "$Rev: 1948 $"
>
> was a bit of giveaway.
>
The above was in foreign territory for me, not being a C man.

> 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.
>
>
You are perhaps closer that it looks.

The process for me is:-
Commit before compiling production code.
Run SubWCRev.
Compile.
Revert the lone changed file.
The compiled code now contains the HEAD revision.

Note. None of the auto generated files, nor the .exe are under revision
control.

Peter

---------------------------------------------------------------------
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:47:35 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.