[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 16:11:50 CET

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 16:13:43 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.