You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Sachin Patil <sa...@fastvdo.com> on 2005/11/22 21:39:34 UTC

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

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?

Any suggestions/information is appreciated.

warm regards,

Sachin Patil
FastVDO LLC.

|

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

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

Posted by Andrew Boothman <an...@mux.org.uk>.
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