You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by David Moriconi <dm...@aetheranetworks.com> on 2006/11/16 15:04:08 UTC

SVN Keyword

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? 

 

Thank you all

David M.


Re: SVN Keyword

Posted by Duncan Murdoch <mu...@stats.uwo.ca>.
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