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

Re: SVN Keyword

From: Duncan Murdoch <murdoch_at_stats.uwo.ca>
Date: 2006-11-16 17:10:38 CET

On 11/16/2006 10:47 AM, David Moriconi wrote:
> Yes I meant the repository revision number and it's exactly for this
> reason (revision number built into the executable).
>
> But I can not imagine that svn does not contain any keyword or variable
> that will update files during check out instead of during commit.

Some of the reasoning behind this decision is in the FAQ on this:

http://subversion.tigris.org/faq.html#version-value-in-source

Duncan Murdoch

>
> Anyway, I will try to do it with a batch file that will read the
> revision number during the build process to update my macro that contain
> the build number.
>
> Thanks you for your answer.
> Dave
>
> -----Original Message-----
> From: Duncan Murdoch [mailto:murdoch@stats.uwo.ca]
> Sent: Thursday, November 16, 2006 10:12 AM
> To: David Moriconi
> Cc: users@subversion.tigris.org
> Subject: Re: SVN Keyword
>
> On 11/16/2006 10:04 AM, David Moriconi wrote:
>> Hi,
>>
>> I want to put the revision number as a variable in my C program that
> it
>> will be updated when the file is checked out. I looked for $Rev$ or
> $Id$
>> but those keywords are updated only during the commit. Is there any
> way
>> to update files by writing the revision number automaticaly during the
>> check out?
>
> You mean the repository revision number, rather than the last modified
> revision of the file?
>
> If so, I think the answer is no, you can't do that. The usual thing
> people do if they want the repository revision number built into an
> executable that they are compiling is to put a call to svn info or
> svnversion into their make script for the project. Have the make script
>
> write some form of the revision number to an unversioned file, and link
> that file into your project.
>
> If you really wanted the last modified revision of the file, then look
> up svn:keywords in the book.
>
> Duncan Murdoch

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Nov 16 17:11:51 2006

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

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