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

Re: Edit the file commited and save the current revision

From: Simon Large <simon.tortoisesvn_at_googlemail.com>
Date: Sun, 17 Jan 2010 17:19:10 +0000

2010/1/17 Rafael M. Heise <rmheise_at_gmail.com>:
> Interesting...
> I'm asking because I saw in tortoise PO files some information about
> the last commit (author, date and revision).
> And I would like to do something like that. Are the PO files update by
> SubWCRev?

No. Those are subversion keywords, updated automatically by
subversion. They refer only to the file they are set in. If that is
what you want, then it is easy (look up keywords in the subversion
book). If you want the last commit revision for a set of files or
folders then you have to use a tool which crawls the working copy,
like SubWCRev.


:       ___
:  oo  // \\      "De Chelonian Mobile"
: (_,\/ \_/ \     TortoiseSVN
:   \ \_/_\_/>    The coolest Interface to (Sub)Version Control
:   /_/   \_\     http://tortoisesvn.net
> Rafael M. Heise
> On 15 jan, 20:39, Simon Large <simon.tortoise..._at_googlemail.com>
> wrote:
>> 2010/1/15 Rafael M. Heise <rmhe..._at_gmail.com>:
>> > Hi guys.
>> > This is my situation. I have a repository and I would like to save the
>> > current revision on my files, because I would like to know what
>> > revision my customer is running.
>> > How could I edit my files to save the current revision on?
>> > I think I must use post-commit hook. But I'm not sure about.
>> > And, Is there some script already done to do something like that?
>> You need to use SubWCRev to extract the version of your working copy.
>> You give it a template file which has markers in like "$WCREV$" and it
>> generates a copy but with those markers replaced with real data.
>> For C programs you can create a template header, Revision.in
>> #define SVN_REV_STRING "r$WCREV$"
>> I have a batch file which runs SubWCRev like this:
>> @echo off
>> "C:\Program Files\TortoiseSVN\bin\SubWCRev" . Revision.in Revision.h
>> I can then rebuild and get the version information included.
>> If your dev environment includes a pre-build step you can call the
>> program from there. Alternatively you could use a TSVN client side
>> post-commit hook and post-update hook to call it.
>> Simon
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2010-01-17 18:19:26 CET

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.