You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Michael Hipp <Mi...@Hipp.com> on 2005/06/04 23:12:11 UTC
When does 'svn:keywords' get applied
When exactly does svn do the substitution for, say, the $Revision$ keyword? Is
it anytime a file in the directory gets edited and committed or only when the
specific file having the keyword gets edited and committed?
If the latter, how do I make sure my "main" file always shows the most current
revision of my *project* and not of that file?
Or is this a dumb question?
Thanks,
Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: When does 'svn:keywords' get applied
Posted by Stephan Hennig <ma...@arcor.de>.
Michael Hipp schrieb:
> If the latter, how do I make sure my "main" file always shows the
> most current revision of my *project* and not of that file?
The post-commit hook script gets the new revision number as second
argument. You can write that out to a file and include the file later in
your sources. Question is where to write the file(s) since post-commit
doesn't know the paths of checked out working copies (suggestions
welcome!). If there is only one user you might control the place via an
environment variable.
But notice, because there is no point in versioning that file (its
content would be off by one in the repository) that file might be missed
after a fresh check-out. The advantage to svnversion is you don't need
to run an additional program within every build process.
Regards,
Stephan Hennig
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: When does 'svn:keywords' get applied
Posted by Ben Collins-Sussman <su...@collab.net>.
On Jun 4, 2005, at 6:12 PM, Michael Hipp wrote:
> When exactly does svn do the substitution for, say, the $Revision$
> keyword? Is it anytime a file in the directory gets edited and
> committed or only when the specific file having the keyword gets
> edited and committed?
>
> If the latter, how do I make sure my "main" file always shows the
> most current revision of my *project* and not of that file?
>
> Or is this a dumb question?
>
There is no $GlobalRev$ keyword. $Revision$ just represents the last-
changed-rev of the file itself, so it's only updated when the file
changes.
See this FAQ:
http://subversion.tigris.org/faq.html#version-value-in-source
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org