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

Re: Is Keyword ($Revision$)substitution possible in SVN?

From: Andrew Boothman <andrew_at_mux.org.uk>
Date: 2005-11-23 00:35:55 CET

Sachin Patil wrote:
> Hi,
> I use SVN for managing a C++ project.
> Is there some way to find the current revision number automatically from
> within a version controlled file so that when I build an executable, I
> should be able to display the version number for that executable.
> This is somewhat similar to the keyword substitution |for $Revision$ in
> CVS.
>
> I have read the bean-book and did not find any information regarding
> this. Did I miss something?

You can do keyword substitution using subversion including $Revision$
see
<http://svnbook.red-bean.com/nightly/en/svn.advanced.props.html#svn.advanced.props.special.keywords>
but the $Revision$ keyword in subversion expands to be the last revision
in which that particular file changed, which may or may not be what you
want see <http://subversion.tigris.org/faq.html#version-value-in-source>

Andrew

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Nov 23 00:38:42 2005

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.